Configuring and Installing Nagios Core 4 on CentOS 6 & 7
Step 1 > download the rpm in /tmp from epel
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm (64bit)
#wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm (64bit)
tmp]#ll -lrt (you can see the Downloaded rpm)
now change the permission of epel rpm's
#chmod 755 /tmp/epel_press_tab
#chmod 755 /tmp/remi_press_tab
Now you check the permission and install the rpm
#ls -lrt /tmp
#rpm -ivh epel-release*
#rpm -ivh remi-release*
now install the Nagios, Nagios-plugin-all ,nrpe php, httpd
#yum install -y nagios nagios-plugins-all nagios-plugins-nrpe nrpe php httpd
make sure iptables is off if on then add the following line in iptables
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#service iptables restart
now confgiure the nagios contact file for alerts on email
#vim /etc/nagios/objects/contacts.cfg
go on line number 35
email replace root@localhost to you email
email techwithtechie@gmail.com ; <<******
:wq! (Save and exit)
this is optional if you want to access nagios console from particular IP then u can configure
#vi /etc/httpd/conf.d/nagios.conf
type after open the file :se nu (to see line numbers in vim )
after that uncomment the line number 15 and 16
# Order allow, deny
# Allow from all
uncoment both line and now go to the line number 17 18 and 19
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1 10.91.142.101/23
uncomment the all three line
Order deny,allow
Deny from all
Allow from 127.0.0.1 10.91.142.101/23
Now set the password for nagiosadmin user
#htpasswd /etc/nagios/passwd nagiosadmin
new-passwd:
Re-type-passwd:
Now start the Nagios and httpd services
#/etc/init.d/nagios start
#/etc/init.d/httpd start
#chkconfig nagios on
#chkconfig httpd on
now access Nagios Console url:
http://localhost/nagios
http://IP_Address_of_your_system/nagios
http://127.0.0.1/nagios/
enter the user name nagios admin
enter Password what you have set.
Done.
might be someone face error like this
Forbidden
You don't have permission to access /nagios/cgi-bin//status.cgi on this server.
Apache/2.2.15 (CentOS) Server at 10.91.142.101 Port 80
that can be issue of ip conflict issue please set valid IP.
Thanks
Vijay Thakur
Step 1 > download the rpm in /tmp from epel
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm (64bit)
#wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm (64bit)
tmp]#ll -lrt (you can see the Downloaded rpm)
now change the permission of epel rpm's
#chmod 755 /tmp/epel_press_tab
#chmod 755 /tmp/remi_press_tab
Now you check the permission and install the rpm
#ls -lrt /tmp
#rpm -ivh epel-release*
#rpm -ivh remi-release*
now install the Nagios, Nagios-plugin-all ,nrpe php, httpd
#yum install -y nagios nagios-plugins-all nagios-plugins-nrpe nrpe php httpd
make sure iptables is off if on then add the following line in iptables
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#service iptables restart
now confgiure the nagios contact file for alerts on email
#vim /etc/nagios/objects/contacts.cfg
go on line number 35
email replace root@localhost to you email
email techwithtechie@gmail.com ; <<******
:wq! (Save and exit)
this is optional if you want to access nagios console from particular IP then u can configure
#vi /etc/httpd/conf.d/nagios.conf
type after open the file :se nu (to see line numbers in vim )
after that uncomment the line number 15 and 16
# Order allow, deny
# Allow from all
uncoment both line and now go to the line number 17 18 and 19
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1 10.91.142.101/23
uncomment the all three line
Order deny,allow
Deny from all
Allow from 127.0.0.1 10.91.142.101/23
Now set the password for nagiosadmin user
#htpasswd /etc/nagios/passwd nagiosadmin
new-passwd:
Re-type-passwd:
Now start the Nagios and httpd services
#/etc/init.d/nagios start
#/etc/init.d/httpd start
#chkconfig nagios on
#chkconfig httpd on
now access Nagios Console url:
http://localhost/nagios
http://IP_Address_of_your_system/nagios
http://127.0.0.1/nagios/
enter the user name nagios admin
enter Password what you have set.
Done.
might be someone face error like this
Forbidden
You don't have permission to access /nagios/cgi-bin//status.cgi on this server.
Apache/2.2.15 (CentOS) Server at 10.91.142.101 Port 80
that can be issue of ip conflict issue please set valid IP.
Thanks
Vijay Thakur
No comments:
Post a Comment