话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
( K4 R( }" X$ `! N, q; N下载需要组件
! U# ]+ a. ?; F) h! }2 ewget http://nginx.org/download/nginx-1.15.9.tar.gz, X8 d$ q, r1 w
tar xvzf nginx-1.15.9.tar.gz
2 I0 S0 q7 d! i
% {% `# ]4 g7 m8 q, w7 ?6 T$ m( fwget https://www.openssl.org/source/openssl-1.1.1b.tar.gz' j6 A! u3 Q1 c/ }
tar xvzf openssl-1.1.1b.tar.gz8 A$ s8 [) ?4 I% u+ T; S
3 ]4 h$ [( P% jwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
: d: y" a H( L6 etar xvzf pcre-8.43.tar.gz: _8 t6 ^, W. {" T) e4 C6 v
6 {5 `1 P3 Y2 Z
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip) N7 p0 W, e' w% n R) j
unzip ngx_http_substitutions_filter.zip
( n& E! O3 F- c5 j! n" r. S; ?3 r: x% ^1 z; d
cd nginx-1.15.9
& }4 @5 S7 J+ a1 z( ?% w2 Z* x4 V, F& r( ?! v- G2 X2 V2 O$ {
配置文件
% L% S$ U0 B; m) x% U9 r8 {7 X
' D; O( P- N0 r" D2 v
[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 # A% H" W, Q# _
编译 make0 f$ m* r1 L# B% I, q% s; B2 X1 q! F
安装 make install
! _2 c0 b. c) V n$ G8 \" X* J ? N. T# T ~
其它的启动配置文件找度娘。* C! z! Q( d9 U9 Y
|