话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
, ^3 F/ @( X# l4 Q1 \. h2 p; j: W下载需要组件
. `( `, U4 P3 I2 i, Jwget http://nginx.org/download/nginx-1.15.9.tar.gz
2 s- g+ q4 j4 m+ z. A: v' }( wtar xvzf nginx-1.15.9.tar.gz
3 d' R! S! f( j% h) r' b0 u! j& e D8 C% j
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz# [- J# _- W* A) ~4 B
tar xvzf openssl-1.1.1b.tar.gz
& S8 a1 x n9 k& A. v; |0 m, i
1 v/ }0 f7 ]7 U4 ~1 P5 |* hwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz$ y3 y* Z# f0 f
tar xvzf pcre-8.43.tar.gz) f0 H+ L# W& E* H6 A" u: s
+ H2 l! S8 S% T" \2 k4 X+ X+ e
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
0 y' z0 s. J% J% t4 Funzip ngx_http_substitutions_filter.zip, N! x/ d) I" Y! Y
; [4 ]8 }0 X1 Y% v+ n& J; J
cd nginx-1.15.9
4 m3 B5 J _0 J8 i. C. V" h! ]" _
配置文件7 X! _( z3 L4 }2 j$ S
2 R) r k5 p0 k" K+ P" w3 {( F
4 s: F8 b; h" `* J6 w# Z5 M[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
+ ^( M: g0 ?. T7 A! Y编译 make
* N1 F7 T0 _3 s7 K安装 make install0 u/ @& U) {+ C# ^: x
* q+ Y2 Z5 @/ N1 Z6 \, q
其它的启动配置文件找度娘。
- S a# S1 R1 C8 G7 Z% F5 ` |