话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
+ p0 d. r$ b3 b, H6 e下载需要组件1 T9 k! }0 i4 o7 F) c' Y& f
wget http://nginx.org/download/nginx-1.15.9.tar.gz
5 ]( v$ p7 Q# z" Btar xvzf nginx-1.15.9.tar.gz
% _0 f9 v/ S4 I8 Y1 Y) D# u5 A. ~0 g4 f. P& y1 n$ z
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz# v: Z+ t) z1 ^/ W4 N+ j) m
tar xvzf openssl-1.1.1b.tar.gz
( S/ s. U+ D" z( E) R& N2 t( [9 e/ G
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
# o v# t$ |7 w9 n, I; gtar xvzf pcre-8.43.tar.gz$ ]+ \; w8 S* i0 S0 R" S# P( A8 A- b
( ]6 j3 u* z% n% R. D; ~
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip. x) U1 m4 E, x- r6 Z
unzip ngx_http_substitutions_filter.zip. F) i! x/ E2 g. p
, D9 X9 l: p {* M* V: f
cd nginx-1.15.9
. j6 I6 y& E$ I1 n: `* |% w# p0 v) B+ d" Y) A& V! f- P/ i- d. [
配置文件1 U' v. G* M. J" ^2 p
' f1 Q/ p5 o' F: |1 V, s, s
Z: L6 [& b u- y5 T4 j
[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
- B( o2 f' K g, e4 ^) G; z7 H) @, S编译 make( E/ X% Y" i- W; }& N+ O- n0 o1 Z
安装 make install
* B; x* B+ O* ?4 g/ e/ X D( f5 g3 D
" @3 V$ c) b3 t其它的启动配置文件找度娘。5 U2 ~ v) P8 E; g" `* u% r! I
|