准备文件:6 e, o) E3 b) L4 S2 J. P* C2 U: X) |( f
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
/ k* A* E1 h& Xtar xvzf openssl-1.0.2d.tar.gz" c2 t" {/ x% D$ D Y6 m3 b+ I( Q
: M" L3 c9 ?' v2 ]3 z3 \
f2 u; k7 x) _wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz$ C/ j- [, w: n% q) M2 F8 _: S
tar xvzf pcre-8.37.tar.gz
) P" ?4 H5 @7 }7 G8 u( ]9 a% P0 |1 \5 z- M
: g3 K. C# R# [- Q! k$ X" @
wget http://nginx.org/download/nginx-1.9.6.tar.gz
3 K8 W) H* N' l% z( ?tart xvzf nginx-1.9.6.tar.gz% a8 Q& f$ P: r$ ` ^3 n1 w1 p
# p2 ^. A* h, ^6 `. f& x2 H. t E; v u
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
* D- U. C' O7 Gmv master.zip replace-filter-nginx-module-master.zip
' E+ G$ h# I7 T5 iunzip replace-filter-nginx-module-master.zip2 J; Y+ m9 e2 T+ i7 a, f6 p
# c. S6 ~+ @3 r安装sregex
1 {1 k% b7 n( |6 d! Iwget https://github.com/openresty/sregex/archive/master.zip1 V' q8 P7 G/ ^' A/ p, i [1 x" S2 F D3 E
mv master.zip sregex.zip
7 Q* I' R, {8 W4 a Zunzip sregex.zip& n, ~3 N# X' o8 R6 b
cd sregex' _1 d, q. B: i N# U/ M
make && make install
6 Q" l1 r0 Q; q O: Qln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1 O* Y" V2 D" g n* _) P P: r
+ C( q# S. p, r" n8 q- ?安装nginx
# f' r6 P: v- g. o* O7 Q+ K/ Rcd nginx-1.9.6% T9 \ L9 t1 I/ |/ a
6 u5 c9 S& B2 x, ]5 [7 ^
[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
8 y& ~3 B4 k' }$ o8 e( t |