下载需要组件 P5 S& ]* `7 Z! N$ O5 b
wget http://nginx.org/download/nginx-1.17.7.tar.gz9 F7 M$ [" D/ L5 Y% f
tar xvzf nginx-1.17.7.tar.gz4 m/ s) s7 J) |5 s! u8 b8 `$ Q) q) t# \
0 n6 [0 I# J7 M0 |( h1 M+ \& {0 ?% ^
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
7 K: S1 A. n) H0 `, ?! Ftar xvzf openssl-1.1.1d.tar.gz
# |7 z" P8 S1 {9 R
* w7 [8 w/ w4 e0 J7 f3 P. y7 P! cwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz0 J; b' @8 Q0 I- {+ u
tar xvzf pcre-8.43.tar.gz
4 j) @, [ }! l: Y7 `, t$ x, [; ]- Y" E2 v
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
* b0 N' }7 v- M& h7 w4 Xunzip ngx_http_substitutions_filter.zip" ]% _1 C1 R/ ~5 M' e
+ O% W$ E9 r0 j% C6 `, Y hcd nginx-1.17.76 h% S3 S% w3 E0 z2 t# t8 _
5 C" l/ x3 K4 m+ c$ e0 c" M, W* R6 N/ b
配置文件
~6 O: B( a, w: d' 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
% Q' H0 S: Q W! z U编译 make
2 i7 H- ~8 u, }# _9 f3 e% E安装 make install" Z9 q: k/ b3 f0 Z9 ]
|