准备文件:
' P& S, K, n% n; E/ O" xwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz$ l; S4 Z$ L2 D8 j" v2 C4 g
tar xvzf openssl-1.0.2d.tar.gz% e* S: p& V: O2 g# n
j' X) i6 J. M: j
* U4 m2 u1 ^1 t4 l: E
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz ^0 |' H$ C' h% m' s" J* ~
tar xvzf pcre-8.37.tar.gz+ d4 ]0 n1 @- E% P& W. J N& e
, U9 A* y4 S7 ?7 y& c+ y
1 c) i8 z3 i# i3 o7 Awget http://nginx.org/download/nginx-1.9.6.tar.gz7 q& K3 l' t$ o0 ]" W) @
tart xvzf nginx-1.9.6.tar.gz
+ j3 X& G+ } @9 s2 E r1 \% p: o O8 l' o6 \# S# C
O: W& A& k3 Rwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
$ S k9 q, Z7 gmv master.zip replace-filter-nginx-module-master.zip5 ?9 `! Z" @8 V! X
unzip replace-filter-nginx-module-master.zip
9 O: [! ?5 W- _3 E% D" b
! V3 [8 F( I7 w! I9 r* V安装sregex3 m; ]0 x: U* r6 M# d1 ^! d% n! q7 x. Z
wget https://github.com/openresty/sregex/archive/master.zip
V% B; q- E0 s1 K6 }6 emv master.zip sregex.zip
4 }! y3 v8 o8 y; B. gunzip sregex.zip/ J0 \* V% J3 t( N! X
cd sregex7 f8 |* L/ l: V4 E& _: Y6 D
make && make install
r& E# n9 Z' {% gln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
7 ?" V5 E0 e( _, q) F* B/ L: w/ y# U0 e& Y; K' y* G2 S8 U
安装nginx
! w$ e6 E, p# e* c' F5 P! _7 [! zcd nginx-1.9.6
0 Y, j8 Z" B# |4 w/ z1 q+ j; g8 k, @+ k) \7 h7 u9 I
[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 # Z, i7 B7 O0 e* w! o
|