话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418! w: q! u0 A1 B: i
下载需要组件
9 W6 n3 v+ J0 A$ W' f- Mwget http://nginx.org/download/nginx-1.15.9.tar.gz
# A8 p7 }6 l( j" S! Rtar xvzf nginx-1.15.9.tar.gz
0 ~ A( S( g6 B& s/ ], t0 E
9 c+ p4 \6 _0 b% U& Jwget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
4 V7 t9 |8 ^# F/ D/ T0 w& Ntar xvzf openssl-1.1.1b.tar.gz7 [1 Q G7 \" p c7 [/ u, T! t
- V: V+ W" S5 ]) {, c/ zwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
2 r2 z; Y: q9 n! V. ttar xvzf pcre-8.43.tar.gz
9 a. m, Z B' ]% z3 t7 b6 p/ N2 b8 V% v3 N% Z- i7 `; Y6 H# B* T
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip0 z: B- _# O4 i( ^* O
unzip ngx_http_substitutions_filter.zip. Q: n, D( u6 I
; H j D) C! S6 ^% z+ i* c% c
cd nginx-1.15.9
0 q& n, w* P- l% T5 {- P! u( |$ U
配置文件* C6 R% G3 e0 M5 K! [: x1 a
9 N6 }6 f2 w0 l: l
/ a0 t* A& p! ^: F" b[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 p+ @% Y' |, m5 O" @+ S编译 make
9 H7 F# v8 n8 \9 R! h7 b1 Q安装 make install
( O6 l0 ~' f% ]/ a# w2 ?8 r. K& ^4 ]! G6 p! |
其它的启动配置文件找度娘。
% W* C) _4 v; e; ~ |