下载需要组件
$ X: p& [4 [5 C* h) pwget http://nginx.org/download/nginx-1.17.7.tar.gz0 C+ a: `7 Y1 M7 H- d$ [$ L' i
tar xvzf nginx-1.17.7.tar.gz
0 f1 T3 }# X1 X, Z" [. V s- l2 T- g6 r# U* J5 G+ X
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz F8 Z5 @' K6 Q. x
tar xvzf openssl-1.1.1d.tar.gz
3 G: a: O# C+ Y! o, [' N @/ n$ F4 b; I) h
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
# T* K1 L" _0 T5 ~6 etar xvzf pcre-8.43.tar.gz
6 \, R: l3 r( Y8 G
* H- S% n" n3 h! c! }2 d9 Pwget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip- v! l3 O; R$ z) i4 j; O- X3 |
unzip ngx_http_substitutions_filter.zip: R4 b, k$ S7 X' J4 F+ X! Q! Y
7 O R. T1 q, h: B, X! hcd nginx-1.17.7
7 z. K r% R( J A/ r
8 ^/ l, X4 l! l/ G ]
: L3 K& G d0 B: ^3 i配置文件
9 N' }9 o; \5 I7 Z* N2 M, n[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 / o, Y. u4 K8 W( v" a' c
编译 make3 [' k& v- d D L! J
安装 make install r9 D' D5 _+ j; V/ X6 B( ]! m$ C
|