准备文件:
- A: ?' I# v* [$ ]& v. Swget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
4 d" k4 A! f0 k9 r1 Etar xvzf openssl-1.0.2d.tar.gz
) `3 i" W1 U8 R, P) k6 D% b% l
! `5 Z* G$ L+ D* i. P" u: d( }8 H) M& G" w, t0 J: S1 ?5 o9 U
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz1 j7 l) k4 y" v0 _' e3 L
tar xvzf pcre-8.37.tar.gz
; ]6 S! ~3 V, e0 j
2 k8 j' O( ]% g& u4 K8 ?6 T6 S) b v: Q( V* L# w% T4 a, y
wget http://nginx.org/download/nginx-1.9.6.tar.gz
% z( w) w( E1 ]: n" q W5 M7 g; }tart xvzf nginx-1.9.6.tar.gz: c D# Z! X. ~/ w: l" D0 `
! }3 U w$ w) a9 |; A$ z/ Y
" q r7 p7 G, ~2 k7 r1 k
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip8 x$ k5 I2 b1 ~
mv master.zip replace-filter-nginx-module-master.zip; d3 i6 f7 u" N* r6 g7 G/ @
unzip replace-filter-nginx-module-master.zip
- l% }8 z+ G) X- i9 k
, `, v, a& m9 ]) P" j# k9 z安装sregex7 k, {# Q1 s& a( B0 w6 q( B: b4 V- t) }
wget https://github.com/openresty/sregex/archive/master.zip
$ w6 B$ {' X8 K, q3 {mv master.zip sregex.zip. T' T3 Q* I e( s
unzip sregex.zip+ U6 ?) G) X% c" O$ j# k
cd sregex3 ?+ B2 h( C4 o" \/ {1 y9 @% W
make && make install* ^1 M6 v) E% n; O2 S, y" \
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1! q8 o7 t2 j/ Q, I- H: E8 B
, q# `) e, w2 N3 D1 W& |
安装nginx
! p( F* w& d3 p* `8 }" acd nginx-1.9.6, u; y5 Q% I! J0 y
/ h" V$ a5 M% ~( ^# 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
1 D5 O- E8 u* g3 d: c: X |