准备文件:; T6 t( J- ]: m
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
, c' c. v. V$ ]- _% B+ Wtar xvzf openssl-1.0.2d.tar.gz' m5 P; ^# ]0 f9 \" P& d6 A! }
0 f* U5 ^, L- S7 J' N; Q& n N0 M
1 Q/ Z( O3 p- q$ Lwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz+ R2 K2 H" U8 |
tar xvzf pcre-8.37.tar.gz* W h8 t& L2 [$ P0 }& W
, y# C) k) A; l% m2 h, O
) I& O/ e+ S& m8 q) o& [
wget http://nginx.org/download/nginx-1.9.6.tar.gz
/ }' A" f7 K% ]" _tart xvzf nginx-1.9.6.tar.gz3 s, e: e$ {* J6 J, E- V
, i- a4 Q/ ?5 e6 q
" @! r8 S8 R% D# Twget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip' w/ m- `* K+ t: ]
mv master.zip replace-filter-nginx-module-master.zip
/ t; ~+ ^% `3 l6 D. G8 F+ K: Xunzip replace-filter-nginx-module-master.zip4 J7 [6 l' ^6 K$ @
7 M% D) g+ l2 q7 T
安装sregex4 w! G+ m; D& `
wget https://github.com/openresty/sregex/archive/master.zip$ m( L2 S/ I9 f$ X' t3 r) O/ G
mv master.zip sregex.zip: o. f5 ], X, g" u2 Y# X
unzip sregex.zip
; `8 e" T, ~8 m. ?# k* Qcd sregex+ I* x0 A/ }, j- M
make && make install
- ?2 U6 O/ e. O) v2 Q, S5 Gln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.19 [# n0 @3 T* Z4 K' t7 c1 A
6 z& x# J' K8 R( ~安装nginx
- L" @+ T ~' [' b: G" \" zcd nginx-1.9.6/ ^" \# [ n0 Q7 t, e
% t( ?' m5 n$ H$ X
[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 - e1 T# q( Z: t2 E* |
|