How To Install fence-agents-base on Ubuntu 22.04

In this tutorial we learn how to install fence-agents-base on Ubuntu 22.04. fence-agents-base is Fence Agents for Red Hat Cluster curated by Ubuntu

Introduction

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

What is fence-agents-base

fence-agents-base is:

Red Hat Fence Agents is a collection of scripts to handle remote power management for several devices. They allow failed or unreachable nodes to be forcibly restarted and removed from the cluster.

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

Fence agents included: fence_idrac: IPMI fence_ilo3: IPMI fence_ilo4: IPMI fence_ilo5: IPMI fence_imm: IPMI fence_ipmilan: IPMI fence_ipmilanplus: IPMI fence_mpath: multipath persistent reservation fence_sbd: sbd fence_scsi: SCSI persistent reservation fence_virsh: virsh

There are three methods to install fence-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 fence-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 fence-agents-base using apt-get by running the following command:

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

Install fence-agents-base Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install fence-agents-base

Install fence-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 fence-agents-base using aptitude by running the following command:

sudo aptitude -y install fence-agents-base

How To Uninstall fence-agents-base on Ubuntu 22.04

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

sudo apt-get remove fence-agents-base

Uninstall fence-agents-base And Its Dependencies

To uninstall fence-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 fence-agents-base

Remove fence-agents-base Configurations and Data

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

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

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

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

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

References

Summary

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