环境说明:
nginx1:192.168.2.47
nginx2:192.168.2.48
tomcat1:192.168.2.49
tomcat2:192.168.2.50
vip:192.168.2.51
一.Nginx配置
1.安装Nginx所需pcre库
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
tar -zxvf pcre-8.10.tar.gz
cd pcre-8.10
./configure
make
make install
2.安装Nginx
wget http://nginx.org/download/nginx-0.8.52.tar.gz
groupadd www
useradd -g www www
tar zxvf nginx-0.8.52.tar.gz
cd nginx-0.8.52/
./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_stub_[......]