rehat7/contos7 HA安装配置

修改配置文件:vim /etc/hostname

主、master

备、slave

主、备都加入ip和主机名

vim /etc/hosts

192.168.91.128 master

192.168.1.106 slave

添加 Haclient 组和 Hacluster 账户。这个用户主要用来配置respawn的。

# groupadd haclient
# useradd -g haclient hacluster -M -s /sbin/nologin

安装libaio

cluster-glue依赖的库。libaio是Linux下的一个异步非阻塞接口,它提供了以异步非阻塞方式来读写文件的方式,读写效率比较高。

 [root@master ~]# yum install libaio-devel

 安装cluster-glue

 glue(胶水的意思)是用来粘合Heartbeat、Pacemake以及Resource Agent的一系列类库、工具的集合。

wget http://hg.linux-ha.org/glue/archive/0a7add1d9996.tar.bz2

tar -jxvf

./configure --prefix=/usr/local/heartbeat --sysconfdir=/etc/heartbeat libdir=/usr/local/heartbeat/lib64 LIBS='/lib64/libuuid.so.1'

报错:BZ2 Libraries Not Found

解决办法:

  yum install -y bzip2-devel

重新编译即可

make

报错:gmake[2]: a2x:命令未找到

解决办法:

  yum install -y asciidoc

重新make && make install

yum -y install epel-release

scp  authkeys  ha.cf haresources   slave5:/etc/ha.d/

报错:

bash: scp: command not found

解决方案:

安装openssh-clients

yum install openssh-clients

原文地址:https://www.cnblogs.com/gongfuxiaomaintuan/p/5641515.html