Install Nagios

HOW TO INSTALL NAGIOS 2.9

ON LINUX CENTOS 5

  1. Server yang akan di Install nagios harus sudah terinstall C/C++ compiler dan apache

  1. Sudah memiliki aplikasi nagios-2.9.tar.gz dan nagios-plugins-1.4.2 yang di simpan dalam sebuah direktori. Misalkan di /home/thariq

  1. Buat sebuah user dan group dengan nama nagios

# useradd nagios

# groupadd nagios

  1. Didalam direktori /home/thariq tersebut, lakukan ekstrak file nagios

# tar xzvf nagios-2.9.tar.gz

  1. Lalu ketikkan perintah untuk konfigurasi file

# cd /home/user/nagios-2.9

# ./configure

  1. Install file-file nagios tersebut

# make all

# make install

# make install-init

# make install-commandmode

# make install-config

  1. Ubah nama file-file yang berada di direktori /usr/local/nagios/etc

file name

file name after rename

cgi.cfg-sample

command.cfg-sample

localhost.cfg-sample

nagios.cfg-sample

cgi.cfg

command.cfg

localhost.cfg

nagios.cfg

  1. Ubah access permission direktori /usr/local/nagios/sbin

# chcon -R system_u:object_r:httpd_sys_script_exec_t /usr/local/nagios/sbin

  1. Jalankan apache

# service httpd restart

  1. Jalankan nagios

# service nagios restart

  1. Dalam direktori /home/thariq, lakukan ekstrak file nagios plugin

# tar xzvf nagios-plugins-1.4.2.tar.gz

  1. Lalu ketikkan perintah untuk konfigurasi file

# cd /home/user/nagios-plugins-1.4.2

# ./configure

  1. Install file-file nagios plugins tersebut

# make all

# make install

  1. Copy file-file yang berada pada /usr/local/nagios/libexec kedalam /usr/local/nagios/sbin

  1. Buka file cgi.cfg yang berada pada /usr/local/nagios/etc. Ubah user autentikasi nya menjadi :

Use_authentication = 0

  1. Tambahkan perintah berikut ini di dalam file httpd.conf (biasanya di /etc/httpd/conf)

ScriptAlias /nagios/cgi-bin/ "/usr/local/nagios/sbin/"

Options ExecCGI

AllowOverride None

Order allow,deny

Allow from all

Alias /nagios "/usr/local/nagios/share"

Options None

order allow,deny

allow from all

Alias /images/ "/usr/local/nagios/share/images/"

Options Indexes MultiViews

AllowOverride None

Order allow,deny

Allow from all

  1. Jalankan apache

# service apache restart

  1. Jalankan nagios

# service nagios restart

  1. Apabila tidak ada kesalahan, nagios dan nagios plugins sudah terinstall di komputer server. Buka internet eksplorer (ie / thunderbird /opera) dengan address : ipkomputernagios/nagios


Tidak ada komentar:

Posting Komentar