How To Install logcheck on CentOS 7

In this tutorial we learn how to install logcheck on CentOS 7. logcheck is Analyzes log files and sends noticeable events as email

Introduction

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

What is logcheck

Logcheck is a simple utility which is designed to allow a system administrator to view the log-files which are produced upon hosts under their control. It does this by mailing summaries of the log-files to them, after first filtering out “normal” entries. Normal entries are entries which match one of the many included regular expression files contain in the database.

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

Install logcheck on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install logcheck

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

sudo dnf -y install logcheck

How To Uninstall logcheck on CentOS 7

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

sudo dnf remove logcheck

References

Summary

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