准备文件:
l% s; ` @# H/ @/ [6 P4 Xwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
1 {# J e5 N5 |" G" n& y. vtar xvzf openssl-1.0.2d.tar.gz1 P+ C0 q* N; O% i( B
( P: U7 H! r2 J# L x# d
# m$ y% Q9 }( E6 N# d
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
) @3 u6 n. {0 ?+ R5 V4 F8 g- _tar xvzf pcre-8.37.tar.gz
d: }9 f9 }+ Z! X' D' ]& F8 g: E- i& j$ T' f1 D; S/ G8 U
- I; x+ j1 w N2 l
wget http://nginx.org/download/nginx-1.9.6.tar.gz' `$ `: M5 @+ p
tart xvzf nginx-1.9.6.tar.gz
: T2 f" N; F) i- n4 k5 d
; M6 ^1 R0 y+ m
x4 D, K6 L" fwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip
" F2 L% l2 ~ J* A3 v+ W5 Wmv master.zip replace-filter-nginx-module-master.zip
% W% H! i, b: j6 o. X4 Y4 ^; Aunzip replace-filter-nginx-module-master.zip
/ J: Y; e4 r/ Y) I; N
& [. D9 K+ Y8 T- y安装sregex; R! Q; D+ f0 e
wget https://github.com/openresty/sregex/archive/master.zip
) L/ A5 C1 ~4 L+ n W3 j( ^mv master.zip sregex.zip
( u ~9 d7 P9 H5 z* c# c, Z% aunzip sregex.zip/ r7 a1 z- B5 x6 F7 @' j
cd sregex
; J- O2 R. b+ v( Umake && make install9 \# R+ }6 z2 S& w* z( H
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1
$ Z8 q7 m/ `" b& c5 h& ^* ]3 b" S' v+ F' O
安装nginx4 z/ K. @6 _! A6 d
cd nginx-1.9.6
% ^( J4 K* p6 y/ L8 ^
9 ]# f: f4 @" Y0 S1 A[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 % E, k) Z% F* e& ~
|