下载需要组件2 ^3 Y: o9 J% |$ S/ j
wget http://nginx.org/download/nginx-1.17.7.tar.gz
% [; }8 d1 U* R! ~+ w5 B: m% xtar xvzf nginx-1.17.7.tar.gz
0 T( Y( `0 H) U m! q* d, g
5 E: o( ^" F' T+ uwget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
+ D+ g- |, \' Z! ]2 V2 h9 |tar xvzf openssl-1.1.1d.tar.gz8 N+ x% \( e6 L4 M' X k
4 D9 W/ j( V- Q1 I* F) V# S$ k/ p
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz: }8 Y- I4 x- X0 w* B' n& l
tar xvzf pcre-8.43.tar.gz
' o( ~! U; s! e* G# R1 S+ q" r j: D5 X* w7 D, Q# I
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
6 }5 e) ]+ v' i) E2 n( uunzip ngx_http_substitutions_filter.zip# w4 l" d' h: s1 j
5 h$ A% |5 a9 R" W& x. a" @/ qcd nginx-1.17.76 ^, l) `/ E& {
, Q8 T( {; ^- I8 V" i& p. n6 Y8 z& ^+ b b1 m
配置文件
5 A' w! ~+ K/ r3 D. q[Shell] 纯文本查看 复制代码 ./configure \
--user=www \
--group=www \
--prefix=/www/webserver/nginx-1.17.7 \
--sbin-path=/www/webserver/nginx-1.17.7/sbin/nginx \
--pid-path=/www/webserver/nginx-1.17.7/logs/nginx.pid \
--conf-path=/www/webserver/nginx-1.17.7/conf/nginx.conf \
--error-log-path=/www/webserver/nginx-1.17.7/logs/error.log \
--http-log-path=/www/webserver/nginx-1.17.7/logs/access.log \
--http-client-body-temp-path=/www/webserver/nginx-1.17.7/temp/client \
--http-proxy-temp-path=/www/webserver/nginx-1.17.7/temp/proxy \
--http-fastcgi-temp-path=/www/webserver/nginx-1.17.7/temp/fcgi \
--http-scgi-temp-path=/www/webserver/nginx-1.17.7/temp/scgi \
--http-uwsgi-temp-path=/www/webserver/nginx-1.17.7/temp/uwsgi \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_gzip_static_module \
--with-pcre=/root/pcre-8.43 \
--with-http_sub_module \
--with-http_geoip_module \
--add-module=/root/ngx_http_substitutions_filter_module-master \
--with-openssl=/root/openssl-1.1.1d
8 b+ s# s& N8 `$ c( f编译 make" B) i9 i7 Z5 |1 U7 v4 X0 E
安装 make install
+ m: }& M( |% M |