准备文件:
: Z+ M* S6 h6 }wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz7 a7 X# t2 q: A6 \ k
tar xvzf openssl-1.0.2d.tar.gz
, A( ` A3 H# Q I+ X) W' p9 r! q3 x: _2 g6 L7 {( h& L1 u. x3 V
( x/ |9 L' H* Y# E9 `
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
D1 H- V8 p% ytar xvzf pcre-8.37.tar.gz* h6 N I' `( q% j; D- f) T- b# m
" B2 @ e" b+ A' T% _; l! v- ^
3 v: o5 H) j% |
wget http://nginx.org/download/nginx-1.9.6.tar.gz/ `6 l K E D" j; D" a w* k
tart xvzf nginx-1.9.6.tar.gz+ I# B! ~ l( C3 K
% M2 t2 F5 O( {6 l0 X
: B/ \/ r3 T' h# w$ [wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip( d0 C& T# b* Z- E8 j9 @
mv master.zip replace-filter-nginx-module-master.zip
3 n8 }7 e7 s2 L. y: @$ k- j6 j9 munzip replace-filter-nginx-module-master.zip
* }$ a: [; k4 [ a$ Y7 O0 Q4 O4 y- ~2 a3 L7 u4 c) u
安装sregex
& N* X) G" R( F9 f& d, twget https://github.com/openresty/sregex/archive/master.zip) E$ X" Z( D. n' F% o
mv master.zip sregex.zip
, }9 ^5 H' z- Aunzip sregex.zip
4 u6 O$ x8 t. A5 Z/ Scd sregex4 c. Z( f' R) I" ^
make && make install
: H0 s1 l; M- V$ p' S8 Nln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.11 e" M- C) c, y) E( Z% X- ~
) w( [6 I |% t' I$ K+ v安装nginx
& l7 r* Y/ W ?/ l* u1 jcd nginx-1.9.6# z5 h! v5 x3 W$ X! t8 I3 W
$ L4 l0 S$ a, @3 u$ Y
[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 W: H1 `$ ?" I' ^; S/ ^: k' Q# I |