Created
June 26, 2014 09:47
-
-
Save christianparpart/489c175f8f135a758e44 to your computer and use it in GitHub Desktop.
nginx builder
This file contains hidden or 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
# /bin/bash | |
# depends: libgeoip-dev libpcre3-dev libpam-dev | |
version="1.7.1" | |
wget -O /tmp/nginx-${version}.tar.gz http://nginx.org/download/nginx-${version}.tar.gz && | |
wget -O /tmp/nginx-auth-pam.tar.gz http://web.iti.upv.es/~sto/nginx/ngx_http_auth_pam_module-1.3.tar.gz && \ | |
git clone git@github.com:giom/nginx_accept_language_module.git /var/tmp/nginx_accept_language_module && | |
tar xzvpf /tmp/nginx-${version}.tar.gz -C /var/tmp/ && | |
tar xzvpf /tmp/nginx-auth-pam.tar.gz -C /var/tmp/ && | |
cd /var/tmp/nginx-${version}/ && | |
./configure \ | |
--add-module=${OLDPWD}/ngx_http_auth_pam_module-1.3 \ | |
--add-module=${OLDPWD}/nginx_accept_language_module \ | |
--prefix=/usr \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/run/nginx.lock \ | |
--user=nobody \ | |
--group=nogroup \ | |
--with-ipv6 \ | |
--with-pcre \ | |
--with-pcre-jit \ | |
--with-http_{ssl,spdy,realip,addition,geoip,sub,dav,gunzip,gzip_static,auth_request,degradation,stub_status}_module \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--http-client-body-temp-path=/var/lib/nginx/body \ | |
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ | |
--http-proxy-temp-path=/var/lib/nginx/proxy \ | |
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \ | |
--http-scgi-temp-path=/var/lib/nginx/scgi && | |
make && | |
make install | |
rv=$? | |
rm -rf \ | |
/tmp/nginx-${version}.tar.gz \ | |
/tmp/nginx-auth-pam.tar.gz \ | |
/var/tmp/nginx-${version} \ | |
/var/tmp/ngx_http_auth_pam_module \ | |
/var/tmp/nginx_accept_language_module | |
exit $rv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment