Install and Configure a Pacemaker Cluster

1.5 hours
  • 10 Learning Objectives

About this Hands-on Lab

Pacemaker is a high-availability Cluster Resource Manager (CRM) that runs on a group of servers in order to minimize downtime. Resources managed by Pacemaker will be moved in the event of a node failure and can be configured to run in tandem with other resources. In this lesson, you are tasked with installing and configuring a Pacemaker cluster that manages an Apache HTTP server resource as well as an IP resource.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install the required packages for Pacemaker and PCS on each cluster node.

Install the pacemaker and pcs packages.

Start and enable the pcsd service on each cluster node.

On each node, start and enable pcsd.

Set the password for the hacluster user on each cluster node to “pacemaker”.

Set the password for the hacluster user to pacemaker. Do not include the quotes and ignore the bad password warning.

On pacemaker1, use pcs to authenticate to pcsd on the cluster nodes as the hacluster user.

Run the pcs authentication command from pacemaker1 and supply a username and password.

Generate and synchronize the Corosync configuration to both cluster nodes for a cluster named cluster1.

Generate and synchronize the Corosync configuration and start up the cluster.

Set the stonith-enabled property to false.

Set the property with the pcs property command.

Add an IP resource named cluster_ip.

Create an IP resource with the pcs resource command. Name the cluster_ip, with an IP address of, a netmask of 24, and a monitor interval of 30 seconds.

Add an Apache HTTP server as a cluster resource.

Use the pcs resource command to create the resource. The resource should be named apache, use /etc/httpd/conf/httpd.conf as the configuration file, use http://localhost/server-status as the status URL, and have a monitor interval of 1 minute.

Set a colocation constraint so that the `apache` and `cluster_ip` resources always run on the same host.

Use the pcs constraint command to set the colocation constraint.

Set an order constraint so that the `cluster_ip` resource starts before the `apache` resource.

Use the pcs constraint command to set the order constraint.

Additional Resources

The media department in your company is in need of an Apache HTTP server that is highly available. The website must remain active 24 hours a day in order to service customers. As one of the lead Linux engineers, you are tasked with setting up a cluster of servers to support this service.

  1. Install and configure Pacemaker using the pcs command-line utility.
  2. Prepare each host to be used in the cluster and then use pacemaker1 to set up and configure the cluster.
  3. The cluster should be called cluster1 and consist of pacemaker1 and pacemaker2.
  4. An IP resource called cluster_ip with an IP of and an Apache HTTP server resource named apache must both be created in the cluster.
  5. The resources must be configured to run on the same node and to start-up in the following order: cluster_ip followed by apache

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?