Installing and Enabling the Pacemaker and Corosync Service

On each node in the cluster, install the pcs and pacemaker software packages, along with all of the available resource and fence agents from the Oracle Linux yum server or from ULN, for example:

sudo dnf install pcs pacemaker resource-agents fence-agents-all

If you are running firewalld, add the high-availability service on each of the nodes so that the service components are able to communicate across the network. Per the command that is run in the following example, this step typically enables the following ports: TCP port 2224 (used by the pcs daemon), port 3121 (for Pacemaker Remote nodes), port 21064 (for DLM resources), and UDP ports 5405 (for Corosync clustering), and 5404 (for Corosync multicast, if configured):

sudo firewall-cmd --permanent --add-service=high-availability
sudo firewall-cmd --add-service=high-availability

To use the pcs command to configure and manage your cluster, you must set a password on each node for the hacluster user.

Tip:

It is helpful if you set the same password for this user as the password you set for the user on each node.

Use the passwd command on each node to set the password:

sudo passwd hacluster

Note that to use the pcs command, the pcsd service must be running on each of the nodes in the cluster. You can set this service to run and to start at boot by running the following command:

sudo systemctl enable --now pcsd.service

Note:

When running High Availability Clustering in the cloud, please refer to the following documents: