下载需要组件
* S" u8 Q9 O. \7 i$ mwget http://nginx.org/download/nginx-1.17.7.tar.gz5 D& a6 |# u& K+ I4 @2 M
tar xvzf nginx-1.17.7.tar.gz
, H4 o! P. p* U# c+ c
% {: C9 Q& x* R# Xwget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
5 j1 q9 d( C9 ~% ~" n ztar xvzf openssl-1.1.1d.tar.gz# S+ `: L9 T8 C
% n, \+ S) M3 b# c# g
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
5 T5 e* j3 U. D+ K! Y& x" G. A+ itar xvzf pcre-8.43.tar.gz
9 J9 A5 o! t+ p5 S' A$ F6 j; p6 g$ |5 C$ w3 s' u) n8 F
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
C" E( X; F# [+ H& zunzip ngx_http_substitutions_filter.zip
$ R* i2 c: }: }6 O+ f# F2 A1 T/ ~+ l3 O" c* P6 o" l) G
cd nginx-1.17.79 c2 I! O6 ]1 z/ }8 l/ z! n
, D2 J7 d( F/ \% o- \
& A" _7 G6 j+ t: N+ l5 r配置文件, r8 Z+ P! Q* A. X
[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 h# z4 v* ^+ G. L/ W) V- I编译 make0 ~) ]9 u" A* D: \# S& V
安装 make install K. ]# @! E) [/ Q
|