柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!
全部博文(1669)
分类: 网络与安全
2013-03-14 13:15:13
2013-03-13 15:48:26| 分类: 高可用Heartbeat | 标签: |字号大中小
Heartbeat仅仅是个HA软件,它仅能完成心跳监控和资源接管,不会监视它控制的资源或应用程序,要监控资源和应用程序是否运行正常,必须使用第三方的插件。Ldirector是一个监控集群服务节点运行状态的插件。Ldirector如果监控到集群节点中某个服务出现故障,就屏蔽此节点的对外连接功能,同时将后续请求转移到正常的节点提供服务,这个插件经常用在LVS负载均衡集群中。
Heartbeat3与2.x 的最大差别在于,3 按模块把的原来2.x 拆分为多个子项目,并且提供了一个cluster-glue的组件,专用于Local Resource Manager 的管理。即heartbeat + cluster-glue + resouce-agent 三部分:
hearbeat本身是整个集群的基础(cluster messaging layer),负责维护集群各节点的信息以及它们之前通信;
cluster-glue相当于一个中间层,可以将heartbeat和crm(pacemaker)联系起来,主要包含2个部分,LRM和STONITH;
resource-agent,就是各种的资源的ocf脚本,这些脚本将被LRM调用从而实现各种资源启动、停止、监控等等。
http://ixdba.blog.51cto.com/2895551/547778/
版本3.x
Heartbeat 3.0.5 + Cluster Glue 1.0.9 + Resource Agents 3.9.2
yum install autoconf automake libtool glib2-devel libxml2-devel bzip2-devel libtool-ltdl-devel libuuid-devel
tar xvjf glue-1.0.9.tar.bz2
cd Reusable-Cluster-Components-glue--glue-1.0.9
./autogen.sh
./configure
make
make install
tar xvjf 7e3a82377fa8.tar.bz2
cd Heartbeat-3-0-7e3a82377fa8
./autogen.sh
./configure ##安装报错的话,使用下个命令代替
./ConfigureMe configure
make
make install
tar xvzf v3.9.2
cd ClusterLabs-resource-agents-b735277
./autogen.sh
./configure ##安装报错的话,使用下个命令代替
./ConfigureMe configure
make
make install
问题一
configure: error: BZ2 libraries not found
yum install bzip2-devel
问题二
Making all in libltdl
gmake[1]: Entering directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/libltdl'
gmake[1]: *** No rule to make target `all'. Stop.
gmake[1]: Leaving directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/libltdl'
make: *** [all-recursive] Error 1
连网的CentOS可以直接yum install libtool-ltdl-devel
RHEL根据libtool-ltdl的版本,网上找相同版本的libtool-ltdl-devel
rpm -q libtool-ltdl
libtool-ltdl-2.2.6-15.5.el6.i686
rpm -ivh libtool-ltdl-devel-2.2.6-15.5.el6.i686.rpm
make clean
./configure ##最后显示Use system LTDL =yes则正常
问题三
./.libs/libplumb.so: undefined reference to `uuid_parse'
./.libs/libplumb.so: undefined reference to `uuid_generate'
./.libs/libplumb.so: undefined reference to `uuid_copy'
./.libs/libplumb.so: undefined reference to `uuid_is_null'
./.libs/libplumb.so: undefined reference to `uuid_unparse'
./.libs/libplumb.so: undefined reference to `uuid_clear'
./.libs/libplumb.so: undefined reference to `uuid_compare'
collect2: ld returned 1 exit status
gmake[2]: *** [ipctest] Error 1
gmake[2]: Leaving directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/lib/clplumbing'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/lib'
make: *** [all-recursive] Error 1
yum install libuuid-devel
问题四
Making all in stonith
gmake[2]: Entering directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/doc/stonith'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/doc/stonith'
gmake[2]: Entering directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/doc'
/usr/bin/xsltproc \
--xinclude \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl hb_report.xml
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl:1: parser error : Document is empty
^
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl:1: parser error : Start tag expected, '<' not found
^
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
gmake[2]: *** [hb_report.8] Error 4
gmake[2]: Leaving directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/doc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/root/Reusable-Cluster-Components-glue--glue-1.0.9/doc'
make: *** [all-recursive] Error 1
这个报错因为要访问http://docbook.sourceforge.net/release/xsl/current/ 目录下的文件造成的,第一次发现源码安装软件需要联网,并且还要翻墙(^_^),本人水平有限,没办法直接翻墙。网页翻墙后下载common html lib manpages四个目录下的文件和VERSION.xsl,然后简易搭建一个httpd服务器,在主目录下新建相同的目录结构,并将所有文件拷贝到相应目录;然后在/etc/hosts文件中将docbook.sourceforge.net指向httpd的IP。(你知道这在干什么吧,做个假的docbook.sourceforge.net服务器)
问题五
./ConfigureMe configure
Configure flags for RedHat Linux: --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-rpath
Running ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-rpath