准备文件:
2 @! }" f! ?# Y( b" n1 x6 Jwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz0 c- w9 V. i: t* i. T* c$ T
tar xvzf openssl-1.0.2d.tar.gz
8 I5 [5 o" h' H" X0 F# T) b5 o: o4 I7 k. O" m+ N' G2 [" _* m
1 B! _8 o8 ]* Y2 D' J$ Y% {wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz2 c Y- c* G/ }
tar xvzf pcre-8.37.tar.gz
% H; Y+ Z4 [$ h( V" N2 Z! f6 g. D0 k5 l" e3 O' ~
7 J8 G# i3 z; K2 ]* Jwget http://nginx.org/download/nginx-1.9.6.tar.gz5 |: U* c& K3 w8 q S% a
tart xvzf nginx-1.9.6.tar.gz" m! X& E. ~: o! p: c( k/ a
3 |( Q) F9 |' c S3 ^7 i) V# M: H5 m/ |7 y7 F1 [8 z5 b/ R% }, ]
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
: Q9 r+ H! o" P( Jmv master.zip replace-filter-nginx-module-master.zip
( L* h( ^3 r* |5 @# m, I, ]+ c1 |unzip replace-filter-nginx-module-master.zip- f4 ~& @& q2 ~
( x) j0 F/ h4 s' E/ T安装sregex
, c P( ]$ j2 ?* K1 b) W3 h. U$ Twget https://github.com/openresty/sregex/archive/master.zip
8 K! W8 V% B& }& i8 ^4 Q! g' v |9 jmv master.zip sregex.zip
$ @$ H; \# Z7 y7 B% Z, zunzip sregex.zip, ^. h6 y i. w" ^9 b8 e( s
cd sregex/ K, b# m' O$ j& |+ k8 l0 l
make && make install
& Z) C& u8 E3 P+ a2 Fln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.16 @5 ^$ `3 p) u1 j* g2 O. d4 m3 ]5 \
' r2 @4 f2 b3 X2 x+ H7 t( }1 ^. O6 E
安装nginx! _ `, c$ D: m0 U- |6 ]4 T* ?
cd nginx-1.9.6" X& B6 r. m' c1 z7 S2 {, W
" C1 F' t: p' D9 }, x$ l
[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 9 ^) C! V9 c9 f1 x; x3 v$ l" f" k
|