话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418& z1 a3 [6 Z6 T; y& x
下载需要组件 A; H0 `# L3 L0 X0 t% q
wget http://nginx.org/download/nginx-1.15.9.tar.gz
F0 I3 S& B" I6 b" {1 d! Gtar xvzf nginx-1.15.9.tar.gz9 } d' K9 a) Y3 q1 x6 Y; [
% y4 _+ P; v# o, K: N6 P
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz; |4 |) V: B4 N; ]/ L# b! K
tar xvzf openssl-1.1.1b.tar.gz
, A' E3 w4 s% v4 _
+ F8 S6 z6 d& u1 b+ u0 Y' _6 u$ Uwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
9 Z/ z |8 J2 _tar xvzf pcre-8.43.tar.gz
) Z- O, D2 `0 Z ?5 H D9 m* S- ~
, c- V6 F) N0 a, ewget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip4 r4 A4 Y6 q, ]# h* q" N
unzip ngx_http_substitutions_filter.zip# M3 v6 ]8 _0 R* }; j
' q/ U' G2 @: u+ S1 k% y8 ]cd nginx-1.15.9. q h; {* }7 V, T/ H& m$ O6 T
) i8 g# q( ]0 l2 {, a. P0 M' }
配置文件! {: v. u2 X8 z: t, v* _
' p5 A; X+ m0 I# r2 K
8 w1 W4 o& N4 o: A0 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 " \* Y0 x2 T( s' }; q
编译 make
8 t# }1 P, J% \. ^9 W5 |& P$ c安装 make install Y0 y w/ T" }# K. J }
. d Y1 f5 ^# Q5 m其它的启动配置文件找度娘。+ F7 @) {. A( m: M: B1 Y' C
|