准备文件:
q# A3 T8 _6 x- [wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
3 n- U$ Q5 V$ } @2 ]6 q6 `4 I9 U- j0 q$ Dtar xvzf openssl-1.0.2d.tar.gz- [% }, ^/ i C& ~( b) c1 V/ f
& |$ r( N) T) Q+ D% J4 p3 ~$ S- G& ?' X
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz9 Z$ ?+ w/ ^+ m( _$ B+ {, ?
tar xvzf pcre-8.37.tar.gz
. ]1 R9 r1 D3 }5 m: J; b
) r0 g. Q) n, @1 W- S7 @4 \& w4 h% |) d$ U3 e
wget http://nginx.org/download/nginx-1.9.6.tar.gz
9 Q* t; L% [! j- Vtart xvzf nginx-1.9.6.tar.gz# W3 G1 d! J7 }% `4 l5 Z
* p1 d2 ` K s5 d7 W, r
9 I6 G' V# L6 ]3 L: \7 dwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip& o% Z6 a) z: d) @) g4 U! G
mv master.zip replace-filter-nginx-module-master.zip
3 @% f; e. d& M8 K" X8 Z, K! P! {4 [3 Xunzip replace-filter-nginx-module-master.zip
* p; W% g/ |1 v/ g$ n
% T. M' k; c5 t$ L9 `安装sregex |$ T3 O" @( ]$ U7 h! m
wget https://github.com/openresty/sregex/archive/master.zip* f: Q8 t0 x/ b$ i% A9 A
mv master.zip sregex.zip
' F0 O% ] P7 w$ F+ ~& m, Gunzip sregex.zip
4 y$ Q/ z% H0 t, z5 `6 q" ecd sregex
1 \0 x. k& {3 y" v3 {) ^make && make install8 |# A/ t3 ]8 ^2 l- a. H& k
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.16 ~$ G% O/ r, U' S+ A' D
# Z: k5 j* U& V# [0 A
安装nginx
! K/ A/ j6 \) ]6 \& u/ _' F: ccd nginx-1.9.6' r# A3 N! R; \$ w0 d
# m* a& D' I5 a, A. f[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 . B2 z; T' p! p
|