Skip to content

Instantly share code, notes, and snippets.

@kokororin
Last active December 29, 2017 05:53
Show Gist options
  • Save kokororin/739c86cb7b9583de1de8df3e442474c9 to your computer and use it in GitHub Desktop.
Save kokororin/739c86cb7b9583de1de8df3e442474c9 to your computer and use it in GitHub Desktop.
ngx 1.10.1 install script
#!/bin/bash
cd ..
git clone https://github.com/FRiCKLE/ngx_cache_purge
git clone https://github.com/openresty/headers-more-nginx-module
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module
git clone https://github.com/cuber/ngx_http_google_filter_module
git clone https://github.com/newobj/nginx-x-rid-header
git clone https://github.com/openresty/echo-nginx-module
apt-get install uuid-dev libossp-uuid-dev -y
cd nginx-1.10.1
make clean
./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-openssl=../openssl-1.0.2l --with-pcre=../pcre-8.41 --with-pcre-jit --with-ld-opt=-lossp-uuid --with-cc-opt=-I/usr/include/ossp --add-module=../echo-nginx-module --add-module=../ngx_cache_purge --add-module=../ngx_http_substitutions_filter_module --add-module=../ngx_http_google_filter_module --add-module=../headers-more-nginx-module --add-module=../nginx-x-rid-header --add-module=../ngx_pagespeed-${NPS_VERSION}
make
rm -rf /usr/local/nginx/sbin/nginx
cp objs/nginx /usr/local/nginx/sbin
service nginx restart
mkdir -p /var/nginx/cache/one
chown -R www.www /var/nginx
make clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment