准备文件:& P: k: q# S6 ?0 d% ^- s
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
5 P4 f7 [4 ] T4 h9 ]( mtar xvzf openssl-1.0.2d.tar.gz
6 [& i; ]& [7 ^7 r5 t7 O1 h
. Z; Y) I9 g! d; s" k
' ]0 H% w' M% {1 _) `wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
5 P; v3 `1 \9 t, U. o2 y8 b0 l6 }tar xvzf pcre-8.37.tar.gz! a! a G8 J$ ~8 u9 J9 x) E# n
. d8 E6 |. m6 \
1 ]7 e- N. h; swget http://nginx.org/download/nginx-1.9.6.tar.gz
- o% @- H% q7 a1 ~tart xvzf nginx-1.9.6.tar.gz
( L1 |: A- _2 }6 p; R
' ?8 V+ o7 Q# e( p. U% @
& T5 `7 b) u/ s1 mwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
6 ^9 E. Q; d4 [0 N/ |: fmv master.zip replace-filter-nginx-module-master.zip% m3 A' w E/ x( K! @- N
unzip replace-filter-nginx-module-master.zip
: R) f) _! i/ U, t3 |3 v5 q
* N. w: K# K& T; k' q! ~安装sregex
( r) Y9 m# N! x2 _! Kwget https://github.com/openresty/sregex/archive/master.zip
0 E# E2 L/ ?( z, C, Omv master.zip sregex.zip0 X5 T0 c Q( n0 q g
unzip sregex.zip
' v; ^0 @" y7 ~- ^cd sregex- S- z# Z( J+ W8 S3 P# s
make && make install
: P" R4 V( d$ [6 Oln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
, X% N- x8 m0 i
1 H0 T* c5 u1 }安装nginx
5 T3 n/ a9 G9 D0 _0 `cd nginx-1.9.6$ _- Z8 R3 X0 n* J. o( N) a
$ c6 T* _8 L5 I) z$ F# h ~3 b[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
5 ~3 C; w" M8 W+ e$ b2 q, e; y |