准备文件:
: F4 S2 T1 u: {) V9 H& R7 t- awget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
: G7 q9 j/ [+ u/ mtar xvzf openssl-1.0.2d.tar.gz# [- V. G2 W$ W
. D7 n5 H( q* M/ U, P, x6 A
/ o0 g+ n& i0 p
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz2 V8 |& W8 o6 H" s
tar xvzf pcre-8.37.tar.gz6 {& F/ w$ V0 {7 q1 b9 x( }6 q$ s
C! x. Z U; D9 ^# K3 `4 M$ Q: x7 T( z* n6 |1 w
wget http://nginx.org/download/nginx-1.9.6.tar.gz
$ e3 S: ]$ m3 ^+ S% K7 etart xvzf nginx-1.9.6.tar.gz8 d6 Z) u. y" D. w- c! w3 E7 o1 e r
8 }5 b5 l# n+ @
/ s5 ]2 g* j7 t9 `wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
! G1 M, `3 R0 }0 u5 Q s8 M4 fmv master.zip replace-filter-nginx-module-master.zip
/ T# E0 J* ^) f, gunzip replace-filter-nginx-module-master.zip) r2 w ?6 L& n: S- r( K
" j1 S/ C2 S$ H& Z Z. }7 r3 `安装sregex7 ~& _* [+ Q: j$ ^8 N
wget https://github.com/openresty/sregex/archive/master.zip
: u9 J9 p; _2 x+ n- amv master.zip sregex.zip
- i2 J5 s/ X2 A, q6 Y: vunzip sregex.zip) E, }# b0 z: M7 X5 o/ U
cd sregex
$ q' _8 @) V8 D, w, T; |& Hmake && make install
7 E% ~( j" C+ V7 D0 hln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
6 I |! k- y0 q. R
0 p0 c: D+ W/ f' J- ^安装nginx+ Q: ] E; @" P% ^# j! M
cd nginx-1.9.6) ~+ F3 g* [7 w( f% W0 g4 \
, I- e) O$ ^9 Y1 P
[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
6 _* n/ a* D/ G( G# I. A |