话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
# e0 K9 |5 H ^, p* B# P下载需要组件6 x4 }/ o; j& `* g; n
wget http://nginx.org/download/nginx-1.15.9.tar.gz
j0 ]: A: F1 d9 ^tar xvzf nginx-1.15.9.tar.gz- O: ~" [9 Z! i
6 n% [3 b9 [, o, H) _( lwget https://www.openssl.org/source/openssl-1.1.1b.tar.gz }' W8 u- S1 d. H: V
tar xvzf openssl-1.1.1b.tar.gz2 |" _' o3 r4 O8 g5 F
5 _+ v% o* q }: O7 U, p: f/ U! w7 X- rwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
3 e# P+ n5 b. l: W9 L4 T; D$ }tar xvzf pcre-8.43.tar.gz2 t, r$ J4 b2 [+ r
4 k8 E& H* A5 c. [wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
8 @* |' v+ B, D% ]- r9 hunzip ngx_http_substitutions_filter.zip" U; d% P4 i5 S: ]6 R
; o( P" b2 c" ^cd nginx-1.15.9
) J6 M' b7 W6 g) F5 Q, J: J, d4 K# k$ o# V0 r
配置文件
7 J' V" V6 v7 i/ B7 J; l# T" n6 Z6 o0 L/ R4 b d# a
1 ]$ n9 j4 H7 c6 R- H" R5 ?! c
[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
4 u: ?( k7 N" ~' U4 Q" g编译 make# s& ?5 M2 q1 i1 ?( B
安装 make install, Q6 ~6 R8 s9 n) i9 R3 K
{8 K8 C3 y$ v0 }' {$ B! y! a
其它的启动配置文件找度娘。
2 A8 u1 j' o t' s |