话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
! F7 D2 ~+ l+ ?* I7 Y; e下载需要组件
. I" y' F8 L* K# \+ Swget http://nginx.org/download/nginx-1.15.9.tar.gz. j: x, x5 E- V) {* F9 {
tar xvzf nginx-1.15.9.tar.gz
9 a, Y' ?' b+ C7 f
5 v5 F3 i5 }7 a$ a& Qwget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
! F/ H) T6 `0 c) {9 Xtar xvzf openssl-1.1.1b.tar.gz
0 F4 M: b2 ?& K! ?: K2 @ a6 P
% p1 p6 {$ W+ E+ twget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz! ^% l2 Z# ?! x9 T9 j0 r
tar xvzf pcre-8.43.tar.gz
' F9 W$ ~! \& n% A# _, K$ x8 W
( C- F- \, T3 A: y! z' dwget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip1 k8 J& H9 J9 f& |
unzip ngx_http_substitutions_filter.zip
2 p9 y' H7 d9 @2 r% {, t, G
5 S7 G: @1 k' pcd nginx-1.15.9, L! t# _9 o$ _: H, p0 [; l
d5 a$ m* X5 Q
配置文件( C6 U: y7 F5 p. [" C0 C3 X I
! Z2 G% U0 k3 `7 b0 o2 \, ~
) Q' {) t# u- z: Y# T
[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 , L, [' j7 E5 D$ e+ p0 b+ v4 ^
编译 make7 O3 ^, D0 q" `( f/ }
安装 make install1 ?/ I, c% z/ j; ?" L$ L
: x, j, b% z2 k6 {$ x
其它的启动配置文件找度娘。
+ b* C6 C+ \, }9 J# e {' D |