准备文件:* U: c$ w6 G+ b- X7 X
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
+ g7 H7 T/ `9 |9 u2 Etar xvzf openssl-1.0.2d.tar.gz O- n; B! N! I/ q' o. w
* i) I6 u/ a6 u. x$ |/ A# v* H; A" Q8 h2 p/ ?+ }. U
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
& }2 j: L: n2 k# U w5 Dtar xvzf pcre-8.37.tar.gz
4 a3 U+ T3 {5 c! C) A @ C
* n7 Z* Z# h$ Q7 ~6 q. P8 w3 R+ j0 L9 V& f9 V! V
wget http://nginx.org/download/nginx-1.9.6.tar.gz
1 Z% `" H' @, p" m1 Y4 o8 F! V$ ]3 x- v; }tart xvzf nginx-1.9.6.tar.gz
4 W0 Y( a0 z+ q' J7 k8 X
f; s, O6 }% G4 H7 Q. k4 } D) C
, z& j4 s* @8 h f; }9 S( Dwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip- S4 h9 t3 _, j* x
mv master.zip replace-filter-nginx-module-master.zip% i3 @( p; g; N/ f! z) ?2 z& R4 P) L
unzip replace-filter-nginx-module-master.zip
. N1 ]! u4 h* f4 a& V6 k% X$ q, H
安装sregex
; @- A; T6 i8 ]' E/ _7 wwget https://github.com/openresty/sregex/archive/master.zip+ u n' b; c# y
mv master.zip sregex.zip
; k0 e5 c+ d9 @# n, [+ S2 qunzip sregex.zip T' _' E! |' x0 J
cd sregex
8 W' i5 ~2 |! W4 Z9 |5 ]* Lmake && make install
; o& [9 j3 {' `4 h& {ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.12 y. L$ ]( D' c/ U0 _
/ g# Q( o& y# I( G安装nginx
1 `4 e+ O$ |4 U x% Dcd nginx-1.9.6
6 u0 I0 b% C; L1 z- U$ g$ I! l* S7 n6 } T) q( k. h* r; ]7 x
[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
! f% g, w0 Q$ l M4 v1 ? ^ |