话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
1 G! Z8 _$ J- o# t6 k$ e下载需要组件7 e& e5 c3 t! Y, c0 B7 |" \
wget http://nginx.org/download/nginx-1.15.9.tar.gz
. F+ s4 }) ^2 l/ z0 ktar xvzf nginx-1.15.9.tar.gz$ J" R' ?/ G/ ?3 W
: ]( k, i. T: n) b7 v; q0 K* u& ewget https://www.openssl.org/source/openssl-1.1.1b.tar.gz) S7 O) e( K4 H, n( W) b
tar xvzf openssl-1.1.1b.tar.gz
$ q5 u, ?: w# v0 t
0 s7 x, o: y( Z( g3 d9 {) d3 ]4 b7 zwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz6 f# |7 O$ J4 p
tar xvzf pcre-8.43.tar.gz
3 H! f) c1 M- T" c9 F* Y, |, ^) Z0 U1 h$ J( [% Y
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip- y9 Q5 `+ [2 N% I
unzip ngx_http_substitutions_filter.zip# h* N, m% ^$ b' m9 k; s
: ]5 I8 M( B* ?& r6 T, U9 p, K
cd nginx-1.15.9
1 M# M1 B- t* t1 I6 X
, ~: s! \4 _- ^9 l5 W! ]- B配置文件
& j; v5 Q$ g. z' y
$ `" w( I, a3 A) m/ @0 P) l+ _* \5 I. O4 ~( p- Y s
[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
3 k* {' b, t# W$ k' L$ ]* h编译 make, k9 R" @# \3 f0 L* y3 r# R
安装 make install
2 j: A' n. \ u. q& X6 T0 |5 K/ E0 `. l6 j, @& u |7 ]$ @) O7 g' [
其它的启动配置文件找度娘。
y7 r% ~! I0 d5 Q U! @7 Y/ R |