下载需要组件
* r* H8 R5 E9 ]* x3 K0 u( w8 r4 m$ ewget http://nginx.org/download/nginx-1.17.7.tar.gz
3 ^" D8 r/ R7 F: V- p2 ctar xvzf nginx-1.17.7.tar.gz
; h. S$ u2 B$ A7 ^# m4 y6 \8 n8 x3 U5 H* w. P2 Y" T- Z( ^
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz& c, T$ W% z; y3 c- K
tar xvzf openssl-1.1.1d.tar.gz) Y2 |* h: @. B. Y$ N) b+ u4 m; Y
! [$ T4 x. \/ \4 _8 jwget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz1 c) g! T. K4 y& p
tar xvzf pcre-8.43.tar.gz
: V( s5 E5 p: M% H. j. w
* U# K7 V6 K& n0 P+ ^1 wwget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip' }6 Q/ x9 C. d& K5 ]
unzip ngx_http_substitutions_filter.zip& i3 I) l g. s, z- e! n& h
% B" K: G# Y! l) w: Y: `* c2 L+ scd nginx-1.17.70 r2 w1 W5 W) t$ S4 }! l- \
! g7 W" \+ X- [; y
1 c. M" p, J+ Q$ y4 f5 ]/ ]$ y" p
配置文件
2 F5 \# R, S1 B' [[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 2 m* P9 {. `& R& s4 T
编译 make
) H) d" M- y; W" o! Y1 k: N2 v安装 make install% T: j# I7 {- P! H) } ^
|