-
-
Save bpceee/11114344 to your computer and use it in GitHub Desktop.
Compile nginx standalone without root access
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
# Compile nginx standalone without root access | |
mkdir ~/installed | |
mkdir ~/installed/nginx | |
mkdir ~/src | |
cd ~/src | |
# PCRE dependency - we'll compile against this statically | |
wget http://kent.dl.sourceforge.net/sourceforge/pcre/pcre-7.8.tar.gz | |
tar -xzvf pcre-7.8.tar.gz | |
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz | |
tar -xzvf openssl-1.0.1g.tar.gz | |
wget http://cznic.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz | |
tar -xzvf zlib-1.2.8.tar.gz | |
# Grab nginx | |
wget http://nginx.org/download/nginx-1.4.7.tar.gz | |
tar -xzvf nginx-1.4.7.tar.gz | |
# Compile it | |
cd nginx-1.4.7 | |
./configure --prefix=$HOME/installed/nginx --with-pcre=$HOME/src/pcre-7.8 --with-zlib=$HOME/src/zlib-1.2.8 | |
make | |
make install | |
# Edit config to not bind to port 80 (as we aren't root) | |
vi ~/installed/nginx/conf/nginx.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment