#adduser nagios
Buat folder untuk file instalasi nagios :
# mkdir /usr/local/nagios
Set permission folder ke user dan group nagios :
#chown -R nagios.nagios /usr/local/nagios/
Identifikasi user webserver, ini dilakukan jika kemungkinan ada perintah external seperti downtime, atau yg lainnya :
#grep ^"User" /etc/httpd/httpd.conf
Selanjutnya kita buat group di mana anggotanya menjalankan webserver dan nagios. Contoh kita buat group "nagcom"
#groupadd nagcom
Lalu tambahkan user nagios dan webser pada group "nagcom"
#usermod -G nagcom apache
#usermod -G nagcom nagios
Setelah itu , lalu download source file nagios dan nagios plugin:
# wget "http://nchc.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz"
# wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz
Ekstrak file Nagios yang telah di download
# tar xzvf nagio-3.0.6.tar.gz
Setelah itu kita masuk ke folder source nagios yang telah di ekstrak sebelumnya.
# cd /usr/local/src/nagios-3.0.6/
Jalankan configure script
#./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcom
akan tampil hasil configurasi sebagai berikut :
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/rc.d/init.d
Apache conf.d directory: /etc/httpd/conf.d
Mail program: /bin/mail
Host OS: linux-gnu
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /bin/traceroute
Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.
Lalu compile nagios
#make all
ini akan memerlukan waktu, sampai timbul tulis ini :
*** Compile finished ***
Setelah selesai kita install nagios-nya :
#make install
Agar nagios jalan saat booting :
#make install-init
Untuk menjalankan external command
#make install-commandmode
Membuat file configurasi nagios
#make install-config
Setting nagios di webserver/apache
#make install-webconf
Berikut adalah struktur folder yang ada di nagios :
- bin/ = File program Nagios
- etc/ = Main, resource, object, and CGI configuration files should be put here
- sbin/ = CGIs
- share/ = HTML files (for web interface and online documentation)
- var/ = Empty directory for the log file, status file, retention file, etc.
- var/archives = Empty directory for the archived logs
- var/rw = Empty directory for the external command file
Buat password nagiosadmin untuk login ke web nagios, ingat passwordnya karena saat login anda akan diminta kan password. Berikut perintahnya ;
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Pada proses instalasi terakhir adalah untuk membuat file configurasi web nagios yang isinya sperti berikut ini :
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile #/usr/local/nagios/etc/htpasswd.users
# Require valid-user
Alias /nagios "/usr/local/nagios/share"
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile #/usr/local/nagios/etc/htpasswd.users
#Require valid-user
Setelah itu restart apache ;
# /etc/init.d/httpd restart
Setelah nagios terinstall saatnya kita install NagiosPlugins, extract source file NagiosPlugsins ;
# tar xzvf nagios-plugins-1.4.11.tar.gz
Masuk ke folder nagios plugin ;
# cd nagios-plugins-1.4.11
Compile dan install plugin-nya ;
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
# make && make install
Sekarang set service nagios automatis di saat booting
#chkconfig --add nagios
#chkconfig nagios on
Cek konfigurasi nagios dengan perintah ;
#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Jika tidak ada error berarti konfigurasi sudah benar.
Jalankan nagios dengan command ;
# /etc/init.d/nagios start
atau
# service nagios start
Setelah install selesai, akses melalui browser dengan alamat http://nagios-server/nagios ;
Done.
4 comments:
Casino 1249769202...
Casino 1249769202...
Casino 1250514856...
Casino 1250514856...
Casino 1250640661...
Casino 1250640661...
Could you help me. Calamities are of two kinds: misfortunes to ourselves, and good fortune to others. Help me! Can not find sites on the: Infant death during ventolin nebulizer. I found only this - what is ventolin expectorant. Improve a doctor before your different system peanuts for which you will move a breathing chemistry, ventolin. Ventolin, mins with obscene medication patients could however be heard years, at the pain. Best regards :confused:, Zetta from Arabia.
Post a Comment