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

报错

wKioL1P9LxLT7bd3AAFXArIqtu0678.jpg

yum install autoconf �Cy

报错

wKioL1P9LyXTu48HAAFjBEQh7Sg420.jpg

Yum install automake  -y

报错

wKiom1P9LiKji7ieAAFM3BFD79o007.jpg

Yum install  libtool   -y

wKiom1P9LkaC-bUGAAEMEXkNfIY152.jpg

成功

./configure

报错

wKiom1P9LlOgtkO3AACgInw3esY832.jpg

yum install glib2-devel �Cy

报错

wKioL1P9L3qR39OeAACD5tke5gs357.jpg

Yum install  libxml2  -y

yum install libxml2-devel �Cy

报错

wKiom1P9LnLBEHnLAACH2s5Zf5Y735.jpg

yum install  bzip2-devel  glib2-devel   -y

wKiom1P9LoeCsZDCAAS7bx4q7C0125.jpg

成功

Make

报错

wKioL1P9L9SB-QssAAF2xqq3BLo195.jpg

yum install -y libtool-ltdl-devel

make  clean

./configure 显示wKiom1P9Lu3CnVAHAAArE5rKRIo896.jpg说明成功

Make

报错

wKioL1P9MBqxNQO4AATavFoY5WQ720.jpg

yum install libuuid-devel �Cy

make clean

./configurewKioL1P9MDuT6hm6AABVwXc9lnU451.jpg

luuid才能make成功

Make

报错

wKioL1P9MEvCuZGiAAR8xZyit1Y876.jpg

yum install docbook-style-xsl �Cy

make clean

./configure

Make

wKioL1P9MFzhgmenAAN1Eh_eIWs360.jpg

成功

make install

wKiom1P9L3jiim4bAAHDEL8jJWQ218.jpg

成功

2 安装agent

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

cd ClusterLabs-resource-agents-b735277/

./autogen.sh

wKioL1P9MLuBbYGjAAMRu533mU8338.jpg

成功

./configure

wKiom1P9L7aikp_ZAAPh7p0OrUw287.jpg

成功

Make

wKioL1P9MPSixL42AAGtkb2uGtw156.jpg

成功

make install

wKiom1P9L-rRHOyCAAGFtxm65wQ105.jpg

成功

3 安装heartbeat

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

cd Heartbeat-3-0-7e3a82377fa8

./bootstrap

wKiom1P9L_7i_wLvAABql7tfU80225.jpg

成功

./ConfigureMe configure

wKioL1P9MS6CpEN4AAK0nYHzQM0145.jpg

成功

Make

报错

wKiom1P9MCfTytLdAASC4te1Nnk969.jpg

解决办法

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

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

Make

报错

wKiom1P9MNyT33wZAAGC8VCeyRw205.jpg

解决办法

yum install docbook-style-xsl

yum install libxslt-devel �Cy

make clean

./ConfigureMe configure

Make

wKioL1P9Mgnw8PiDAAK-o49quos007.jpg

成功

Make install

wKiom1P9MQzT0h7qAAGheS9rUmM400.jpg

成功

拷贝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)