准备文件:( l4 X3 S9 Z1 B' H; i
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz5 w- e* l" D0 h P
tar xvzf openssl-1.0.2d.tar.gz
6 e- m3 P- D2 Y2 o7 r) W2 ]3 X
8 u" Q n6 C' j5 S$ { [% N* `9 x f0 y0 X) Y2 n4 v% M* `5 V4 @
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
7 u" }' g2 A& C* i9 `. ltar xvzf pcre-8.37.tar.gz
( P" \' T- G2 M4 u+ S6 S. t$ e- t% s) |9 E$ R% E
- c+ J, {, C1 X% y
wget http://nginx.org/download/nginx-1.9.6.tar.gz9 Y, Y, G* ]5 Z/ F& p7 {
tart xvzf nginx-1.9.6.tar.gz
* x1 L9 \- U( N* l! k4 _1 A3 d, A2 B: ?# x5 `% v9 i2 h/ W
2 ?1 o8 i$ A: D( R: ^7 g" j
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
7 |6 ~4 a& w, a8 x& F: ?mv master.zip replace-filter-nginx-module-master.zip1 i& X' T! d1 M( n" @1 C+ c
unzip replace-filter-nginx-module-master.zip
" o) n: `" L1 z7 z( [" p s
4 `; q9 T6 A9 k* y3 d安装sregex7 E% `4 c& J8 J
wget https://github.com/openresty/sregex/archive/master.zip
* V& _2 g( G* u9 Q0 m" ~mv master.zip sregex.zip
* L' Q/ w( F a; \/ xunzip sregex.zip/ r4 Z+ @. \( [$ Y
cd sregex( b# b; y. M7 l' K1 u7 {7 Q" h
make && make install: C5 m, M3 i: j/ v* _$ d6 G
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
O: {, \1 X$ L' B# K+ `! Z1 Q3 i4 ^7 I% ]
安装nginx
p! i* ?8 A2 _" d o V9 u4 X6 {% lcd nginx-1.9.6 D6 S8 c) I. ^% Y6 s, A# G9 y0 N6 j0 ]
7 e4 }9 R5 x- J, q. k+ S[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 ) `3 x( E: R2 y" ^6 D; \3 o
|