准备文件:
8 G9 Q- E! s& \( y! N+ j& ]wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
0 g1 L, f7 N3 K( Vtar xvzf openssl-1.0.2d.tar.gz
1 |% n. ?5 \. ^ ]0 k2 N# _
# y$ X3 C1 _2 E% m3 V7 ]+ W2 y7 } d6 M* k
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
1 m7 V) X1 n' [; I jtar xvzf pcre-8.37.tar.gz1 X* m4 S" [- N( V6 F
3 S( i% r# w, L" Z/ s& ?3 O/ y' m1 f- t, F l0 \- ?8 R
wget http://nginx.org/download/nginx-1.9.6.tar.gz
$ L# c$ [/ q9 e; E+ d" j* X Ntart xvzf nginx-1.9.6.tar.gz. s9 O+ c! S$ G/ Z" Z. s
1 z0 U, E2 y: _1 V1 D, p' `/ G! {: E6 S3 @/ O- g% c& x' x
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
5 c4 n% m( Y9 | _7 @3 `: gmv master.zip replace-filter-nginx-module-master.zip) D/ W" ~+ e! d) w& E" I
unzip replace-filter-nginx-module-master.zip8 ^, \6 @, D+ ~0 F
1 I0 _0 p% ]7 f4 j. {$ Y安装sregex
$ E# B* w3 V! a6 l9 qwget https://github.com/openresty/sregex/archive/master.zip: e3 \- E/ ]) {$ f$ b, A; i
mv master.zip sregex.zip7 X% Q9 b% y; z- D* B; a
unzip sregex.zip+ L7 ?7 Q" l1 q; E
cd sregex# ]) M% z* w% I% b: L Q
make && make install
# v# o( b3 o6 p2 l% E9 H& mln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
* l$ c2 r5 m' ]4 c( T! x) e) D. }7 h. ^9 \/ m7 _" U9 t
安装nginx" ^! I0 n' _3 E
cd nginx-1.9.6% Y$ |+ T+ {! n6 W$ w
# H/ t5 R: D: w2 C0 J5 j7 t' A+ b) D+ d
[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 }0 Q/ c+ I5 A0 h' U
|