Created
March 14, 2012 09:56
-
-
Save ianfieldhouse/2035478 to your computer and use it in GitHub Desktop.
Apache with mod_wsgi on work's Solaris Container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install PCRE | |
============ | |
cd $HOME/src | |
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.31.tar.gz | |
tar xvzf pcre-8.31.tar.gz | |
rm pcre-8.31.tar.gz | |
cd pcre-8.31 | |
./configure --prefix=$HOME/local/stow/pcre-8.31 | |
make | |
make install | |
cd $HOME/local/stow | |
stow -t $HOME/local pcre-8.31 | |
Install Apache | |
============== | |
cd $HOME/src | |
curl -O http://mirror.catn.com/pub/apache/httpd/httpd-2.4.3.tar.gz | |
tar xvzf httpd-2.4.3.tar.gz | |
rm httpd-2.4.3.tar.gz | |
cd httpd-2.4.3/srclib | |
curl -O http://mirror.ox.ac.uk/sites/rsync.apache.org/apr/apr-1.4.6.tar.gz | |
curl -O http://mirror.ox.ac.uk/sites/rsync.apache.org/apr/apr-util-1.5.1.tar.gz | |
tar xvzf apr-1.4.6.tar.gz | |
tar xvzf apr-util-1.5.1.tar.gz | |
rm apr-1.4.6.tar.gz apr-util-1.5.1.tar.gz | |
mv apr-1.4.6 apr | |
mv apr-util-1.5.1 apr-util | |
cd .. | |
CFLAGS="-liconv" ./configure --prefix=$HOME/local/stow/httpd-2.4.3 --enable-rewrite=shared --with-included-apr --with-pcre=$HOME/local --enable-mpms-shared=all | |
make | |
make install | |
cd $HOME/local/stow | |
mkdir -p $HOME/local/apache | |
stow -t $HOME/local/apache httpd-2.4.3 | |
export PATH=$HOME/local/apache/bin:$PATH (add this to your .bashrc/.bash_profile to maintain between ssh sessions) | |
Install mod_wsgi | |
================ | |
cd $HOME/src | |
curl -O http://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz | |
tar xzvf mod_wsgi-3.4.tar.gz | |
rm mod_wsgi-3.4.tar.gz | |
cd mod_wsgi-3.4/ | |
./configure --with-apxs=$HOME/local/apache/bin/apxs --with-python=/usr/local/edina/python2.7.3/bin/python | |
make | |
make install | |
Edit $HOME/local/stow/httpd-2.4.3/conf/httpd.conf and add the following in the LoadModule section of the configuration file: | |
LoadModule wsgi_module modules/mod_wsgi.so | |
Save the configuration file and then start Apache: | |
apachectl configtest | |
apachectl start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment