准备文件:
/ d; p0 x4 k7 g4 Z2 |wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz9 x1 r M& M8 a( I$ ]/ K
tar xvzf openssl-1.0.2d.tar.gz' h8 t& W6 A K1 d8 r
7 b. J0 [2 ?- B* t" _! r" B" U+ w; k3 l9 V+ k. O5 P
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz; J0 c6 p/ O1 R% z" o$ R( | t5 F1 V7 @
tar xvzf pcre-8.37.tar.gz
6 Z2 v# ]8 |4 P/ S4 L4 Y& i! @$ Q" _ i' o6 G4 G' Y; N5 D
) ~2 S! v5 d$ P; _5 r7 l
wget http://nginx.org/download/nginx-1.9.6.tar.gz0 |% R) `4 y& N
tart xvzf nginx-1.9.6.tar.gz
5 l" h* y% ^ [; `' L5 I- v3 M+ J# K; S" J7 Z+ H4 U
( L, B x9 x* _# T0 ~9 x" Hwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip1 W$ t& Z* k/ U0 S8 G7 T( a' Z
mv master.zip replace-filter-nginx-module-master.zip
$ i* x% [" W5 l3 [unzip replace-filter-nginx-module-master.zip/ r# f, x* ?% o6 |+ L- Q
! Y* d+ @( S5 _4 r- Y
安装sregex0 _; [* I: e# t0 B1 r
wget https://github.com/openresty/sregex/archive/master.zip& x0 g/ g A3 n4 r8 `9 g
mv master.zip sregex.zip
3 G( O9 e# N+ B; G- P+ @4 @unzip sregex.zip
( n8 W2 o% w4 o8 gcd sregex; k: K1 m$ I9 s V- S' N
make && make install; O# f* v3 G8 x0 ~' r+ J
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
4 W3 J" P/ x z0 @5 t( M) L- R/ D! G1 F) N' ^& g. T
安装nginx
- Y) _( [: S! y$ b: \* ?8 R' Ecd nginx-1.9.6. L9 y& Y7 n# B0 r- R, ]$ X8 S
: V# [3 Y+ y3 J2 D1 m
[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
' o4 F' V" b; D |