话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418. @6 Y0 q. Q$ {- { u8 |" L
下载需要组件
4 v9 v$ ]: v( n! xwget http://nginx.org/download/nginx-1.15.9.tar.gz
3 |/ E! s: U6 r+ J9 e# Star xvzf nginx-1.15.9.tar.gz, P1 Y$ k! E5 M1 q; D# R
! u8 T* e, X+ F2 k. g1 E3 _wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
6 J) D4 Q0 t" z% B+ t+ C4 itar xvzf openssl-1.1.1b.tar.gz
, b- X, o4 ^9 R( _+ h
- q2 @) u `& G4 b% o( mwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
. O1 ^% A0 I ltar xvzf pcre-8.43.tar.gz3 ^& Z) J" r! z( B6 \
$ b' K+ R/ e1 u# a. o# C u
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip. z, T3 o! q' q
unzip ngx_http_substitutions_filter.zip
$ I" _, v% u7 A$ r
9 F5 B( O$ h/ e5 U" Pcd nginx-1.15.9
2 q) M: P' d) }% k0 f+ b6 d7 n( A& S1 p
配置文件
3 R% Y E- b2 Y# K( `; [# K1 Y9 G
% x7 r3 Y& _! {& X7 @1 A
3 J" w2 Q4 Q* y" y7 C+ T. n7 ^[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 2 Z8 \7 M9 S% E7 ^2 w6 w9 w* o9 h
编译 make' A" ~# t& Z; w
安装 make install
! o) S2 a/ s$ I4 w0 v, J0 A1 C# N1 u5 y9 ^- P3 h1 |5 j
其它的启动配置文件找度娘。% `9 u p4 `% n. |" a$ K( X0 U8 ?
|