下载需要组件9 E# K, V7 o# W l' O. k
wget http://nginx.org/download/nginx-1.17.7.tar.gz% o. G7 \2 p7 s3 \
tar xvzf nginx-1.17.7.tar.gz
( }& y- A* @. m% S
7 b) E# e% N4 { Kwget https://www.openssl.org/source/openssl-1.1.1d.tar.gz$ n# @8 M7 x6 a7 M4 g
tar xvzf openssl-1.1.1d.tar.gz
+ m( C- V: p, N& c6 K5 {2 K* ~" j" K, W5 ~
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz7 i4 e1 ]! X( x! h: L& K3 \0 U
tar xvzf pcre-8.43.tar.gz2 f N5 Y9 C$ m: i4 D
% W; i( p, N0 |1 x. ?3 Qwget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
! D1 `4 P! J8 E/ qunzip ngx_http_substitutions_filter.zip( T) [+ \# T7 B. a/ Y0 Z9 N
6 z2 Z4 R7 o2 k7 h4 T; Pcd nginx-1.17.7
& ^/ N* i1 `; w' R! @
' }- Y" B: m- m7 N/ N0 g5 z$ r* E: Q4 e/ m3 J9 L% J! L
配置文件: p( V6 `4 \' Y6 e" j0 m
[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
- r; X' C0 f+ y3 x& v编译 make; G( b; P* S* _/ t' q. a
安装 make install
/ b: @2 ]: v7 w |