下载需要组件) \! y/ R, z1 [ q/ p6 @: _9 k
wget http://nginx.org/download/nginx-1.17.7.tar.gz7 F: [0 u }9 v% {' Q
tar xvzf nginx-1.17.7.tar.gz
1 _0 M, R7 }% Z' f( Z+ u' \7 v; F
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
) u; U( y% T; P. z# mtar xvzf openssl-1.1.1d.tar.gz
' ?6 }' P4 G* c8 C4 E' o# m
& v; e. v0 g8 b# P2 twget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz$ \# z ~9 ~9 B5 [5 a: [4 O
tar xvzf pcre-8.43.tar.gz4 ~9 ?1 @: L0 `5 @9 v
7 S, {# j( {& n( B4 C' Z; Ywget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
( D) c$ y" G7 Q( F" j4 B; @; u/ nunzip ngx_http_substitutions_filter.zip
$ h0 d% \9 U. S5 O1 J$ q m* E% B/ h1 m" }# B: \9 M
cd nginx-1.17.7 `2 q' Z7 @! _3 j. d+ A7 G/ [4 { z
% [) H" |* l+ W8 P* b2 x9 n5 g( @ D b$ b% e5 s
配置文件
3 [. C- N) @, T) c: O[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 Y: D" F; `2 V
编译 make
) ]+ d2 j; U( l安装 make install, [5 v4 I' H" u/ O8 @7 ?! }
|