下载需要组件7 H: y0 ^5 }! l7 z
wget http://nginx.org/download/nginx-1.17.7.tar.gz6 l* V* e( y" b0 g
tar xvzf nginx-1.17.7.tar.gz% \8 ? g+ b6 C3 s. j+ w- B
D$ C& R3 G B, Q
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
. s t3 T& D8 v+ ~8 [/ dtar xvzf openssl-1.1.1d.tar.gz+ A8 V! m' V: `% g
* @) n8 f) s8 Kwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
3 n: Q0 t2 l. o }4 \7 utar xvzf pcre-8.43.tar.gz7 c3 ^, M) F# W2 S, I, ]
3 P* m& f' R$ V7 {8 zwget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
; B N5 L* b/ n' @% ~unzip ngx_http_substitutions_filter.zip9 X% V1 n, Z) f4 k3 m- s
/ N7 H. Z% L) F1 W! H0 ?cd nginx-1.17.7
+ L% y7 R% |- u. ?- g w6 W9 |$ f" ^0 d' n3 h5 A, J+ O+ F
( f" H) k9 P: M+ z7 l6 {/ X6 Q; i配置文件
6 A' E9 S% e! q, u" 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
( e, l: \5 P7 {: L编译 make5 [3 B3 g: @" M {& w: v& V
安装 make install
4 w& t' G: _0 L$ O" w% z8 g |