------------------------heartbeat--------------------------
heartbeat部署:
10.0.17.153 mysql-n1
10.0.17.154 mysql-n2
[root@mysql-n1 ~]# yum -y install heartbeat heartbeat-devel heartbeat-stonith heartbeat-pils(不知道为什么要装两遍)
复制ha.cf,haresources,authkeys
cp -a /usr/share/doc/heartbeat-2.1.3/{ha.cf,authkeys,haresources} /etc/ha.d
chmod 600 /etc/ha.d/authkeys
配置/etc/ha.d/ha.cf
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 1
deadtime 30
warntime 5
initdead 120
ucast eth0 10.0.17.153
auto_failback off
node mysql-n1
node mysql-n2
crm no
配置/etc/ha.d/authkeys
auth 1
1 sha1 HA_MYSQL
配置/etc/ha.d/haresources
mysql-n1 IPaddr::10.0.17.158/24/eth0 drbddisk::data Filesystem::/dev/drbd0::/data::ext3 mysql
启动heartbeat服务:
/etc/init.d/heartbeat start
阅读(1557) | 评论(1) | 转发(0) |