How To Install apcupsd on AlmaLinux 8

In this tutorial we learn how to install apcupsd in AlmaLinux 8. apcupsd is APC UPS Power Control Daemon

Introduction

In this tutorial we learn how to install apcupsd on AlmaLinux 8.

What is apcupsd

Apcupsd can be used for controlling most APC UPSes. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exausted, a timeout (seconds) expires, or the battery runtime expires based on internal APC calculations determined by power consumption rates. If the power is restored before one of the above shutdown conditions is met, apcupsd will inform users about this fact. Some features depend on what UPS model you have (simple or smart).

We can use yum or dnf to install apcupsd on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install apcupsd.

Install apcupsd on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install apcupsd using dnf by running the following command:

sudo dnf -y install apcupsd

Install apcupsd on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install apcupsd using yum by running the following command:

sudo yum -y install apcupsd

How To Uninstall apcupsd on AlmaLinux 8

To uninstall only the apcupsd package we can use the following command:

sudo dnf remove apcupsd

References

Summary

In this tutorial we learn how to install apcupsd on AlmaLinux 8 using yum and dnf.