下载需要组件
- H/ V' x% k1 t# wwget http://nginx.org/download/nginx-1.17.7.tar.gz' d) g: ]" X% \ u( Q6 m C' l9 }* ^
tar xvzf nginx-1.17.7.tar.gz* p$ n/ g1 A4 D
$ t; r& p+ I% |0 @+ Ewget https://www.openssl.org/source/openssl-1.1.1d.tar.gz' ?' |9 L% I. p* Y9 ]3 o
tar xvzf openssl-1.1.1d.tar.gz
: s% L4 j( P$ u, z: `2 `$ y/ `; V9 V- s7 S( N7 A& i; ?
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
7 D4 @) i( Y" o3 s5 B: mtar xvzf pcre-8.43.tar.gz7 S; W8 |+ b) w8 t; B5 p6 k/ r4 k! h% j
+ r( c/ c; _6 g$ a8 G1 X" _! x
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip. u- h* v! A d, E
unzip ngx_http_substitutions_filter.zip
k* j' y' o7 j5 F
% E) g6 A! x# d- W2 Scd nginx-1.17.7$ m" v1 L7 u( p# D- S$ ?
- Z, H J0 v; k5 [0 C V: a* n* W4 i+ f8 m* F- J
配置文件
( e: W$ p6 a' K% L! B- X( e[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 3 R+ Y O+ b4 o* r
编译 make1 ~, T5 `1 w5 I/ J
安装 make install
% ~( M1 R a# C2 F |