Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2814070
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类:

2010-02-25 17:21:03

下载libnet,因为heartbeat需要libnet才能安装, 先要安装libnet,才可以安装heartbeat

否则如图:


显然是缺少libnet,安装后即可!

开始下载的软件为Heartbeat-3-0-STABLE-3.0.2.tar.bz2 在编译过程中出现问题!

换成heartbeat-2.0.8.tar.gz即可!

heartbeat-2.0.8.tar.gz的安装方法:

  tar zxvf heartbeat-2.0.8.tar.gz

    cd heartbeat-2.0.8

 ./ConfigureMe configure

    make

make install

 

[root@nodelb2 ha.d]# /etc/init.d/heartbeat start

Starting High-Availability services:

                                                           [FAILED]

heartbeat[7451]: 2010/02/25_11:00:47 ERROR: Current node [nodelb2] not in configuration!

heartbeat[7451]: 2010/02/25_11:00:47 info: By default, cluster nodes are named by `uname -n` and must be declared with a 'node' directive in the ha.cf file.

heartbeat[7451]: 2010/02/25_11:00:47 info: See also:

heartbeat[7451]: 2010/02/25_11:00:47 WARN: Logging daemon is disabled --enabling logging daemon is recommended

heartbeat[7451]: 2010/02/25_11:00:47 ERROR: Configuration error, heartbeat not started.

解决方法:

[root@nodelb2 ha.d]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1       localhost.localdomain   localhost

172.17.61.126   loadlb1

172.17.61.127   loadlb2

[root@nodelb2 ha.d]# hostname

nodelb2  ##显然不对应!

[root@nodelb2 ha.d]# cat ha.cf | grep -n node

3:#     of nodes listed {"node ...} one of {serial, bcast, mcast, or ucast},

138:#   automatically fail back to its "primary" node, or remain

139:#   on whatever node is serving it until that node fails, or

146:#                   where all nodes do not yet support

171:#       NOTE: it is up to you to maintain this file on each node in the

214:#   node    nodename ...    -- must match uname -n

215:node        loadlb1

216:node        loadlb2

222:#   note: don't use a cluster node as ping node

271:#   hopfudge maximum hop count minus number of nodes in config

274:#   deadping - dead time for ping nodes

[root@nodelb2 ha.d]# vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1       localhost.localdomain   localhost

172.17.61.126   nodelb1

172.17.61.127   nodelb2

~

 

 

 

 

 

启动ldirectord失败:

[root@nodelb1 ha.d]# /etc/init.d/ldirectord start

Starting ldirectord Can't locate Mail/Send.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/sbin/ldirectord line 3417.

BEGIN failed--compilation aborted at /usr/sbin/ldirectord line 3417.

                                                           [FAILED]

 原因:缺少perl-MailTools-*软件包!

 

[root@nodelb1 perlMailTools]# rpm -ivh perl-MailTools-1.74-1.el4.rf.noarch.rpm

warning: perl-MailTools-1.74-1.el4.rf.noarch.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6

error: Failed dependencies:

        perl(Date::Format) is needed by perl-MailTools-1.74-1.el4.rf.noarch

        perl(Date::Parse) is needed by perl-MailTools-1.74-1.el4.rf.noarch

显然perl-MailTools依赖于perl-TimeDate

先安装:

rpm -ivh perl-TimeDate-1.16-1.2.el4.rf.noarch.rpm

rpm -ivh perl-MailTools-1.74-1.el4.rf.noarch.rpm

上面问题即可解决!

 

[root@nodelb1 perlMailTools]# /etc/init.d/ldirectord  start

Starting ldirectord Can not find ipvsadm at /usr/sbin/ldirectord line 646.

 显然是确实:ipvsadm

需要安装:ipvsadm,见http://blog.chinaunix.net/u2/83111/showart_2178204.html

 

安装好ipvsadm后,启动ldirectord如下

[root@nodelb2 i386]# /etc/init.d/ldirectord  start

Starting ldirectord                                        [  OK  ]

留作笔记!

 

问题:

/usr/lib/ocf/resource.d/heartbeat/IPaddr2: line 277: [: too many arguments
解决方法:
I've noticed SYSTYPE is not define before line 277 in 
/usr/lib/ocf/resource.d/heartbeat/IPaddr2 :
 
I've add line SYSTYPE="`uname -s`" (copy from 
/usr/lib/ocf/resource.d/heartbeat/IPaddr) and it's running correctly now.




root@nodelb1 heartbeat]# service ipvsadm start

Clearing the current IPVS table:                           [  OK  ]Applying IPVS configuration:

/etc/init.d/ipvsadm: line 62: /etc/sysconfig/ipvsadm: No such file or directory


                                                        

[FAILED]

解决方法:
root@node1 ha.d]# service ipvsadm save


Saving IPVS table to /etc/sysconfig/ipvsadm:       
       [  OK  ]

[root@node1 ha.d]# service ipvsadm start

Clearing the current IPVS table:          
              
 [  OK  ]

Applying IPVS configuration:          
                
  [  OK  ]




阅读(2743) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~