- 安装
yum install -y heartbeat
- 配置centos1.mypharma.com
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 15
ucast eth0 112.112.68.172
ucast eth1 10.0.0.2
ucast eth3 192.168.1.2
auto_failback off
node centos1.mypharma.com centos2.mypharma.com
- 配置
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 15
ucast eth0 112.112.68.170
ucast eth1 10.0.0.1
ucast eth3 192.168.1.1
auto_failback off
node centos1.mypharma.com centos2.mypharma.com
- 配置/etc/ha.d/authkeys
auth 1
1 crc
- 其他设定
chmod 600 /etc/ha.d/authkeys
vim /etc/ha.d/haresources
centos1.mypharma.com IPaddr::112.112.68.174/29/eth0 drbddisk::r0 Filesystem::/dev/drbd0::/drbd::ext3 mysqld
- DRBD和Heartbeat自启动
service drbd start
chkconfig drbd on
service heartbeat start
chkconfig heartbeat on