Segunda parte
Instalado o Nagios Core no SLES 11 – SP1
# zypper in nagios
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW packages are going to be installed:
apache2 apache2-mod_php5 apache2-prefork apache2-utils gd libapr1 libapr-util1
libmm14 nagios nagios-plugins nagios-www perl-Crypt-DES perl-Net-SNMP php5
php5-ctype php5-dom php5-hash php5-iconv php5-json php5-tokenizer php5-xmlreader
php5-xmlwriter
The following recommended packages were automatically selected:
nagios-plugins nagios-www php5-ctype php5-dom php5-hash php5-iconv php5-json
php5-tokenizer php5-xmlreader php5-xmlwriter
The following packages are not supported by their vendor:
nagios nagios-plugins nagios-www perl-Net-SNMP
22 new packages to install.
Overall download size: 7.1 MiB. After the operation, additional 24.3 MiB will be used.
- digite yes para aceitar a instalação
Continue? [y/n/?] (y): y
Resultado do comando:
Retrieving package perl-Crypt-DES-2.05-1.22.i586 (1/22), 19.0 KiB (34.0 KiB unpacked)
Installing: perl-Crypt-DES-2.05-1.22 [done]
Retrieving package libmm14-1.4.2-16.22.i586 (2/22), 40.0 KiB (40.0 KiB unpacked)
Installing: libmm14-1.4.2-16.22 [done]
Retrieving package libapr1-1.3.3-11.16.1.i586 (3/22), 127.0 KiB (291.0 KiB unpacked)
Installing: libapr1-1.3.3-11.16.1 [done]
Retrieving package gd-2.0.36.RC1-52.18.i586 (4/22), 151.0 KiB (610.0 KiB unpacked)
Installing: gd-2.0.36.RC1-52.18 [done]
Retrieving package nagios-3.2.3-26.1.i586 (5/22), 302.0 KiB (4.2 MiB unpacked)
Retrieving: nagios-3.2.3-26.1.i586.rpm [done (38.8 KiB/s)]
Installing: nagios-3.2.3-26.1 [done]
Additional rpm output:
Updating etc/sysconfig/nagios...
Retrieving package php5-5.2.6-50.24.1.i586 (6/22), 970.0 KiB (2.8 MiB unpacked)
Installing: php5-5.2.6-50.24.1 [done]
Retrieving package libapr-util1-1.3.4-12.20.2.i586 (7/22), 94.0 KiB (201.0 KiB unpacked)
Installing: libapr-util1-1.3.4-12.20.2 [done]
Retrieving package perl-Net-SNMP-5.2.0-138.1.i586 (8/22), 96.0 KiB (389.0 KiB unpacked)
Retrieving: perl-Net-SNMP-5.2.0-138.1.i586.rpm [done (29.9 KiB/s)]
Installing: perl-Net-SNMP-5.2.0-138.1 [done]
Retrieving package php5-xmlwriter-5.2.6-50.24.1.i586 (9/22), 38.0 KiB (28.0 KiB unpacked)
Installing: php5-xmlwriter-5.2.6-50.24.1 [done]
Retrieving package php5-tokenizer-5.2.6-50.24.1.i586 (10/22), 36.0 KiB (18.0 KiB unpacked)
Installing: php5-tokenizer-5.2.6-50.24.1 [done]
Retrieving package php5-json-5.2.6-50.24.1.i586 (11/22), 41.0 KiB (30.0 KiB unpacked)
Installing: php5-json-5.2.6-50.24.1 [done]
Retrieving package php5-iconv-5.2.6-50.24.1.i586 (12/22), 44.0 KiB (36.0 KiB unpacked)
Installing: php5-iconv-5.2.6-50.24.1 [done]
Retrieving package php5-hash-5.2.6-50.24.1.i586 (13/22), 102.0 KiB (183.0 KiB unpacked)
Installing: php5-hash-5.2.6-50.24.1 [done]
Retrieving package php5-dom-5.2.6-50.24.1.i586 (14/22), 77.0 KiB (162.0 KiB unpacked)
Installing: php5-dom-5.2.6-50.24.1 [done]
Retrieving package php5-ctype-5.2.6-50.24.1.i586 (15/22), 34.0 KiB (15.0 KiB unpacked)
Installing: php5-ctype-5.2.6-50.24.1 [done]
Retrieving package apache2-utils-2.2.10-2.24.5.i586 (16/22), 110.0 KiB (176.0 KiB unpacked)
Installing: apache2-utils-2.2.10-2.24.5 [done]
Retrieving package apache2-prefork-2.2.10-2.24.5.i586 (17/22), 265.0 KiB (593.0 KiB unpacked)
Installing: apache2-prefork-2.2.10-2.24.5 [done]
Retrieving package nagios-plugins-1.4.15-21.2.i586 (18/22), 663.0 KiB (3.7 MiB unpacked)
Retrieving: nagios-plugins-1.4.15-21.2.i586.rpm [done (64.3 KiB/s)]
Installing: nagios-plugins-1.4.15-21.2 [done]
Additional rpm output:
Starting SuSEconfig, the SuSE Configuration Tool...
Running module permissions only
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.permissions...
Finished.
Retrieving package php5-xmlreader-5.2.6-50.24.1.i586 (19/22), 40.0 KiB (28.0 KiB unpacked)
Installing: php5-xmlreader-5.2.6-50.24.1 [done]
Retrieving package apache2-2.2.10-2.24.5.i586 (20/22), 746.0 KiB (2.1 MiB unpacked)
Installing: apache2-2.2.10-2.24.5 [done]
Additional rpm output:
Starting SuSEconfig, the SuSE Configuration Tool...
Running module permissions only
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.permissions...
Finished.
Updating etc/sysconfig/apache2...
looking for old 2.0 modules to be renamed...
Done.
Retrieving package apache2-mod_php5-5.2.6-50.24.1.i586 (21/22), 869.0 KiB (2.6 MiB unpacked)
Installing: apache2-mod_php5-5.2.6-50.24.1 [done]
Retrieving package nagios-www-3.2.3-26.1.i586 (22/22), 2.4 MiB (6.1 MiB unpacked)
Retrieving: nagios-www-3.2.3-26.1.i586.rpm [done (154.0 KiB/s)]
Installing: nagios-www-3.2.3-26.1 [done]
# nagios
Pronto amigo, seu Nagios Core está instalado, veja com o comando.
# rpm -qa | grep nagios
Resultado do comando:
nagios-3.2.3-26.1
nagios-plugins-1.4.15-21.2
nagios-www-3.2.3-26.1
Percebeu que ele já instala todos os pacotes (
Apache,
PHP,
GCC), já cria os usuários, grupos, dá os devidos direitos em pastas, nós só precisamos cadastrar um usuário agora.
# htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin
Habilite uma senha ao seu usuário, é com ele que vamos acessar a tela gŕafica no Nagios via browser.
Pós instalação
Para ficar bom, e acabar a instalação, vamos configurar o Nagios Core e o Apache para iniciar sozinhos.
# chkconfig -add nagios
Resultado do comando:
nagios 0:off 1:off 2:off 3:on 4:off 5:on 6:off
# chkconfig nagios on
# chkconfig -add apache2
Resultado do comando:
apache2 0:off 1:off 2:off 3:on 4:off 5:on 6:off
# chkconfig apache2 on
Pronto, se quizer fazer um teste, dê um boot no servidor.
# reboot
Agora via browser, acesse seu servidor
http://ip_do_servidor/nagios
Faça o login com o usuário nagiosadmin e a senha que você cadastrou.
Depois vamos desenvolver um tutorial para cadastros de dispositivos e serviços.
Abraços e espero que contribuído com alguma coisa.