话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
/ T8 d' q9 }/ r5 x下载需要组件5 x' {4 K, j# g. @( Q" T7 M( s
wget http://nginx.org/download/nginx-1.15.9.tar.gz- w, w" n6 V& @4 f4 [4 C6 G5 z; g
tar xvzf nginx-1.15.9.tar.gz
% ]/ `5 I4 R' y. t7 O2 `' |# o9 i& i; U4 h% Y0 E
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
* R( j- ?( q. w9 F% \3 a3 ]tar xvzf openssl-1.1.1b.tar.gz Q- p) q7 Y$ ~+ U
! m7 U `# `; F a* O" nwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
1 ^ k; `4 i% B. I/ J. E+ @) \8 X: Ltar xvzf pcre-8.43.tar.gz; N- J6 M' u' g! s8 @- p! V
8 a z( r6 ]7 H |, n* m& M% jwget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip. P) A4 r) i/ x# V
unzip ngx_http_substitutions_filter.zip: P% J% A) i7 I8 e" I6 J3 z L/ G
: D$ r4 W7 _' Zcd nginx-1.15.9
7 m' p$ H2 l0 v: D; s% e
& P! K g) l% S5 J8 c# S; l配置文件
7 h# B# ^" N( r O1 X8 C# [7 P! F" Q; l! q
6 Y& I0 F1 c4 j7 V E# G[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
9 R5 @4 f" A( q6 v8 q }) E: w编译 make
. p/ c3 F" s* \' W安装 make install
9 b3 o! z6 L2 @) d$ \7 N4 Z4 P& J) s% j
其它的启动配置文件找度娘。
% `# g. U7 f/ Y |