-
-
Save saveshodhan/927589bdab227baf5436df43bcc0055f 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 | |
# for latest tar.gz files, refer this link: | |
# https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#compiling-and-installing-from-source | |
# we will not compile any dependencies, only unzip them in different directories and pass their paths while configuring nginx | |
# download PCRE dependency | |
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz | |
tar -zxf pcre-8.42.tar.gz | |
# download zlib dependency | |
wget http://zlib.net/zlib-1.2.11.tar.gz | |
tar -zxf zlib-1.2.11.tar.gz | |
# download OpenSSL dependency | |
wget http://www.openssl.org/source/openssl-1.1.1b.tar.gz | |
tar -zxf openssl-1.1.1b.tar.gz | |
# download nginx | |
wget https://nginx.org/download/nginx-1.14.2.tar.gz | |
tar zxf nginx-1.14.2.tar.gz | |
# compile nginx | |
cd nginx-1.14.2 | |
./configure --prefix=/home/simon/installed/nginx --with-pcre=/home/simon/src/pcre-8.42 --with-zlib=/home/simon/src/zlib-1.2.11 --with-openssl=/home/simon/src/openssl-1.1.1b --with-http_ssl_module | |
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