话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
7 O- m! T" n% f+ X, p3 X下载需要组件& U1 ?6 n$ s1 b, U6 i
wget http://nginx.org/download/nginx-1.15.9.tar.gz
1 v$ v& L: X/ J$ O$ s6 }9 ytar xvzf nginx-1.15.9.tar.gz
4 `8 {/ t t: r2 a$ j, p9 o0 S( ~1 S5 p7 J3 `
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
0 u5 I* |" s* s1 ^1 u+ p$ ttar xvzf openssl-1.1.1b.tar.gz! n* U2 P. ^) q# @8 ?5 J4 T
7 V& E' g8 |3 n$ \2 V7 }# t; M* P) ^wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
1 Q8 _/ I( d: @tar xvzf pcre-8.43.tar.gz
8 o: S2 Z# L+ z4 j
) }4 }! ^9 N: }2 ]: y$ M7 G2 Owget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip; a, ], Q' L! ]+ T- d
unzip ngx_http_substitutions_filter.zip
% p3 ?: V' w' _4 f' \' x) }/ v/ ?; W4 ^
cd nginx-1.15.9
+ K7 X8 Y: B! o" c
* W0 ~" @* d, k; m- b2 Y; t配置文件
~) W; l* E, m4 C2 _1 C- @2 f3 O$ u* r
! }& l. |: s% u9 C
; Z: D. U! D% _9 v[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
' f! i6 C4 W5 v( ~编译 make
3 C3 |9 t- e4 u& y% K o安装 make install
( j3 C1 H# g8 d' y8 I5 U3 d1 ~, i8 T- D
其它的启动配置文件找度娘。) F! y- L9 G, x! b
|