准备文件:
) N7 ?& w; e$ n: o0 [wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
+ p$ G6 _1 n) K# s* V: G+ utar xvzf openssl-1.0.2d.tar.gz1 O# _$ ^; R" `2 {+ r
" g: C6 r& }) O" `
; M5 r0 Z& u- s; C4 Awget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz$ G" O" |- _0 Q+ C, B" O
tar xvzf pcre-8.37.tar.gz
4 j$ H/ D7 X/ M3 F2 N8 b) A( g5 o% e9 | `2 u+ q/ L
7 p7 {9 C, r. Z* [wget http://nginx.org/download/nginx-1.9.6.tar.gz
) s0 F: B7 D/ Ktart xvzf nginx-1.9.6.tar.gz
9 k9 K: y5 n* D: w# l: ~
4 P/ _2 I2 C# i G' y3 Y p4 h- s `/ D6 H" u+ x
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip" {" G) C& p2 Z9 _, D! G; V/ \, n
mv master.zip replace-filter-nginx-module-master.zip
, Z- {7 i" n1 z/ [+ bunzip replace-filter-nginx-module-master.zip
4 i) X) j3 z+ L+ K: x' ^# j: S7 u- f* t. _1 n1 d6 ]# k; {4 W) o
安装sregex
$ J$ _: a* o: ?7 {" O+ h5 Rwget https://github.com/openresty/sregex/archive/master.zip
4 s. n. F: `7 M0 F Rmv master.zip sregex.zip! |& t' }) I) G4 R3 l9 k
unzip sregex.zip; u. P: b) P0 n; d6 Z
cd sregex* c6 u, e3 }4 U
make && make install
; Y+ ^4 d) F7 d3 q6 dln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
. S8 A& R/ K4 L0 k* u( P. {$ f! E* D% N5 d2 V$ P0 V. m
安装nginx
B1 e8 b. j8 W; m0 m$ |cd nginx-1.9.6
/ a- z6 I" Y1 b- r! |! }! B
* @3 z5 b6 A% p6 h* z1 p* m( U8 T[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
' c" I+ f! m" R# l |