Add 'nginx/build.sh'
parent
a02fa58bc9
commit
5cfaccf413
|
@ -0,0 +1,136 @@
|
|||
|
||||
apt-get install -y --force-yes build-essential libtool automake autoconf zlib1g-dev libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev
|
||||
cd /usr/local/src
|
||||
wget http://nginx.org/download/nginx-1.13.4.tar.gz
|
||||
tar -xzvf nginx-1.13.4.tar.gz
|
||||
|
||||
git clone https://github.com/FRiCKLE/ngx_cache_purge.git
|
||||
git clone https://github.com/openresty/memc-nginx-module.git
|
||||
git clone https://github.com/simpl/ngx_devel_kit.git
|
||||
git clone https://github.com/openresty/headers-more-nginx-module.git
|
||||
git clone https://github.com/openresty/echo-nginx-module.git
|
||||
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
|
||||
git clone https://github.com/openresty/redis2-nginx-module.git
|
||||
git clone https://github.com/openresty/srcache-nginx-module.git
|
||||
git clone https://github.com/openresty/set-misc-nginx-module.git
|
||||
git clone https://github.com/FRiCKLE/ngx_coolkit.git
|
||||
git clone https://github.com/FRiCKLE/ngx_slowfs_cache.git
|
||||
|
||||
wget https://people.freebsd.org/~osa/ngx_http_redis-0.3.8.tar.gz
|
||||
tar -zxf ngx_http_redis-0.3.8.tar.gz
|
||||
mv ngx_http_redis-0.3.8 ngx_http_redis
|
||||
|
||||
git clone https://github.com/google/ngx_brotli.git
|
||||
cd ngx_brotli
|
||||
git submodule update --init --recursive
|
||||
|
||||
cd /usr/local/src
|
||||
git clone https://github.com/openssl/openssl.git
|
||||
cd openssl
|
||||
git checkout tls1.3-draft-18
|
||||
|
||||
cd /root/addons/nginx/nginx-1.13.2
|
||||
|
||||
./configure \
|
||||
--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' \
|
||||
--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' \
|
||||
--prefix=/etc/nginx \
|
||||
--sbin-path=/usr/sbin/nginx \
|
||||
--conf-path=/etc/nginx/nginx.conf \
|
||||
--error-log-path=/var/log/nginx/error.log \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--lock-path=/var/lock/nginx.lock \
|
||||
--pid-path=/var/run/nginx.pid \
|
||||
--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-scgi-temp-path=/var/lib/nginx/scgi \
|
||||
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
|
||||
--user=nginx \
|
||||
--group=nginx \
|
||||
--with-debug \
|
||||
--with-file-aio \
|
||||
--with-google_perftools_module \
|
||||
--with-mail \
|
||||
--with-mail_ssl_module \
|
||||
--with-threads \
|
||||
--with-select_module \
|
||||
--with-stream \
|
||||
--with-stream_ssl_module \
|
||||
--with-http_addition_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-http_dav_module \
|
||||
--with-http_flv_module \
|
||||
--with-http_geoip_module \
|
||||
--with-http_gunzip_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-http_image_filter_module \
|
||||
--with-http_mp4_module \
|
||||
--with-http_perl_module \
|
||||
--with-http_random_index_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_secure_link_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_sub_module \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_xslt_module \
|
||||
--with-poll_module \
|
||||
--add-module=/usr/local/src/ngx_cache_purge \
|
||||
--add-module=/usr/local/src/memc-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_devel_kit \
|
||||
--add-module=/usr/local/src/headers-more-nginx-module \
|
||||
--add-module=/usr/local/src/echo-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_http_substitutions_filter_module \
|
||||
--add-module=/usr/local/src/redis2-nginx-module \
|
||||
--add-module=/usr/local/src/srcache-nginx-module \
|
||||
--add-module=/usr/local/src/set-misc-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_http_redis \
|
||||
--add-module=/usr/local/src/ngx_brotli \
|
||||
--add-module=/usr/local/src/ngx_coolkit
|
||||
|
||||
./configure \
|
||||
--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' \
|
||||
--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' \
|
||||
--prefix=/usr/share/nginx \
|
||||
--conf-path=/etc/nginx/nginx.conf \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--error-log-path=/var/log/nginx/error.log \
|
||||
--lock-path=/var/lock/nginx.lock \
|
||||
--pid-path=/run/nginx.pid \
|
||||
--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-scgi-temp-path=/var/lib/nginx/scgi \
|
||||
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
|
||||
--with-debug \
|
||||
--with-pcre-jit \
|
||||
--with-http_ssl_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-http_addition_module \
|
||||
--with-http_geoip_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-http_image_filter_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_sub_module \
|
||||
--with-http_xslt_module \
|
||||
--with-threads \
|
||||
--add-module=/usr/local/src/ngx_cache_purge \
|
||||
--add-module=/usr/local/src/memc-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_devel_kit \
|
||||
--add-module=/usr/local/src/headers-more-nginx-module \
|
||||
--add-module=/usr/local/src/echo-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_http_substitutions_filter_module \
|
||||
--add-module=/usr/local/src/redis2-nginx-module \
|
||||
--add-module=/usr/local/src/srcache-nginx-module \
|
||||
--add-module=/usr/local/src/set-misc-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_http_redis \
|
||||
--add-module=/usr/local/src/ngx_http_auth_pam_module \
|
||||
--add-module=/usr/local/src/ngx_brotli \
|
||||
--sbin-path=/usr/sbin/nginx
|
||||
|
||||
make
|
||||
|
||||
make install
|
Loading…
Reference in New Issue