下载需要组件$ D# X" `) v/ m& v
wget http://nginx.org/download/nginx-1.17.7.tar.gz8 s, S) ]! }+ h# A
tar xvzf nginx-1.17.7.tar.gz
( |* d( T6 s1 O8 Q% ]/ S/ j; `' c( G7 T: S' K
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
8 @0 q7 k3 T2 E7 ytar xvzf openssl-1.1.1d.tar.gz
2 h, q' ]& }* W& C6 _( Q
0 e* I, p0 n8 R3 Q3 A/ G6 t; Kwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz" A/ ~$ s& ? \9 \ o
tar xvzf pcre-8.43.tar.gz) G) `: R* ]* R: L j. L: r
1 c, M4 Z3 r7 y* m/ ]wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip2 m% Q: j( T& K2 P
unzip ngx_http_substitutions_filter.zip
6 Z5 i2 ^4 M! ^2 Y+ d
$ |6 O" F# p( w n; ^: M! [cd nginx-1.17.7
) b4 X# t) d r6 |
" H: c+ ?* Y: Q n4 o& R
% a/ _+ ?; E% y; m$ j' ^# U( f, |配置文件
- {# R- g5 a' |, G/ X" ]; H[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
- C i% c; I1 H& s; T编译 make: m/ h- o- {0 X0 Y0 D9 P9 ?' Q! P; c
安装 make install7 j. t: r; K" }
|