1. 安装
#可能需要执行两次
yum install
  1. ​配置centos1.mypharma.com​
logfile /var/log/ha-log  #配置日志
logfacility local0 #配置日志等级
keepalive 2 #2秒
deadtime 15 #15秒
#设置单薄方式,3条心跳线路
ucast eth0 112.112.68.172
ucast eth1 10.0.0.2
ucast eth3 192.168.1.2
auto_failback off #primary恢复不回切,保持secondary
  1. 配置
logfile /var/log/ha-log  #配置日志
logfacility local0 #配置日志等级
keepalive 2 #2秒
deadtime 15 #15秒
#设置单薄方式,3条心跳线路
ucast eth0 112.112.68.170
ucast eth1 10.0.0.1
ucast eth3 192.168.1.1
auto_failback off #primary恢复不回切,保持secondary
  1. 配置/etc/ha.d/authkeys
auth 1
1 crc
  1. 其他设定
chmod
  1. DRBD和Heartbeat自启动
service drbd start
chkconfig drbd on
service heartbeat start
chkconfig