话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
& c4 T: B- |1 w- A C" l下载需要组件
3 T4 O2 \+ k( a5 Pwget http://nginx.org/download/nginx-1.15.9.tar.gz$ W2 m* J7 r* C# |( K
tar xvzf nginx-1.15.9.tar.gz
1 w! w1 w! W1 A
6 v" D1 z/ b$ b4 Pwget https://www.openssl.org/source/openssl-1.1.1b.tar.gz' q8 \7 c" `1 b% u1 {9 l' i
tar xvzf openssl-1.1.1b.tar.gz4 o7 B' L; C, ?8 w
5 k9 J+ c E; D1 z+ hwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz; l! [/ w; A/ _
tar xvzf pcre-8.43.tar.gz, _8 b$ e4 H3 Z5 ~
( E3 L, J8 M' M/ w: \5 ?
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
; T/ y a6 W( ]7 Punzip ngx_http_substitutions_filter.zip5 \/ p& O1 F( F) `# f
3 f3 x% `1 N8 S* S% M! ?
cd nginx-1.15.9$ D& ] `. B" C
; q( G! h7 n, T6 y( Z+ A- C5 M. c配置文件
9 G0 J8 W! S; P G& h; F6 }+ ?6 X- v% g( B% ~, H0 q$ }
1 G, |# y8 o8 q% _# o# I" 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
% `! p. O( C$ b; ^$ B编译 make; \ B! P1 q2 U3 {
安装 make install
7 M9 Z: g" e( E1 H4 Y1 z6 }( E7 w0 @
' ]1 y. c f& M* d4 d1 R其它的启动配置文件找度娘。, g5 R1 w& X9 U( w
|