heartbeat

yum  -y install pkgconfig glib2-devel python-devel pam-devel gnutls-devel swig

wget http://down1.chinaunix.net/distfiles/libnet-1.1.2.1.tar.gz

tar ..

./configure && make && make install


wget http://down1.chinaunix.net/distfiles/heartbeat-2.0.6.tar.gz

groupadd -g 91 haclient

useradd -g haclient -u 91 -s /bin/false -M hacluster

yum install zlib-devel

./ConfigureMe configure --disable-swig --disable-snmp-subagent

make && make install 

cp doc/ha.cf doc/haresources doc/authkeys /etc/ha.d/ 

cp ldirectord/ldirectord.cf /etc/ha.d/ 

配置文件如下

cat ha.cf | grep -v ^#

logfile /var/log/ha-log

logfacility     local0

bcast eth1  //心跳的网卡

keepalive 2

deadtime 30

warntime 10

initdead 120

udpport 694

auto_failback on

node    solrcloud1.isgo.com  //节点1

node    solrcloud2.isgo.com //节点2

ping 10.130.6.254 //网关

respawn hacluster /usr/lib64/heartbeat/ipfail

apiauth ipfail gid=haclient uid=hacluster //用户和用户组

vi /etc/ha.d/haresources在配置文件中添加如下一行

primary 主节点ip mysqld #设置heartbeat管理的资源或服务








cc1: warnings being treated as errors


client_lib.c:1850: error: 'display_orderQ'defined but not used


gmake[2]: *** [client_lib.lo]错误 1


gmake[2]: Leaving directory`/root/heartbeat-2.0.7/lib/hbclient'


gmake[1]: *** [all-recursive]错误 1


gmake[1]: Leaving directory`/root/heartbeat-2.0.7/lib'


make: *** [all-recursive] 错误 1


则将/root/heartbeat-2.0.7/lib/hbclient里的makefile中的所有-Werror删除 (类似报错都需要删除-Werror)


你可能感兴趣的:(heartbeat)