Installasi Nagios Pada Debian
--------------------
aagink@gmail.com
--------------------
Install Paket
-------------
nagios:/# aptitude install gcc make apache2 php5 php5-gd php5-cgi
nagios:/usr/src# wget http://transact.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz
nagios:/usr/src# wget http://transact.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz
Buat user & groups nagios
-------------------------
nagios:/# useradd nagios
nagios:/# groupadd nagcmd
nagios:/# usermod -G nagcmd nagios
nagios:/# usermod -G nagcmd www-data
nagios:/# mkdir /usr/local/nagios
nagios:/# chown nagios:nagios /usr/local/nagios
Install Nagios & Nagios-Plugin
-------------------------------
nagios:/usr/src# tar -xzvf nagios-3.0.6.tar.gz
nagios:/usr/src# cd nagios-3.0.6
nagios:/usr/src/nagios-3.0.6# ./configure -with-nagios-user=nagios -with-nagios-group=nagios -with-command-group=nagcmd
nagios:/usr/src/nagios-3.0.6# ./configure -prefix=/usr/local/nagios -with-cgiurl=/nagios/cgi-bin -with-htmurl=/nagios/ -with-nagios-user=nagios -with-nagios-group=nagios -with-command-group=nagios
nagios:/usr/src/nagios-3.0.6# make all
nagios:/usr/src/nagios-3.0.6# make install
nagios:/usr/src/nagios-3.0.6# make install-init
nagios:/usr/src/nagios-3.0.6# make install-commandmode
nagios:/usr/src/nagios-3.0.6# make install-config
nagios:/usr/src# tar -zxvf nagios-plugins-1.4.13.tar.gz
nagios:/usr/src# cd nagios-plugins-1.4.13
nagios:/usr/src/nagios-plugins-1.4.13# ./configure
nagios:/usr/src/nagios-plugins-1.4.13# make && make install
Configure nagios web
---------------------
nagios:/usr/src/nagios-plugins-1.4.13# touch /etc/apache2/sites-available/nagios
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
< Directory "/usr/local/nagios/sbin" >
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
< / Directory >
Alias /nagios /usr/local/nagios/share
< Directory "/usr/local/nagios/share" >
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
< / Directory >
nagios:/usr/src/nagios-plugins-1.4.13# cd /etc/apache2/sites-available/
nagios:/etc/apache2/sites-available# a2ensite nagios
nagios:/etc/apache2/sites-available# /etc/init.d/apache2 reload
Setting Proteksi web nagios
---------------------------
nagios:/etc/apache2/sites-available# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
nagios:/etc/apache2/sites-available# htpasswd /usr/local/nagios/etc/htpasswd.users nagios
nagios:/etc/apache2/sites-available# vim /usr/local/nagios/etc/cgi.cfg
use_authentication=1
------------------------------------------------------------------------------
Test Nagios
buka browser anda ketik http://ipaddressanda/nagios
Read more...