准备文件:
* {$ D5 R# N) kwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
8 j% T7 X' I% T5 `/ Ntar xvzf openssl-1.0.2d.tar.gz3 d2 A( b9 ^0 Q
1 i6 T: N/ @6 z; {$ @: s
) l: c7 V3 p. owget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
* ~6 p# n( Q0 b3 {" S/ mtar xvzf pcre-8.37.tar.gz
5 V; I$ n4 T& W; t( P9 o0 T3 k, }! W! D1 q
7 f* M6 X$ S+ q3 o" [
wget http://nginx.org/download/nginx-1.9.6.tar.gz
3 [# J2 a+ J; i1 z" k$ p T. itart xvzf nginx-1.9.6.tar.gz
; F5 ?0 @! c9 ?7 ~' A, R; y. @3 x, {; I0 }3 g/ U8 \& R
7 O: a/ t0 ^ x$ k
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip0 x4 I; I% y$ F Y
mv master.zip replace-filter-nginx-module-master.zip$ a: O! h% V8 Q' n, O4 ~& M
unzip replace-filter-nginx-module-master.zip
7 U% F0 H) {2 \. @) l. r5 ]$ v" i* V7 L; O( A
安装sregex
" q8 ]; \2 X9 Mwget https://github.com/openresty/sregex/archive/master.zip
5 \8 ]! _; w, J7 D9 tmv master.zip sregex.zip
+ f7 n( r, W: ]7 kunzip sregex.zip" C) v/ `( q S+ l
cd sregex
; }5 D8 |1 @( ~# _: W8 ^* {7 G' cmake && make install
\( j" I& T# k; l- Nln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
, Z& ~% d6 r/ r( m! U) K- M; S( x! g! y1 b% b I0 x0 B i
安装nginx
# L, I$ W: S) G6 r2 @+ dcd nginx-1.9.6
' f4 i; U1 y1 Y1 ?; g) {. m6 ]. r- |3 R3 E
[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
7 M/ F! Z; q, U8 ?0 N2 y! t |