准备文件:
5 H7 S0 |* a, Q& {: r: j9 k- ?wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz7 a2 D' p# B1 \4 S3 T. X1 S& N; C
tar xvzf openssl-1.0.2d.tar.gz
* `9 H! c9 ?" p2 z, ^5 k/ j; s6 [1 q7 r, I
! n4 J% [9 o8 k5 g3 ]wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz9 I3 \) q: R9 i1 q
tar xvzf pcre-8.37.tar.gz
2 [& Q* `; o$ ]% r9 K b9 b/ {1 K2 A- Y/ `; i
6 ~/ P4 y/ I; ^) O$ O1 `# J$ _wget http://nginx.org/download/nginx-1.9.6.tar.gz! n, B9 p3 y4 i8 e1 s
tart xvzf nginx-1.9.6.tar.gz8 w$ }" o2 f! U0 |5 F, J( e: D5 {
; r1 n" F! T5 q0 H
0 C* M$ P k6 B# r' M+ Rwget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip9 a* B) J; O: x; l' O) U7 D
mv master.zip replace-filter-nginx-module-master.zip
+ a$ O x5 X. hunzip replace-filter-nginx-module-master.zip
# G, S1 O" U+ S- @$ \# [) c
! e1 R$ X7 w& X* S安装sregex1 I( }6 E) ~ e5 `3 Y: b& a& `
wget https://github.com/openresty/sregex/archive/master.zip
5 J! V8 v' C" ]8 r6 D% K( a# dmv master.zip sregex.zip1 a& K2 ]. o* z' }2 \4 m! b/ T
unzip sregex.zip
7 h1 v ?) v+ Z6 T3 ccd sregex
. D. a0 q2 L+ b5 _8 M- cmake && make install- }! o8 i5 _6 Q2 w2 B: Q0 ^
ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.1/ b. y5 h8 [6 D6 W+ y9 l$ y! j
8 d6 H: t4 O" x# Q! p4 b. Z
安装nginx
: ` B. U D2 P4 K8 N& Wcd nginx-1.9.6 |' U' y9 b" c: Y \6 n
8 k' u# k7 }4 o+ z* V# f/ 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
( L: R7 ?; P2 p' n2 a5 ? |