redhat6.2 x86_64  heartbeat的yum源



EPEL=Extra Packages for Enterprise Linux

1.============

   vi /etc/yum.repo.conf/cdrom.repo

   [cdrom]

   name=cdrom

   baseurl=file:///mnt

   enabled=1

   gpgcheck=0

   [LB]

   name=LB

   baseurl=file:///mnt/LoadBalancer

   enable=1

   gpgcheck=0

   [HA]

   name=HA

   baseurl=file:///mnt/HighAvailability

   enable=1

   gpgcheck=0


2.=========

   wget ftp://mirror.switch.ch/pool/1/mirror/scientificlinux/6rolling/x86_64/os/Packages/epel-release-6-5.noarch.rpm


3.=========

   yum clean all

   yum install heartbeat


4.=========

   finish install


5.===========

   heartbeat 3.0.4 配置文件

1>cp /usr/share/doc/heartbeat-3.0.4/authkeys ha.cf haresources /etc/ha.d/

配置ha.cf

logfile    /var/log/ha-log

logfacility    local0

keepalive 2

deadtime 10

warntime 5

initdead 120

udpport    694

bcast    eth0

auto_failback on

node    lv1
   node    lv2

ping 192.168.182.2  #网关

ping_group group1 192.168.182.130 192.168.182.129

respawn hacluster /usr/lib64/heartbeat/ipfail


配置 authkeys

auth 1
   1 crc
   #2 sha1 HI!
   #3 md5 Hello!

配置haresources

lv1    IPaddr::192.168.182.200/32/eth0:0 httpd

2>将上面3个配置文件scp到lv2

chmod 600 authkeys
   scp ha.cf haresources authkeys root@lv2:/etc/ha.d/


6.==========

/etc/init.d/heartbeat start