准备文件:
* q; S, m; `' a! ^- X$ }/ y* Gwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
, w8 k& `6 k- W) V( X. Dtar xvzf openssl-1.0.2d.tar.gz
6 K" H# G- j& a" B* b6 @$ F6 H) D* @8 T7 f8 C
) S( v$ ?0 }6 i, e8 A4 ?+ z/ B% r
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz" H0 R& u5 i8 |4 f# Q
tar xvzf pcre-8.37.tar.gz
; W" P1 h* ^9 I1 N. b2 H) ~* v( \) P! B2 `* V4 ?
: k8 h+ i# C; s0 ]5 w; y8 H
wget http://nginx.org/download/nginx-1.9.6.tar.gz3 x" f W% A! L3 [$ L
tart xvzf nginx-1.9.6.tar.gz: r6 s1 l, z1 z
6 l, l+ }3 e, f1 R7 E$ m% [- F" Z7 a' W5 a! M& a4 ~
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
2 g0 W5 U) s, smv master.zip replace-filter-nginx-module-master.zip) c1 h& A$ W( I! E$ c$ G
unzip replace-filter-nginx-module-master.zip
, y+ c- |, N8 |; k4 m4 f8 }) ^$ G" V. k- c0 w* u1 ^
安装sregex1 f- q: W3 R2 J# N- T) Z9 Z3 s
wget https://github.com/openresty/sregex/archive/master.zip+ `. R2 W: C" i/ l3 ^1 i& K& @
mv master.zip sregex.zip& D1 n. h6 u J6 N* q
unzip sregex.zip
! A' W6 o) \' T) v* i9 O B# Ycd sregex
# b& B( b0 x1 t4 amake && make install. ?7 u) r: [ W/ N- K2 }
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
+ S! a$ H( c6 w3 l/ F! L5 o7 n- j) T% a; l
安装nginx
J2 e9 W! M1 y g k, b) y& pcd nginx-1.9.6
" W% }; G$ J$ q4 n
% f% }' Y& E& X( Q/ ?! 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 & \4 F# V) R( b* r& T
|