How To Install logwatch on CentOS 7

In this tutorial we learn how to install logwatch on CentOS 7. logwatch is A log file analysis program

Introduction

In this tutorial we learn how to install logwatch on CentOS 7.

What is logwatch

Logwatch is a customizable, pluggable log-monitoring system. It will go through your logs for a given period of time and make a report in the areas that you wish with the detail that you wish. Easy to use - works right out of the package on many systems.

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

Install logwatch on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install logwatch

Install logwatch on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install logwatch

How To Uninstall logwatch on CentOS 7

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

sudo dnf remove logwatch

References

Summary

In this tutorial we learn how to install logwatch on CentOS 7 using yum and dnf.