How To Install resource-agents-base on Ubuntu 22.04

In this tutorial we learn how to install resource-agents-base on Ubuntu 22.04. resource-agents-base is Cluster Resource Agents curated by Ubuntu

Introduction

In this tutorial we learn how to install resource-agents-base on Ubuntu 22.04.

What is resource-agents-base

resource-agents-base is:

This package contains cluster resource agents (RAs) compliant with the Open Cluster Framework (OCF) specification, used to interface with various services in a High Availability environment managed by the Pacemaker resource manager.

This package contains the Resource Agents that are curated by the Ubuntu Server team.

Agents included: IPaddr2: Manages virtual IPv4 and IPv6 addresses (Linux specific version) LVM-activate: This agent activates/deactivates logical volumes. iSCSILogicalUnit: Manages iSCSI Logical Units (LUs) iSCSITarget: iSCSI target export agent iscsi: Manages a local iSCSI initiator and its connections to iSCSI targets

There are three methods to install resource-agents-base on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install resource-agents-base Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install resource-agents-base using apt-get by running the following command:

sudo apt-get -y install resource-agents-base

Install resource-agents-base Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install resource-agents-base using apt by running the following command:

sudo apt -y install resource-agents-base

Install resource-agents-base Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install resource-agents-base using aptitude by running the following command:

sudo aptitude -y install resource-agents-base

How To Uninstall resource-agents-base on Ubuntu 22.04

To uninstall only the resource-agents-base package we can use the following command:

sudo apt-get remove resource-agents-base

Uninstall resource-agents-base And Its Dependencies

To uninstall resource-agents-base and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove resource-agents-base

Remove resource-agents-base Configurations and Data

To remove resource-agents-base configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge resource-agents-base

Remove resource-agents-base configuration, data, and all of its dependencies

We can use the following command to remove resource-agents-base configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge resource-agents-base

References

Summary

In this tutorial we learn how to install resource-agents-base package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.