How To Install watchdog on AlmaLinux 8

In this tutorial we learn how to install watchdog in AlmaLinux 8. watchdog is Software and/or Hardware watchdog daemon

Introduction

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

What is watchdog

The watchdog program can be used as a powerful software watchdog daemon or may be alternately used with a hardware watchdog device such as the IPMI hardware watchdog driver interface to a resident Baseboard Management Controller (BMC). watchdog periodically writes to /dev/watchdog; the interval between writes to /dev/watchdog is configurable through settings in the watchdog sysconfig file. This configuration file is also used to set the watchdog to be used as a hardware watchdog instead of its default software watchdog operation. In either case, if the device is open but not written to within the configured time period, the watchdog timer expiration will trigger a machine reboot. When operating as a software watchdog, the ability to reboot will depend on the state of the machine and interrupts. When operating as a hardware watchdog, the machine will experience a hard reset (or whatever action was configured to be taken upon watchdog timer expiration) initiated by the BMC.

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

Install watchdog 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 watchdog using dnf by running the following command:

sudo dnf -y install watchdog

Install watchdog 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 watchdog using yum by running the following command:

sudo yum -y install watchdog

How To Uninstall watchdog on AlmaLinux 8

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

sudo dnf remove watchdog

References

Summary

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