准备文件:
5 O. O# \6 j5 w4 f/ twget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
7 h; K7 h% g t3 T8 H( B9 {5 G9 A: ]tar xvzf openssl-1.0.2d.tar.gz
+ @/ f6 U+ C6 e! u3 E$ F w
4 }1 W& ^* I# w5 E: Z7 o; j- {/ |
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
/ N4 D; W" j% h% m3 utar xvzf pcre-8.37.tar.gz
" F2 Y/ D, B( P; D" J1 l9 ^' J6 {! j0 e
; E- @% Q2 s) _wget http://nginx.org/download/nginx-1.9.6.tar.gz
6 E9 z1 b7 ~3 |, U- n. j+ ?# Ltart xvzf nginx-1.9.6.tar.gz" s$ j! o6 Y6 d, a
4 G0 z3 d9 q' O- g, S3 I5 R: X8 |& p* d1 u4 X6 ?
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip7 d9 A6 J0 l* u \1 M
mv master.zip replace-filter-nginx-module-master.zip! e W& g$ c3 l' |5 v# Z
unzip replace-filter-nginx-module-master.zip0 e6 w8 p/ g1 \2 t0 E( b
1 ?+ ?% w. k% j% P
安装sregex
) ^/ {' j) J' w: x4 E. |. C5 y6 P/ awget https://github.com/openresty/sregex/archive/master.zip3 D5 Z, G- \! u
mv master.zip sregex.zip
& n2 g5 G; o* [: ~3 E$ `unzip sregex.zip
) e5 p- y3 W* K9 Jcd sregex" w7 x( ?+ u8 Y& O5 I! |
make && make install* h: }8 A5 ?9 ~/ d4 g& y0 Q
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1$ l9 q/ R0 N: J, M+ t/ M
6 i9 t$ |1 u/ p4 Z2 H& @' f
安装nginx
( `) B) J0 ?4 _* E/ Q/ g w* b. {cd nginx-1.9.69 S; Z" m% N% k7 @
( _0 m+ d1 f5 s) 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
, a" f) Y/ F T# u, X' O- }3 e+ w, t/ ? |