Pacemaker and Corosync 构建HA

发布时间:2020-08-03 07:02:37 作者:caidui
来源:网络 阅读:340

参考文章:http://www.6tech.org/2013/03/linux-firewall-cluster-with-pacemaker-and-corosync/
系统 centos6.4-x86_64
前提 各节点服务器 1构建第三方源配置完毕;2搭建好rsync服务。
(第三方源 http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-6/x86_64/)
安装基本软件(各节点服务器)

yum install -y vim git make automake gcc gcc-c++ glibc gd gd-devel glib-devel glibc-headers wget curl tar nc libcurl-devel openssl-devel zlib-devel zlib patch readline readline-devel libffi-devel curl-devel zip rsync ruby rubygems ruby-devel  htop mlocate python-dateutil redhat-rpm-config ntp

修改hosts文件,添加虚拟IP解析

vim /etc/hosts
 
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.0.101      vm01-centos
10.0.0.102      vm02-centos
10.0.0.103      vm03-centos

Install Pacemaker: (Do on all servers)

yum install -y pacemaker cman ccs corosync pssh crmsh

添加开机启动

chkconfig pacemaker on

Create Corosync Key: (Only do on the first server)

corosync-keygen

Set permissions on the key: (Do first server)

chown root:root /etc/corosync/authkeychmod 400 /etc/corosync/authkey

拷贝至其他节点

rsync –avh /etc/corosync/authkey root@10.0.0.101:/etc/corosync/authkeyrsync –avh /etc/corosync/authkey root@10.0.0.103:/etc/corosync/authkey

Install a base corosync config: (Do on first server)

cp /etc/corosync/corosync.conf.example /etc/corosync/corosync.conf


推荐阅读:
  1. 怎样进行 HA Package Yum源配置
  2. 如何分析MySQL Group Replication

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ha corosync pacemaker

上一篇:搭建Swarm群集

下一篇:Cisco之中小企业网络(STP_HSRP)

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》