Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1957613
  • 博文数量: 176
  • 博客积分: 1857
  • 博客等级: 上尉
  • 技术积分: 2729
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-14 22:55
个人简介

吾生有涯,而知无涯,适当止学.循序渐进,步步提升 Talk is cheap, show me the code.

文章分类

全部博文(176)

文章存档

2019年(1)

2018年(14)

2017年(20)

2016年(31)

2015年(15)

2014年(5)

2013年(10)

2012年(80)

分类: Mysql/postgreSQL

2012-08-23 17:19:46

------------------------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
阅读(1524) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

zhangshengdong2012-08-24 15:32:59

如果配置了mysql的启动脚本。可以做个软连接,自动化一条龙

ln -s /etc/init.d/mysql /etc/ha.d/resource.d/mysql