CentOS 6U4 i Nagios+Nagios-plugins
Kako teče postavljanje Nagios 4.0.2 na CentOS 6U4 server.
Šta je neophodno za početak :
Apache
PHP
GCC compiler
GD development libraries
A to se sve instalira ovako :
# yum install httpd php
# yum install gcc glibc glibc-common
# yum install gd gd-devel
Napraviti potreban nalog i grupu :
# useradd -m nagios
# passwd nagios
…..
# groupadd nagcmd
# usermod -a -G nagcmd nagios
# usermod -a -G nagcmd apache
Spustiti Nagios i Nagios-plugins :
# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-xxx
# wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-xxx
Instalacija samog Nagios-a
# tar xvfz nagios-4.0.2.tar.gz
# cd nagios-4.0.2
# ./configure –with-command-group=nagcmd
# make all
# make install
# make install-init
# make install-config
# make install-commandmode
Paziti samo da se usput ne pokaže neka greška, inače je OK.
U konfiguracionom fajlu samo ubaciti validnu mail adresu :
# vi /usr/local/nagios/etc/objects/contacts.cfg
Instalacija web interfejsa :
# make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
*** Nagios/Apache conf file installed ***
Odrediti nalog za web pristup Nagios-u :
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
# service httpd restart
Postavljanje Nagios-plugin-ova
# tar xvfz nagios-plugins-1.5.tar.gz
# ./configure –with-nagios-user=nagios –with-nagios-group=nagios
# cd nagios-plugins-1.5
# ./configure –with-nagios-user=nagios –with-nagios-group=nagios
# make
# make install
Startovanje Nagios-a
Provera konfiguracije :
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
…..
Total Warnings: 0
Total Errors: 0
Startovanje servisa :
# service nagios start
Kako se prilazi servisu :
http://IP-adresa-servera/nagios/