准备文件:
3 z' l" h; V4 _; i& M" Q. d! Hwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz) ~6 ]) i V0 W% H& j" A! U6 U3 n7 X4 w; D
tar xvzf openssl-1.0.2d.tar.gz
" V+ @" E& C$ Q; R
, ]2 z; e- p6 [9 `& a& p7 \5 b. _# n/ `! e8 u0 X
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz: }$ p& u$ y! N
tar xvzf pcre-8.37.tar.gz9 b, X/ p7 E X; n& O# m' i4 {" M
3 E* H1 L% \, D p2 e: q
" B4 o* k2 k4 M; t( [
wget http://nginx.org/download/nginx-1.9.6.tar.gz; D9 \9 u0 i& V. p
tart xvzf nginx-1.9.6.tar.gz
$ S' v3 ~3 V/ x1 r' L5 I `' |
! N1 O' |/ ?2 J' @( |6 q
8 k# E% o( b. z! A: t6 y' h& L" lwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip4 b- ?* ?5 @% Q
mv master.zip replace-filter-nginx-module-master.zip+ a9 O! { D. o( c; U
unzip replace-filter-nginx-module-master.zip! Y; N1 q$ P8 J' I9 ^
, H2 ]+ n2 I P+ M, Q9 |# J7 K安装sregex
8 {" v3 e. y! }- Z& ^* R1 uwget https://github.com/openresty/sregex/archive/master.zip) N3 i( t: e: `5 N6 Y5 _: N
mv master.zip sregex.zip
- L! O' z% ]( x, qunzip sregex.zip
( I5 B; |0 c+ a5 kcd sregex
) t1 q4 j, K- K) z5 hmake && make install
6 y) R( L" @! n( M) t: sln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.18 }* m1 }. w1 j& u- s0 v$ h% i( `
- h2 ~# S) w* X, _- E4 W安装nginx" @& q4 ^( B1 O! v; ?$ M0 q+ N
cd nginx-1.9.66 d# y% W; [# z( l/ I
2 y: L5 U" [7 W7 D: [# X( N- \% i5 R
[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 # y% K% B0 w. s( W
|