16.2 Installing Pacemaker and Corosync

On each node in the cluster, install the pcs and pacemaker software packages along with all available resource and fence agents from the Oracle Linux yum server or from the Unbreakable Linux Network.

# yum install pcs pacemaker resource-agents fence-agents-all

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

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

To use the pcs command to configure and manage your cluster, a password must be set on each node for the hacluster user. It is helpful if the password that you set for this user is the same on each node. Use the passwd command on each node to set the password:

# passwd hacluster

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 using the following commands:

# systemctl start pcsd.service
# systemctl enable pcsd.service