nginx+keepalived高可用
1.环境两台Centos服务器 IP1:192.168.1.78 IP2:192.168.1.79 VIP:192.168.1.88 2.安装keeplived软件和nginx 每台服务器上都要安装keeplived和nginx nginx安装省略 keepalived安装 tar -xvf keepalived-1.3.5.tar.gz cd keepalived-1.3.5 ./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/keepalived/ cp /usr/local/sbin/keepalived /usr/sbin 配置keepalived 主节点,修改keepalived.conf ! Configuration File for keepalived global_defs { notification_email { #acassen@firewall.loc #failover