下载需要组件( N* o* {9 ~ _; F& V- V
wget http://nginx.org/download/nginx-1.17.7.tar.gz5 P( X5 B8 y4 e# @
tar xvzf nginx-1.17.7.tar.gz3 _$ a# A0 I; k3 X, x( U5 t
% C. @' q. h' f, ]( ~" {4 o5 Wwget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
( E* @/ t% v/ W6 Ntar xvzf openssl-1.1.1d.tar.gz' F. h/ {: f R# s# U
0 c0 M* D+ R' I6 Z1 {# G0 dwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
! o- { {* z# Q% i' o5 Ntar xvzf pcre-8.43.tar.gz
3 G1 I1 d- S# L: e- E% b. a' x! E$ w9 G& X7 W
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
5 L. K I* s' N* Q: T$ f" [6 V9 punzip ngx_http_substitutions_filter.zip1 z g6 h& ], g8 e2 C
- D. y1 M2 O& u, @
cd nginx-1.17.7) m0 N L' ^2 T# X, ^2 ]) s7 D
# Y. b* ~% }) E* \9 a5 a' C9 u8 W3 ?; B9 {# o/ P B: h+ p
配置文件0 Z5 J7 H8 U q8 c& k% L0 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
" D1 f, z" E# @6 ]0 _9 [* J& `编译 make
$ ]' X2 Y; r- A8 M+ `& b安装 make install8 d$ w; A9 t3 l" w. V
|