话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418 _% Y% k' s0 \; R. U5 R d/ h
下载需要组件$ t4 v0 A! k# L) d
wget http://nginx.org/download/nginx-1.15.9.tar.gz
3 N8 M$ I7 O0 p( W. {tar xvzf nginx-1.15.9.tar.gz
3 G, s4 w8 O* _9 m$ s9 \+ ]
, t* ]# F# \ T0 swget https://www.openssl.org/source/openssl-1.1.1b.tar.gz5 W3 \. `& L/ _
tar xvzf openssl-1.1.1b.tar.gz
6 d6 D0 Y0 u9 U; P
6 D; W: j& F9 C* o2 q" Uwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz8 n5 R4 @* z2 }5 V4 ~% W* B
tar xvzf pcre-8.43.tar.gz
V# e1 e9 F+ e. W! o: q9 T
( Y+ ]- x" l @$ @/ Owget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip k [, l9 r5 W+ i7 p
unzip ngx_http_substitutions_filter.zip
6 _. z# G% D# m8 I) s
/ M! ?3 K% P+ Y% b( E+ _; Tcd nginx-1.15.98 T+ |8 k* r" `, N' d
3 {* I% Z( \8 s5 [配置文件
" ^; t: ~( u" f4 T+ W3 l
! q# J. J0 c+ x2 H# h0 j& x8 f/ J. h1 l
[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 p/ e Z7 `2 a% w
编译 make2 }" U5 P% D! H) s0 ~& @' |
安装 make install' F1 i7 z* v8 S B5 o
% ? \3 U6 H' C5 A% ^
其它的启动配置文件找度娘。
8 z3 ?$ `+ A! h& r8 _4 k |