下载需要组件
2 o d( u0 ^. f/ x1 l# ]wget http://nginx.org/download/nginx-1.17.7.tar.gz, K- d3 P6 `6 d; h8 R
tar xvzf nginx-1.17.7.tar.gz- b1 m4 M1 R$ R% ~8 O2 }
1 p4 O& {5 y$ ^$ K" p; k; }0 @wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz" `, ~0 T3 q; ~ o
tar xvzf openssl-1.1.1d.tar.gz
i! E& j: o9 ^! v2 ^, G2 Z- r
6 K( l) G+ o3 @$ M' z$ Kwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz$ s5 Z7 \2 Q( ?7 e
tar xvzf pcre-8.43.tar.gz+ _9 @4 N$ f7 f8 {! r
* y8 Z' G* V1 z i! l6 {+ P" Kwget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
" g# g" @0 s! c& qunzip ngx_http_substitutions_filter.zip( {/ C& ? R: o0 f* e
: Q4 u# K ]9 p; y4 `* Kcd nginx-1.17.73 Y3 C# w$ A& E% m0 D5 N
' Z# O5 f. L: [/ _4 J" A+ D
# F+ W- {& p8 N$ l( z3 p9 X! \配置文件) g8 N [ [+ v( A; W1 U
[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 # V- w K0 M+ |" w8 \) c. j# Z' K2 g
编译 make
9 I, }1 \: i2 e5 ]1 F安装 make install
# x# p) _; F- A4 n9 Z |