准备文件:" `1 t( ?" n9 Y2 r' o' l
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz# s: H4 i9 r" ]5 c. @% V
tar xvzf openssl-1.0.2d.tar.gz
2 v) m* x& ^' q# J' ~7 t* Y- @+ Z' m
6 \+ L5 T8 H+ I, G. c/ d
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz0 A2 O% R9 Z# U
tar xvzf pcre-8.37.tar.gz
; i1 l. F8 M- X4 d0 U- p( a% K: N; {5 V( n) S) b- j
. O: J1 x1 \4 s o4 }) |wget http://nginx.org/download/nginx-1.9.6.tar.gz& c, g4 F, D$ T% F
tart xvzf nginx-1.9.6.tar.gz
/ P( E8 m: J$ K" v6 t. ]1 J9 w- j, ^
. W. }1 `) l. b1 G3 j+ P" Q3 j7 J i4 u, c w- G" h
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip% D; _9 b$ N0 ^9 }5 {
mv master.zip replace-filter-nginx-module-master.zip
% Z# U' D7 M4 funzip replace-filter-nginx-module-master.zip, Y7 _+ D5 H7 A7 G* ?* F* h0 w. j
9 [' L$ _/ q+ h安装sregex$ U8 F% _) J/ u' o4 z
wget https://github.com/openresty/sregex/archive/master.zip% {" X7 \# X2 a! `
mv master.zip sregex.zip% Z6 L8 i; z! j; V$ r( Q- ]
unzip sregex.zip
* L! h E7 R/ H- F9 {cd sregex0 q: Q6 J: e( n
make && make install
7 ]% y( c7 R! Wln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
0 ~* e# [' a+ \, h
0 B& v6 T! w3 j3 |7 t, ?' `4 m安装nginx
6 [1 w2 T$ Q$ g! T1 ycd nginx-1.9.6
, @/ b3 I2 c: J2 @1 g5 w1 E0 L) i) m, E. f8 z6 u
[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
1 ]& |3 T0 R8 L' `8 K7 K |