准备文件:9 q, c# W; X' w; ^
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz2 |, {9 m4 ~ ? M: j/ ^* w
tar xvzf openssl-1.0.2d.tar.gz
m4 P7 L* U. N3 o- b% J" i. a4 B, |) w; Y& v
. _% L+ z6 L1 D5 U0 t" Z% ~6 H
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz. ]9 q5 p- i* p1 h% z3 f2 L8 o j
tar xvzf pcre-8.37.tar.gz+ R G8 {5 B) _3 u1 Y' Y
) w8 p. b, u! s$ T$ M1 C0 S" Y
3 ~2 Z( c2 g {! w4 ?4 c) u7 nwget http://nginx.org/download/nginx-1.9.6.tar.gz; @6 K2 ^2 S1 H- g# O8 u
tart xvzf nginx-1.9.6.tar.gz
4 s+ }. q( J" ~; O5 P
$ ^/ Z+ p7 O' d2 ]: n; z
. H* X6 Z( E9 r5 @$ E- {% ~wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
1 l9 V% P5 f7 nmv master.zip replace-filter-nginx-module-master.zip& z2 M) x) Z/ [( O
unzip replace-filter-nginx-module-master.zip
* P4 a1 X! l: y: D, ~. c8 o! e+ h D; }5 w1 u& Y
安装sregex
/ v7 J# y& n1 b0 Vwget https://github.com/openresty/sregex/archive/master.zip
- N: E4 M* i6 [0 g$ Y4 mmv master.zip sregex.zip! l$ ?9 u( m5 `$ ]" q$ \9 s/ u
unzip sregex.zip
$ G: L k0 ~4 B3 }8 s% w& u, `8 Hcd sregex% D- P o m. H y
make && make install
|; w S$ k- |; Tln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
; T( _0 [- Y" n4 O0 j+ h. V/ ~8 \+ H1 T6 C: R* ~3 G! m
安装nginx
d3 b6 I u% K7 A% B& o! d7 Ucd nginx-1.9.6( e$ e$ {+ ?& y' D
2 e, `8 y+ |% q; C, H9 n[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 ' x ] B7 e0 T% s' ]& u- k8 i: T
|