话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
5 k1 C2 a5 Q8 w0 A1 H7 y下载需要组件% P- X9 n" @* G, f2 K
wget http://nginx.org/download/nginx-1.15.9.tar.gz) P9 c: E" w) D4 ]0 v0 @6 q
tar xvzf nginx-1.15.9.tar.gz
7 h" q# Z7 }/ ~9 z) }0 E
: B0 d" k/ n2 ^9 }6 fwget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
+ u6 ^1 C ?# X6 ?tar xvzf openssl-1.1.1b.tar.gz+ d% J3 P& o' G8 Z- N8 e
% y- {5 Q2 d7 x! c6 x! W
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
# S5 L9 n: N% T _/ Z" b9 ytar xvzf pcre-8.43.tar.gz7 e4 g5 M ]) v
* i! l8 L% {8 m2 I$ G4 |
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip" x/ s7 l4 j3 [9 {/ o. u" c" J- o
unzip ngx_http_substitutions_filter.zip# Q( W6 ?7 o- d+ I( N
) T+ {0 m) u c* B9 Kcd nginx-1.15.9
; f) R6 Y0 L3 u8 A
3 R% n3 G8 ^) J9 p6 }5 i- P配置文件' Z u# P$ o1 O5 n* \( }! B( F# I
" a# Q' B8 f# J4 }9 P) I6 t- S
# V D8 _6 H5 R% j[Shell] 纯文本查看 复制代码 ./configure \
--user=www \
--group=www \
--prefix=/www/webserver/nginx-1.15.9 \
--sbin-path=/www/webserver/nginx-1.15.9/sbin/nginx \
--pid-path=/www/webserver/nginx-1.15.9/logs/nginx.pid \
--conf-path=/www/webserver/nginx-1.15.9/conf/nginx.conf \
--error-log-path=/www/webserver/nginx-1.15.9/logs/error.log \
--http-log-path=/www/webserver/nginx-1.15.9/logs/access.log \
--http-client-body-temp-path=/www/webserver/nginx-1.15.9/temp/client \
--http-proxy-temp-path=/www/webserver/nginx-1.15.9/temp/proxy \
--http-fastcgi-temp-path=/www/webserver/nginx-1.15.9/temp/fcgi \
--http-scgi-temp-path=/www/webserver/nginx-1.15.9/temp/scgi \
--http-uwsgi-temp-path=/www/webserver/nginx-1.15.9/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 \
--add-module=/root/ngx_http_substitutions_filter_module-master \
--with-openssl=/root/openssl-1.1.1b
# H; C1 G) I8 \5 M0 w5 |6 T编译 make
& N- E% _$ B$ E/ c3 x% n2 j( q安装 make install+ V: G1 s7 B. h8 Q9 m* ]# Y! l6 ]
% [0 x3 u* o# ~/ S1 {4 x其它的启动配置文件找度娘。 |' x) `, ~. [" P
|