下载需要组件' N. ^" P; }$ c: n3 D
wget http://nginx.org/download/nginx-1.17.7.tar.gz
' b5 H* l; ?; W5 ctar xvzf nginx-1.17.7.tar.gz
7 p5 T% N9 `1 m7 u6 }5 u4 r& N
: c+ {. ?+ M' lwget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
, P: C+ R. F/ J' C1 E) N/ ^+ S2 Ttar xvzf openssl-1.1.1d.tar.gz
; k* k0 c, u5 M6 `1 z4 l1 [9 S8 v3 K
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz3 B& A u- Q7 E7 G2 y5 `7 j5 u
tar xvzf pcre-8.43.tar.gz
`% U+ m Y) Y: H) P4 h4 U Y% F# m1 g( L/ T' M0 s
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
" V. _! a8 A' c7 `5 r$ J$ zunzip ngx_http_substitutions_filter.zip2 E$ w* }& o0 o8 ~8 q
7 g4 n3 e! c; U& i) {( Vcd nginx-1.17.7" K# T$ i& b0 z1 x
, m9 E2 U7 q) F' Y8 V# R- J2 s1 D
) i# }" Y9 z' W$ d配置文件2 K; W& r: v5 X$ K& i; S! d
[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
5 O! a9 i: }9 m, j编译 make) b1 X" a' a" s( I# G
安装 make install
- w" {# p: _ {9 w3 c |