话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
$ G: n4 ~8 `4 c3 u/ K! |# I k. I下载需要组件
+ ?! u+ x; C6 b+ a3 b, H: fwget http://nginx.org/download/nginx-1.15.9.tar.gz
! L' |/ P: V, q$ u2 Y3 Htar xvzf nginx-1.15.9.tar.gz" N' a O5 |% ^
2 c% G. S5 T/ ~+ N; V9 o1 ~
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz3 b8 Z, {, z8 s. e2 u1 R
tar xvzf openssl-1.1.1b.tar.gz9 A* B6 S9 f% T" ?( H9 Z) Y
1 ]7 {) t a& v# f; {wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
$ Y% X& U7 k2 ~tar xvzf pcre-8.43.tar.gz
2 d2 t1 N% ?8 N+ I4 T; b. |' _, r5 i% `) d/ q, P7 A6 ~
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip4 n9 ?5 _1 X8 D' W- T' f6 Z1 v
unzip ngx_http_substitutions_filter.zip4 @3 l! a ]. g) ^+ k9 J1 n, s$ `
7 S* m! r. S. ^% _7 j1 r+ Jcd nginx-1.15.9
" I2 m2 g) N) R
1 p$ H1 a g& l8 T$ `配置文件
( \; a' l; k0 b# [: O; D; E4 k! k/ a' \# O3 O& u
9 N7 M6 u$ \8 F2 z/ j/ u8 N# h/ \[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 6 B H+ E/ f# s1 r) m1 V
编译 make
) g- C c6 r. B: c u7 m F& N安装 make install5 W/ O1 p7 n* ]3 u9 n
; X% `2 b2 s" D7 ^8 M; \4 U2 S其它的启动配置文件找度娘。
- g7 ?0 x2 s0 O0 g' c$ | |