码迷,mamicode.com
首页 > 其他好文 > 详细

heartbeat 3.X 源码安装

时间:2014-08-27 11:09:38      阅读:282      评论:0      收藏:0      [点我收藏+]

标签:heartbeat 3.x安装

                                                                 原码安装heartbeat

需要三个包

1.groupadd haclient  

2.useradd -g haclient hacluster 

 

Heartbeat-3-0-7e3a82377fa8.tar.bz2

Reusable-Cluster-Components-glue--glue-1.0.9.tar.bz2

ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar

俩台主机centos6.5

1 安装Glue

tar -jxvfReusable-Cluster-Components-glue--glue-1.0.9.tar.bz2

cdReusable-Cluster-Components-glue--glue-1.0.9

./autogen.sh

报错

bubuko.com,布布扣

yum install autoconf –y

报错

bubuko.com,布布扣

Yum install automake  -y

报错

bubuko.com,布布扣

Yum install  libtool   -y

bubuko.com,布布扣

成功

./configure

报错

bubuko.com,布布扣

yum install glib2-devel –y

报错

bubuko.com,布布扣

Yum install  libxml2  -y

yum install libxml2-devel –y

报错

bubuko.com,布布扣

yum install  bzip2-devel  glib2-devel   -y

bubuko.com,布布扣

成功

Make

报错

bubuko.com,布布扣

yum install -y libtool-ltdl-devel

make  clean

./configure 显示bubuko.com,布布扣说明成功

Make

报错

bubuko.com,布布扣

yum install libuuid-devel –y

make clean

./configurebubuko.com,布布扣

luuid才能make成功

Make

报错

bubuko.com,布布扣

yum install docbook-style-xsl –y

make clean

./configure

Make

bubuko.com,布布扣

成功

make install

bubuko.com,布布扣

成功

2 安装agent

tar -zxvf ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar.gz

cd ClusterLabs-resource-agents-b735277/

./autogen.sh

bubuko.com,布布扣

成功

./configure

bubuko.com,布布扣

成功

Make

bubuko.com,布布扣

成功

make install

bubuko.com,布布扣

成功

3 安装heartbeat

tar -jxvfHeartbeat-3-0-7e3a82377fa8.tar.bz2

cd Heartbeat-3-0-7e3a82377fa8

./bootstrap

bubuko.com,布布扣

成功

./ConfigureMe configure

bubuko.com,布布扣

成功

Make

报错

bubuko.com,布布扣

解决办法

解决方法:Heartbeat-3-0-7e3a82377fa8/lib/plugins/HBcomm/ucast.c

这个文件貌似有问题,删除468int i = 1;应该就能make了。(这个真心坑爹)

Make

报错

bubuko.com,布布扣

解决办法

yum install docbook-style-xsl

yum install libxslt-devel –y

make clean

./ConfigureMe configure

Make

bubuko.com,布布扣

成功

Make install

bubuko.com,布布扣

成功

拷贝doc下面的文件到  /etc/ha.d/目录下:

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

配置

cd /etc/ha.d/

ls

cat README

cd /usr/share/doc/heartbeat-3.0.4/

cp  ha.cfharesources authkeys  /etc/ha.d/

cd /etc/ha.d/

vi ha.cf 更改如下

logfile    /var/log/ha-log

logfacility      local0

keepalive2

deadtime30

warntime          10

initdead   60

udpport             694(最好改下,因为是广播,用同一个的话问题比较有问题)

bcast                  eth0eth0广播

node               node1       (上面的为master主机)

node                   node2uname  -n查看)

ping                   192.168.0.254  #网关

respawn  hacluster/usr/lib64/heartbeat/ipfail

apiauth    ipfail                   gid=hacluster  uid=hacluster

vi authkeys

auth 1

1 crc

chmod 600 authkeys

vi haresources

server51.example.com   IPaddr::192.168.0.92(VIP)/24/eth0 httpd

俩台HA主机上要安装httpd

scp ha.cf authkeys haresources192.168.0.194/etc/ha.d/

/etc/init.d/heartbeat  start

/etc/init.d/heartbeat  start




 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


heartbeat 3.X 源码安装

标签:heartbeat 3.x安装

原文地址:http://7506939.blog.51cto.com/7496939/1545485

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!