Nginx+keepalive 负载均衡
1 规划和准备 两台相同配置的web 用途 IP MASTER 192.168.1.100 BACKUP 192.1681.101 2 安装 两台接入服务器分别安装NginX和keepalived: 准备依赖包: yum -y install gcc pcre-devel zlib-devel openssl-devel yum -y install popt-devel 下载 wget http://nginx.org/download/nginx-1.2.4.tar.gz wget http://www.keepalived.org/software/keepalived-1.2.7.tar.gz 安装NginX 安装keepalive tar zxvf keepalived-1.2.7.tar.gz cd keepalived-1.2.7 ./configure make make install cp /usr/local/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/ cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/ mkdir /etc/keepalived cp /usr/local/etc/keepalived/keepalived.conf /etc