准备文件:
% z! b) U( b) S# p* L: l7 Rwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz5 a: ?* | a% y0 F2 O9 ]
tar xvzf openssl-1.0.2d.tar.gz
- w4 J* G7 S9 R" C, F& Z( ?( J0 j; H1 B; ?9 i0 B- C+ F7 C- |- O, H
* K: f B9 S$ j
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
" m6 ]* J; U ?6 w$ vtar xvzf pcre-8.37.tar.gz* Q, ^! q' ?9 N
+ l4 G4 ]/ j- ?
( D+ I2 h, _1 _2 _/ ~" G
wget http://nginx.org/download/nginx-1.9.6.tar.gz
1 r, n6 ^3 m" m3 c9 Gtart xvzf nginx-1.9.6.tar.gz
# d4 Q9 T& K2 c9 s1 }, `8 c: w$ x4 [+ X$ F
) ?+ a5 \ o6 E) Wwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip7 q( |) A. G- r: k9 g2 b6 `$ |
mv master.zip replace-filter-nginx-module-master.zip
% h: l; [ I% @/ a9 hunzip replace-filter-nginx-module-master.zip. Z/ h% ]( E0 @- L) ]8 y; Q
1 N1 Y* a9 S- @ N$ h安装sregex6 B* b1 l" z4 j& C G
wget https://github.com/openresty/sregex/archive/master.zip! I9 ]3 {, }% [; C' T' e0 B5 b
mv master.zip sregex.zip
2 z Y2 Y& ]6 J7 }6 V" P3 Dunzip sregex.zip, c7 f5 |3 @+ G7 ?. j; Q0 O8 W! W# ~# n
cd sregex& A" g) y* C% a6 t6 F
make && make install
8 _4 T- Z' q( h% }$ Pln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
6 p" o" s, k9 {2 `0 B9 B. l* W8 x e) |. c, k6 c
安装nginx
. q2 C' t( |. B# }9 Q$ D: scd nginx-1.9.6' L: N& q4 Z' G x
6 L/ u4 n6 [% H* Z! h
[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 1 [ n" `1 y2 U' J" Y9 b; |6 Y8 L
|