How to install Nagios on CentOS?

0 votes
How to install Nagios on CentOS?
Feb 27 in DevOps Tools by Dipti
24 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Follow these steps:

Install the required packages

yum install httpd php php-cli gcc unzip wget glibc glibc-common gd gd-devel net-snmp

Start services

service httpd start

Set-up user accounts

useradd nagios
passwd nagios

Create a group for nagios and add nagios user to this group

groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache

Install nagios core service

cd /opt/
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.3.tar.gz
tar xzf nagios-4.4.3.tar.gz
cd nagios-4.4.3
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-daemoninit
make install-config
make install-commandmode
make install-exfoliation

Set up Apache configuration

make install-webconf

Configure apache configuration

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
Install Nagios plugin
cd /opt
wget http://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
tar xzf nagios-plugins-2.2.1.tar.gz
cd nagios-plugins-2.2.1

Compile and install Nagios plugin

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

Start Nagios 

service nagios start

Access Nagios in a web browser 

http://nagios.tecadmin.net/nagios/
answered Feb 27 by Avinash

Related Questions In DevOps Tools

0 votes
1 answer

How to install Saltstack on CentOS?

Hey @Dipti, follow these steps to install ...READ MORE

answered Feb 27 in DevOps Tools by Avinash
25 views
0 votes
1 answer

How to deploy kafka cluster on cloud?

You can run kafka in both ways ...READ MORE

answered Jun 14, 2018 in DevOps Tools by DareDev
• 6,670 points
40 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,220 points
59 views
+13 votes
2 answers
0 votes
1 answer

How to install Splunk on CentOS?

Hey Alia,  Follow these steps to install Splunk ...READ MORE

answered Feb 27 in DevOps Tools by Anvit
42 views
0 votes
1 answer

How do i install Nagios on Ubuntu?

 Hey @Kiran, installing Nagios requires you to ...READ MORE

answered Feb 26 in DevOps Tools by Riya
20 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.