How to Install Nagios Core on CentOS, Fedora, or RHEL Server by Jay August 28, 2014 3 Minutes Read Nagios® Core™ is the industry standard Open Source system and network monitoring application which enables organizations to identify, resolve IT infrastructure problems before they affect critical business processes. It watches hosts and services that you specify, alerting you when things go bad and when they get better. Nagios Core serves as one of the foundation blocks of Nagios XI – commercial monitoring solution. It was originally designed to run under Linux, although it should work under most other unices as well. Steps to install : STEP-1: Install prerequisites packages # yum install gd gd-devel httpd php gcc glibc glibc-common STEP-2: Disable selinux. open the file: /etc/selinux/config by issuing the following command # vi /etc/selinux/config Then, type “disable” opposite to “SELINUX” e.g SELINUX= disable STEP-3: Create a user “nagios” and set password for it by typing the below commands. # /usr/sbin/useradd -m nagios # passwd nagios STEP-4: Create a new group “nagios” for allowing external commands to be submitted through the web interface and add both the nagios user and the apache user to the group by following the below steps # /usr/sbin/groupadd nagios # /usr/sbin/usermod -a -G nagios nagios # /usr/sbin/usermod -a -G nagios apache STEP-5: Create a directory “download “ and download nagios-core and plugins to it. # mkdir download # cd download # wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.4.4.tar.gz # wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz STEP-6: Compile and Install nagios-core package by following below steps Change directory to “download” folder # cd ~/download Untar the nagios-core tar bal # tar xzf nagios-3.4.4.tar.gz Change the directory to “nagios-3.4.4” # cd nagios-3.4.4 Configure the package and install # ./configure # make all # make install # make install-init # make install-commandmode # make install-config # make install-webconf STEP-7: Create a password to log in to the web interface by issuing the following command. # htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin STEP-8: Start the service and set it on chkconfig to start at booting time. # service nagios start # chkconfig nagios on STEP-9: Compile and Install nagios-plugin package by following below steps. Change directory to “download” folder # cd ~/download Untar nagios-plugin tar ball # tar xzf nagios-plugins-1.4.16.tar.gz Change the directory to “nagios-plugins-1.4.16” # cd nagios-plugins-1.4.16 Configure the package and install. # ./configure # make # make install STEP-10:Start the apache service and enable it on boot by issuing following command. # service httpd start # chkconfig httpd on STEP-11: Now, connect to your nagios server through browser by typing. # http://Your-Nagios-IP/nagios or http://localhost/nagios Then, enter login credentials. Username: nagiosadmin & password you have chosen earlier Features of NAGIOS Core Monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.) Monitoring of host resources (processor load, disk usage, etc.) Simple plugin design that allows users to easily develop their own service checks Parallelized service checks Ability to define network host hierarchy using “parent” hosts, allowing detection of and distinction between hosts that are down and those that are unreachable Contact notifications when service or host problems occur and get resolved (via email, pager, or user-defined method) Ability to define event handlers to be run during service or host events for proactive problem resolution Automatic log file rotation Support for implementing redundant monitoring hosts Optional web interface for viewing current network status, notification and problem history, log file, etc. Recommended Blog: How to install and configure Jaspersoft in Linux Server(RHEL/Centos/Fedora) I hope you liked this topic, if you have any questions or comments please feel free to put under comments! Related Posts: Top 10 simple tools you should know for working with remote team 10 Useful WordPress Functions You Can’t Live Without! Bring Down your WordPress page-load time to Milliseconds in 7 easy steps Tags: Fedora, RHEL Jayadev Das firstname.lastname@example.org Do what you do best in – that’s what I’ve always believed in and that’s what I preach. Over the past 25+ years (yup that’s my expertise ‘n’ experience in the Information Technology domain), I’ve been consulting to small, medium and large companies ‘bout Web Technologies, Mobile Future as well as on the good-and-bad of tech. Blogger, International Business Advisor, Web Technology Expert, Sales Guru, Startup Mentor, Insurance Sales Portal Expert & a Tennis Player. And top of all – a complete family man!