Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Pacemaker and Corosync to build HA

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Reference article: http://www.6tech.org/2013/03/linux-firewall-cluster-with-pacemaker-and-corosync/

System centos6.4-x86_64

The premise is that each node server 1 is configured to build a third-party source, and 2 to build a rsync service.

(third-party source http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-6/x86_64/)

Install basic software (each node server)

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

Modify hosts file to add virtual IP parsing

Vim / etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain610.0.0.101 vm01-centos10.0.0.102 vm02-centos10.0.0.103 vm03-centos

Install Pacemaker: (Do on all servers)

Yum install-y pacemaker cman ccs corosync pssh crmsh

Add boot boot

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

Copy to another node

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report