How To Install nagios on CentOS 7

In this tutorial we learn how to install nagios on CentOS 7. nagios is Host/service/network monitoring program

Introduction

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

What is nagios

Nagios is a program that will monitor hosts and services on your network. It has the ability to send email or page alerts when a problem arises and when a problem is resolved. Nagios is written in C and is designed to run under Linux (and some other *NIX variants) as a background process, intermittently running checks on various services that you specify. The actual service checks are performed by separate “plugin” programs which return the status of the checks to Nagios. The plugins are available at https This package provides the core program, web interface, and documentation files for Nagios. Development files are built as a separate package.

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

Install nagios on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install nagios

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

sudo dnf -y install nagios

How To Uninstall nagios on CentOS 7

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

sudo dnf remove nagios

References

Summary

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