准备文件:
0 l |; z7 W9 ~. [/ D% ^3 g6 U Awget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
+ q3 \/ Y: [+ G2 M; rtar xvzf openssl-1.0.2d.tar.gz' i3 {2 P' \1 T/ J
A' v# e8 o' Y4 ~& Y% b- t5 v6 ?( ?2 F, x4 z+ M. G( m0 ^
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz# Y. T" E# Q( a% A3 }: C7 Q3 d
tar xvzf pcre-8.37.tar.gz
9 o j; t0 _ y8 H* G
, n/ H9 n `2 x n: Z2 m' M$ K2 p7 M, |* D) w! C
wget http://nginx.org/download/nginx-1.9.6.tar.gz5 E- E+ f5 f4 {8 k9 K# b; ^. e
tart xvzf nginx-1.9.6.tar.gz1 j- k9 \' O9 K# q, e5 f
3 ?" T Y1 s" ]3 a7 }4 M
?- ?% f" Y* `. ~7 z5 m% wwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip# ?) M1 j7 o1 m# z& n4 F
mv master.zip replace-filter-nginx-module-master.zip; L/ ~! W, q+ o- c0 U" R
unzip replace-filter-nginx-module-master.zip
3 ~& o1 r8 m7 u* w+ _+ z# y l/ U/ m: R, ^8 u: z" X
安装sregex
# N9 i# \9 O; j6 A1 d$ A8 dwget https://github.com/openresty/sregex/archive/master.zip
; R, T* H% f* G" _2 X, ?mv master.zip sregex.zip" A7 K W7 `. x3 r ~7 ]4 q
unzip sregex.zip) {, b" o/ G6 e1 ~, q. U
cd sregex
; [% _; ]) p; e+ w5 e- u x4 j+ ?8 K5 mmake && make install
4 H4 a3 ~0 O( s" K! Z& j3 Oln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
, ^) ]) p6 I' {- r4 _( a3 Y" ]
6 C4 ?" W, ?, I$ H9 k5 P7 j' m% ^安装nginx9 u+ S) H: o" E( |/ W. \
cd nginx-1.9.6
9 X/ Z. P: v( ?4 g0 }; T& ]1 M6 [: n6 U7 W0 g1 @
[AppleScript] 纯文本查看 复制代码 ./configure \
--user=www \
--group=www \
--prefix=/www/webserver/nginx-1.9.6 \
--sbin-path=/www/webserver/nginx-1.9.6/sbin/nginx \
--pid-path=/www/webserver/nginx-1.9.6/logs/nginx.pid \
--conf-path=/www/webserver/nginx-1.9.6/conf/nginx.conf \
--error-log-path=/www/webserver/nginx-1.9.6/logs/error.log \
--http-log-path=/www/webserver/nginx-1.9.6/logs/access.log \
--http-client-body-temp-path=/www/webserver/nginx-1.9.6/temp/client \
--http-proxy-temp-path=/www/webserver/nginx-1.9.6/temp/proxy \
--http-fastcgi-temp-path=/www/webserver/nginx-1.9.6/temp/fcgi \
--http-scgi-temp-path=/www/webserver/nginx-1.9.6/temp/scgi \
--http-uwsgi-temp-path=/www/webserver/nginx-1.9.6/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-ipv6 \
--with-pcre=/root/pcre-8.37 \
--with-http_sub_module \
--add-module=/root/replace-filter-nginx-module-master \
--with-openssl=/root/openssl-1.0.2d
5 M% a1 Z/ g7 i6 E/ ~: } |