概述
一、heartbeat
1、安装heartbeat
见Heartbeat安装及简单配置
2、配置参数
2.1)/etc/ha.d/ha.cf
logfile /var/log/ha-log
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
ucast eth1 10.10.10.2
auto_failback off
watchdog /dev/watchdog
node node1
node node2
ping 192.168.1.1
respawn hacluster /usr/lib/heartbeat/ipfail
2.2)/etc/ha.d/haresources
node1 IPaddr::192.168.1.100/24/eth0/ drbddisk Filesystem::/dev/drbd0::/opt/mysql::ext3 mysql
2.3)/etc/ha.d/authkeys
auth 1
1 crc
二、DRBD
1、DRBD安装
见DRBD安装配置说明
2、/etc/drbd.conf
global {
usage-count yes;
}
common {
syncer { rate 10M; }
}
resource r0 {
protocol C;
disk {
on-io-error detach;
}
net {
after-sb-0pri disconnect;
after-sb-1pri disconnect;
after-sb-2pri disconnect;
rr-conflict disconnect;
}
on node1 {
device /dev/drbd0;
disk /dev/sdb1;
address 10.10.10.1:7788;
meta-disk internal;
}
on node2 {
device /dev/drbd0;
disk /dev/sdb1;
address 10.10.10.2:7788;
meta-disk internal;
}
}
三、mysql
1、mysql安装
见mysql 5.5二进制文件安装
四、服务配置
1、配置mysql服务器(不要设置开机启动,由heartbeat控制)
修改mysql.server文件
basedir=/opt/mysql/product/5.5
datadir=/opt/mysql/mysqldata
mv /opt/mysql/product/5.5/support-files/mysql.server /etc/init.d/mysql
2、配置heartbeat
chkconfig –add heartbeat
chkconfig heartbeat on
最后
以上就是贪玩樱桃为你收集整理的heartbeat drbd mysql_heartbeat+drbd+mysql高可用配置的全部内容,希望文章能够帮你解决heartbeat drbd mysql_heartbeat+drbd+mysql高可用配置所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复