Pacemaker的基本介绍详细可参考上篇博文:
https://blog.youkuaiyun.com/weixin_44224288/article/details/89553482
一.实验环境
主机名(IP) | 服务 |
---|---|
server1(172.25.254.1) | haproxy,pacemaker+corosync |
server2(172.25.254.2) | 后端服务器(apache) |
server3(172.25.254.3) | 后端服务器 (apache) |
server4(172.25.254.4) | haproxy,pacemaker+corosync |
二.pacemaker+haproxy的部署实现如下
1.server1
- (1).
配置高级yum源,添加下载pacemaker软件时所需要的安装包
文件编辑内容如下:
- (2)
安装pacemaker+corosync软件
- (3)
配置文件的编辑,首先复制配置文件的模版
[root@server1 yum.repos.d]# cp /etc/corosync/corosync.conf.example /etc/corosync/corosync.conf
[root@server1 yum.repos.d]# vim /etc/corosync/corosync.conf
配置文件编辑的详细内容解释如下:
# Please read the corosync.conf.5 manual page
compatibility: whitetank