下载需要组件7 h+ ?* X% I1 i5 v3 \
wget http://nginx.org/download/nginx-1.17.7.tar.gz
" g# F( |( O8 X& I( }% H# ntar xvzf nginx-1.17.7.tar.gz: z8 a) W6 R7 y# Q# Q( M" s$ R1 o
, p" v$ k" Q( [/ A. N/ ]$ q2 N
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz! |, x3 v0 m2 ?* a6 D2 j- h+ W
tar xvzf openssl-1.1.1d.tar.gz
' f/ d7 `( r& g* h1 _
; J" u; g' {6 k. t5 uwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz% [& m/ Q* p7 v' X( T
tar xvzf pcre-8.43.tar.gz; E5 E2 x& m/ }9 m3 M
9 p, p9 Z# P- owget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip2 j3 N4 f: ]# N; T3 `# y
unzip ngx_http_substitutions_filter.zip$ v, T9 E% H+ a( R" P) W$ Z0 `1 `) [: ?
/ {% P. I& d* i& Qcd nginx-1.17.7& J2 x. R5 a9 Q" Y- j I! J5 d
' D" p$ Z# t5 z" R1 q
3 V8 g0 Q" g; a( Y$ Q) V$ Q配置文件; W1 B' m, V. y9 S: P
[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 / L* t6 X- O8 z+ x
编译 make
9 J$ ]8 x2 K. o" `& H4 @安装 make install/ @4 k# K, M6 f) a
|