Heartbeat由glue,heartbeat,agents三部分组成,因此我们需要安装分别安装,下面是安装之前必须安装的一些工具。
yum install gcc flex bison net-snmp OpenIPMI python
yum install gcc gcc-c++ autoconf automake libtool glib2-devel libxml2-develbzip2-devel e2fsprogs-devel libxslt-devel libtool-ltdl-devel make wget docbook-dtds docbook-style-xsl
这些软件要确定已经安装好,这样会省去很多麻烦,就不会报下面的错,其中libtool-ltdl-devel不在镜像的yum原里面,需要自己下载RPM安装包。http://rpm.pbone.net/index.php3/stat/4/idpl/15990892/dir/scientific_linux_6/com/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm.html
1、下载安装glue.
下载glue:http://hg.linux-ha.org/glue/archive/glue-1.0.8.tar.bz2
把这个压缩包放到/usr/local/src目录下,然后解压缩
[root@localhost src]#tar -jxvf glue-1.0.8.tar.bz2
[root@localhost src]#ll
当前目录下出现个Reusable-Cluster-Components-glue--glue-1.0.8这个目录,进入到这个目录
[root@localhost src]#cd Reusable-Cluster-Components-glue--glue-1.0.8
[root@localhost Reusable-Cluster-Components-glue--glue-1.0.8 ]#./autogen.sh
此时报错翻译后是需要安装libtool
[root@localhost Reusable-Cluster-Components-glue--glue-1.0.8 ]#yum install libtool
时候当前目录下会出现一个configure文件
[root@localhost Reusable-Cluster-Components-glue--glue-1.0.8 ]#./configure
报错
checking for special libxml2 includes... configure: error: libxml2 config not found
此时
[root@localhost Reusable-Cluster-Components-glue--glue-1.0.8 ]#yum -y install libxml2 libxml2-devel(有的时候libxml2是已经默认安装的,只需要安装第二个,两个必须都安装)
再次执行configure,报错如下
configure: error: BZ2 libraries not found,解决办法:
yum -y install bzip2-devel glib2-devel
再次执行configure文件就不会报错了。执行成功如下
然后
[root@localhost Reusable-Cluster-Components-glue--glue-1.0.8 ]#make
报错如下
gmake[1]: Entering directory `/usr/local/src/Reusable-Cluster-Components-glue--glue-1.0.8/libltdl'
gmake[1]: *** No rule to make target `all'. Stop.
gmake[1]: Leaving directory `/usr/local/src/Reusable-Cluster-Components-glue--glue-1.0.8/libltdl'
make: *** [all-recursive] Error 1
[root@localhost Reusable-Cluster-Components-glue--glue-1.0.8 ]#make clean //删除编译的文件。
报这个错是因为
libtool-ltdl-devel这个软件没有安装,可以到http://rpm.pbone.net/index.php3/stat/4/idpl/15990892/dir/scientific_linux_6/com/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm.html这个网址下载它的RPM包,这个包没有多余的依赖,直接rpm -ivh libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm 进行安装即可。
此时可以把刚刚解压缩的Reusable-Cluster-Components-glue--glue-1.0.8删除,重新解压缩,从新操作。
再次执行make,报错如下
/usr/bin/xsltproc \
--xinclude \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl hb_report.xml
error : connection refused
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
gmake[2]: *** [hb_report.8] Error 4
gmake[2]: Leaving directory `/usr/local/src/Reusable-Cluster-Components-glue--glue-1.0.8/doc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/src/Reusable-Cluster-Components-glue--glue-1.0.8/doc'
make: *** [all-recursive] Error 1
解决办法yum -y install docbook*再重新执行configure,重新make这样就OK了