话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418. q' J6 O1 Y) q6 Z9 F9 m% I% B
下载需要组件
( {% K. Q7 l8 W* T6 ^2 [, fwget http://nginx.org/download/nginx-1.15.9.tar.gz- \7 ]) D/ W4 E! E; J
tar xvzf nginx-1.15.9.tar.gz
9 q4 ?; S; M) W0 P5 ~7 O' Y% |& e0 Z) R( {7 [ u
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz) ]& O% `6 }, p' A7 o
tar xvzf openssl-1.1.1b.tar.gz
) V2 N6 q2 m4 x, F$ s: c( |& Z+ m) ]) z
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
9 ^1 ]& b- q- C2 v ~tar xvzf pcre-8.43.tar.gz/ }' |/ u# T' K# J
" z: J8 {9 h% p2 Q) z
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip; q8 u2 a1 G: V4 L' W8 k
unzip ngx_http_substitutions_filter.zip
$ X* |: o' z) A: l5 \& V- t/ C; }- r7 z% f9 y0 I( t6 c
cd nginx-1.15.9
% U' s/ J# Y' V! w, B
9 _$ ?* C9 Y" t7 H3 B配置文件% n7 ]1 s1 G! ]
6 H4 t4 K% I' O" m u9 W: X- [! ?4 H1 `
3 S K' z, Q: a R( ?5 [
[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
) X6 w% v! I% @8 p: Q- _- r编译 make
8 z6 g- M- A5 Y! }# ^4 N: d6 H安装 make install
_% S% m- C/ Q' ]2 q( f# e9 Y
: l( n7 f$ G `( L; N' ~其它的启动配置文件找度娘。7 j/ o, T7 r6 |2 K$ J; {4 |
|