下载需要组件
8 \" q! K/ B/ Q" _# Qwget http://nginx.org/download/nginx-1.17.7.tar.gz
( z, G3 T2 X* t# N5 V2 ftar xvzf nginx-1.17.7.tar.gz
1 O% [) ?7 H# Y
; n1 b. F8 V3 c6 R- G; i* ewget https://www.openssl.org/source/openssl-1.1.1d.tar.gz! y" H) G/ s! ~
tar xvzf openssl-1.1.1d.tar.gz( y- I# R5 z& X3 y+ \
5 `( c, X! y$ W1 n5 D- O# a% fwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
. l/ C1 H- e' a; U4 }' |6 A# qtar xvzf pcre-8.43.tar.gz
; q, y9 B3 V# t! l0 ^0 @7 _ K4 T6 m
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
6 N" W) M1 S& @unzip ngx_http_substitutions_filter.zip, j6 R8 c" C5 |. f5 z3 O
8 [6 J$ Q! @) P1 C! Y8 I0 ?cd nginx-1.17.7$ {4 H3 _1 i2 X9 ~; a7 v
6 J( Q w9 N1 u* ~( V/ a1 G2 j1 I1 p# } z- X
配置文件2 L2 _! L0 m: 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
7 U Q X5 D- h- p' {* Q9 Z编译 make% U0 U5 `9 \' J7 F7 [
安装 make install
/ @( B3 v! @$ k8 G |