How to install Nagios on CentOS

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

1 answer to this question.

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, 2019 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, 2019 in DevOps Tools by Avinash
1,373 views
+2 votes
0 answers

How do I install Maven on CentOS?

I went through below menetioned tutorial https://www.edureka.co/community/38761/how-do-i-install-maven-on-centos but somehow ...READ MORE

Dec 27, 2019 in DevOps Tools by Manoj
• 140 points
818 views
0 votes
1 answer

How to install Logstash in CentOS/RHEL?

Hi@akhtar, To install Logstash on the system, you ...READ MORE

answered Jun 17, 2020 in DevOps Tools by MD
• 95,460 points
4,387 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,890 points
697 views
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,240 points
1,206 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,059 views
0 votes
1 answer

How to install Splunk on CentOS?

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

answered Feb 27, 2019 in DevOps Tools by Anvit
2,375 views
0 votes
1 answer

How do i install Nagios on Ubuntu?

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

answered Feb 27, 2019 in DevOps Tools by Riya
1,084 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP