准备文件:
2 k! V* w' }% y' k0 C/ _( cwget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
: W. E4 G c @3 H6 u# Ntar xvzf openssl-1.0.2d.tar.gz& x- |. x8 Z, k& A
' w& J. A4 I/ m& F8 y
7 ?4 g5 P, W/ T! Uwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
; F" d" ?) A- M! jtar xvzf pcre-8.37.tar.gz
7 G3 ?: k+ n0 q/ J2 U- I3 z" X! n6 O/ J5 C8 v
( Y2 `( P5 {2 L$ ]
wget http://nginx.org/download/nginx-1.9.6.tar.gz
0 ^. t" N' I8 ~( o y4 Jtart xvzf nginx-1.9.6.tar.gz! ^9 S M; v7 ?3 C0 ]) U' K
5 g; _* S0 r9 R& R4 y3 `% O! h8 s9 l
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip/ z8 _# n$ @% T2 n
mv master.zip replace-filter-nginx-module-master.zip
0 Z3 Z, ?, N" Y! T- S, t1 }! Yunzip replace-filter-nginx-module-master.zip* p! \1 o( a( c4 p" ]& w
% u5 A. K5 l8 @3 w7 T8 z, Y安装sregex
( | ]1 ~+ r+ Pwget https://github.com/openresty/sregex/archive/master.zip
& X* z+ G7 l. o' [mv master.zip sregex.zip
e. Y f, f7 A9 d+ Iunzip sregex.zip' G% R1 {) r' C& {9 I
cd sregex }) T. ]- ?. o4 M" Y r
make && make install
- d0 B% y! n; Q# t3 C; nln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.11 V0 I. R% i! r: C; R
4 j+ }% T( g7 \
安装nginx1 A/ P3 u: g/ N0 ~' k
cd nginx-1.9.69 _+ }/ {9 r; k
% V# Z& c9 a% Z
[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 4 P* g5 O1 a9 K \' B
|