准备文件:
9 r: v. S# G" K; a! J* |9 Mwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
7 }" Y1 B* T1 Htar xvzf openssl-1.0.2d.tar.gz
+ s5 S s! v4 ~" p, `, M
- X- @/ t8 Z) |* ^: g( U7 N% k, {8 D
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz. O) G3 B" B3 ?! M
tar xvzf pcre-8.37.tar.gz
8 e5 ]: q1 |. }/ m* e; _% E% z1 E5 `( ]; e* P8 j
& Y6 u/ x P3 Gwget http://nginx.org/download/nginx-1.9.6.tar.gz
! ^# ~; V' q- I% p6 B' d, [; Rtart xvzf nginx-1.9.6.tar.gz' d, K. n7 W5 M. k: f) A0 a
8 D2 x) P# d* A' D3 m9 x
1 J; O+ b0 r: I( xwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
. T$ H" {" h! V q( A cmv master.zip replace-filter-nginx-module-master.zip5 D8 E, o: y1 m- Q: ?
unzip replace-filter-nginx-module-master.zip+ ~& f' e5 w4 r* K b# d& F
: ?+ {& G6 t8 a6 B& m
安装sregex }( l0 x- }1 n- K/ A: [- N. ~
wget https://github.com/openresty/sregex/archive/master.zip
) U: ^& h4 r7 Z# q4 N, Hmv master.zip sregex.zip2 P. {5 _' s9 |, i' q. f# G7 U
unzip sregex.zip; Z; g+ e: P8 n, B/ ~4 u) s
cd sregex
# x7 ]- L r0 O( tmake && make install$ E4 M% T) h/ m8 [
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1% s* S Y0 g7 k9 O6 |
( ]0 N5 X l4 z r. {$ T! i安装nginx5 @" U6 ^: r, Y6 G1 X9 Z2 S
cd nginx-1.9.6
. p5 f! h& z3 {( x" \4 j$ k! Z- U9 x3 n; |, V
[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 5 T1 o$ l& r1 I7 c
|