话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=4188 ^6 n! a9 _+ R' g/ t8 V$ S
下载需要组件
$ W) O. }" q, W# r% @( lwget http://nginx.org/download/nginx-1.15.9.tar.gz
( j3 O7 A$ I2 i7 x- d. Ytar xvzf nginx-1.15.9.tar.gz# d4 ]8 x/ J: e4 h6 b# \
6 ?8 d$ k, y1 {; ^) e- Y. iwget https://www.openssl.org/source/openssl-1.1.1b.tar.gz8 ^' O' a" _1 f% {- R& L
tar xvzf openssl-1.1.1b.tar.gz
" S" z& d/ C7 U$ n
- {( Z8 `5 a0 ^( @+ A( F* v+ P: K# Vwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz& H+ `; z# K Q2 y0 @5 y
tar xvzf pcre-8.43.tar.gz% R% u+ p. o' F" ]4 H1 e) u* `
' c. b {. o- x$ w! T
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip3 E) a! R T7 N, q2 L4 A' O8 ?
unzip ngx_http_substitutions_filter.zip
) S4 ^& I. ^+ Q5 a' f5 b/ G* i/ g7 n( j4 ~
cd nginx-1.15.9
6 @+ U; L$ l, Q* |% |- F* E4 f) n) r
配置文件4 |! u$ s; j* l$ k5 K. T$ A0 ~
( G2 _' R- Z I+ P" \% p# m, b6 C. ^: Q+ M* @* e( }) x
[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
# u/ c% S% R* N- X2 c/ |+ ]1 F编译 make$ I# |- ~( ]) M, N* t W
安装 make install2 i+ r8 \3 j6 e5 U! `& s2 [, N
. I+ T, m6 }" }3 i. X9 P其它的启动配置文件找度娘。$ V9 u3 j5 j2 q4 `
|