下载需要组件
0 X* ` R$ K( s& ewget http://nginx.org/download/nginx-1.17.7.tar.gz
# T; Y4 t5 ]% w. z0 R4 Atar xvzf nginx-1.17.7.tar.gz
( R E* ^3 Q" q/ H2 x
. M! I# c: G1 D, {% @7 P' n ^wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
. x5 I; i" [/ V! m: E7 x6 ?3 qtar xvzf openssl-1.1.1d.tar.gz
4 G* h9 _2 d- D
6 a, s0 n2 j% _6 X7 L3 S; f7 }1 p' lwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz U( V2 |& ~' k
tar xvzf pcre-8.43.tar.gz+ `: S5 ?: H. G$ N- i1 ^! [
7 f4 e+ ~3 g4 ]# r" hwget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip8 u2 l) y4 h9 g
unzip ngx_http_substitutions_filter.zip( \1 k3 M! P& z" b+ @9 w) y% R& v
* b) S; a& o, \- a u
cd nginx-1.17.76 a" G5 u9 K2 D5 M1 c2 `! u
y: d2 E( `8 u3 \
" \$ N6 R7 c7 x: y4 l- e8 e$ x配置文件
: Z9 J; K5 o! k; d* X7 b4 }[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 ) D6 I: R7 R z0 z! B8 L
编译 make
+ P* ~* w# u, u: B/ g4 R安装 make install
9 o; G) F6 h) J3 V; C& b8 E |