话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418* Z% P( ^, w1 f1 y' N
下载需要组件) ]- `1 ]+ }, A% I
wget http://nginx.org/download/nginx-1.15.9.tar.gz
# c0 n9 @/ d! O5 G6 ?, r7 k' ltar xvzf nginx-1.15.9.tar.gz% U$ @9 `' d B( k( e( u" b
9 v& }! }' T& Z ]) ^, @3 k/ X* a9 v
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz# }0 |' w; Z3 m9 o/ L4 f
tar xvzf openssl-1.1.1b.tar.gz
) p- e6 b. M& Z! _: g( s5 T A3 \ D# \: ^4 M
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
. F) v7 R% j6 e6 A4 V1 y; F# ftar xvzf pcre-8.43.tar.gz; x7 Z, W# D; ^6 D; @& B
2 ]( P8 e$ u; S0 ^
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
9 k* e* L2 A8 Uunzip ngx_http_substitutions_filter.zip; w3 s! h1 n) t) T) U; O% I. x
9 H& T) I0 |+ X* E
cd nginx-1.15.99 {0 J5 S! C5 `! Q% T- f* Q
$ ?. A; @. C8 T# S6 q j+ K
配置文件
8 Z! F) s6 _, m5 }9 M1 o8 J0 L
6 M: v$ c/ V( S
4 g- C0 O8 e1 h7 c3 h5 i$ I8 ~3 F[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 0 q. r+ M0 }" ~9 U! t+ q* N( O
编译 make
, o6 r" N- V( Z安装 make install
5 ?5 M6 l, s& d# K: R) u: r
) a, a9 X$ W Q/ x# q) C/ s其它的启动配置文件找度娘。' C; [2 v% x k7 K
|