Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Pacemaker and Corosync to build HA

Shulou Source: shulou.com Published: 2022-06-01 02:59:42 10月04日 Update

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

Tags: Node service server third party premise copy file article system software built reference configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno vpn Shulou Technology NVidia MySQL