下载需要组件
' O2 u1 k7 Y! M/ l6 ]$ Hwget http://nginx.org/download/nginx-1.17.7.tar.gz: [" [% P3 {" T {: T# `( [
tar xvzf nginx-1.17.7.tar.gz6 D6 U }; @+ B' x8 B, D
- G' T7 |( y6 Lwget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
1 r# d1 |; X# t( ^0 J$ s' w! m( Mtar xvzf openssl-1.1.1d.tar.gz
" p* ~% _( X- g' A- w6 M
: R. M2 F$ a1 ?7 @wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
I9 j5 J/ G0 x( O# Ftar xvzf pcre-8.43.tar.gz# ], ?# y, [4 K$ z; q: m' D/ W
7 o' V6 _9 O* l: i+ N2 `0 {wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
. g/ H# a# L4 [1 `5 ^unzip ngx_http_substitutions_filter.zip" `7 ? X! ^, g5 a) w: n Z; a* o
! z; a* `) q( Lcd nginx-1.17.7
5 C# p I6 _. F/ F9 Y. I& p3 A( ^; x! @8 X" }4 l% i
" |' w: ?7 Y* L, g
配置文件
" b" h+ ^+ b) y% y( o' A2 [[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 P" p% L% v6 R v& m2 v2 z
编译 make
( C! N5 U3 o* K' v- A6 A安装 make install) P4 G9 U6 N E* B( \- Q# p6 T
|