准备文件:5 @3 r6 L0 g, v* e( |+ V* n
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
( t2 |; I- K$ t. b2 Xtar xvzf openssl-1.0.2d.tar.gz2 H3 x5 Q, b. h0 |/ f
( y% ]: d# q% @" ?
# E: l. |% ?3 p) H; p6 h
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
0 W0 F& g+ p3 c2 `) Ztar xvzf pcre-8.37.tar.gz' @+ f# ]: O* Y+ r0 D& u- G
3 b( S9 @% ~0 k ^# I) B& Z% `0 {, S0 j
wget http://nginx.org/download/nginx-1.9.6.tar.gz
& x: D* P) i' ltart xvzf nginx-1.9.6.tar.gz
* F L7 L" ?2 T1 i8 _4 G1 d- J$ y+ c( ?1 Q( P6 A' T4 h, I+ I3 S
4 p% a2 L$ e* `5 n. Q1 j- O
wget https://github.com/openresty/replace-filter-nginx-module/archive/master.zip; U P, b2 j1 l3 f& y C
mv master.zip replace-filter-nginx-module-master.zip
8 m" Y( l# o! }; [9 Aunzip replace-filter-nginx-module-master.zip2 T. r, T5 r4 r6 a" _$ a$ C
* y: E+ L0 d6 c: Q3 T7 y+ v安装sregex
& p- W- x( P8 C% E, N3 Wwget https://github.com/openresty/sregex/archive/master.zip6 g% q9 G/ _% @0 p; ^# n1 h; b
mv master.zip sregex.zip
9 Y5 G# C' m. P; [. s ?* ~2 `; d6 U; Punzip sregex.zip
5 v+ d5 t4 x" M. Tcd sregex
% Z4 P1 v; E$ Q/ _) u4 ^make && make install
& J8 n+ p. `2 G1 V2 M- F0 {ln -s /usr/lib/libsregex.so.0 /usr/local/lib/libsregex.so.0.0.16 a1 r6 _* f3 o7 T/ x7 y
9 B! ? R; K6 H6 y
安装nginx3 g9 c3 Z# p& N) |
cd nginx-1.9.63 b6 k( ~& | K9 K. U% S
0 ^; i+ w- k0 A9 j- a* }% v[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 1 Q- S0 S7 f: `4 e3 a# w2 u
|