一、下载相应的软件包
libnet-1.1.6.tar.gz
heartbeat-2.1.3.tar.gz
二、安装软件
tar xzvf libnet.tar.gz
cd libnet
ls
./configure
make
make install
groupadd haclient
useradd hacluster -g haclient
tar xzvf heartbeat-2.0.3.tar.gz
ls
cd heartbeat-2.0.3
ls
./ConfigureMe configure
make
make install
可能出现的错误
cc1: warnings being treated as errors
pils.c:244: error: initialization from incompatible pointer type
pils.c:245: error: initialization from incompatible pointer type
make[2]: *** [pils.lo] Error 1
make[2]: se sale del directorio
`/usr/src/Heartbeat-STABLE-2-1-STABLE-2.1.4/lib/pils'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio
`/usr/src/Heartbeat-STABLE-2-1-STABLE-2.1.4/lib'
make: *** [all-recursive] Error 1
错误。
解决方法:
打开文件lib/pils/Makefile,删除文件里的-Werror字符。
三、配置软件
heartbeat配置说明.doc
注意:配置vip的时候node IPaddr::192.168.35.250/24
1.
heartbeat
启动后,关闭出现异常,提示问题
/etc/init.d/heartbeat: line 253:
/ResourceManager: No such file or directory
解决方式:
vi /etc/
ha.cf/shellfuncs
增加如下信息:
: ${HA_NOARCHBIN:=/usr/share/heartbeat}
四、校验
[root@jmvs8 ha.d]# service heartbeat start
logd is already running
Starting High-Availability services:
Done.
[root@jmvs8 ha.d]#
可能出现的错误“ERROR: glib: Error binding socket (Permission denied). Retrying.”
[root@jmvs8 ha.d]# getenforce
Enforcing
[root@jmvs8 ha.d]# setenforce 0
[root@jmvs8 ha.d]# getenforce
Permissive