Professional Documents
Culture Documents
Contenido
Instalar Nagios en CentOS 6.2 ........................................................................................................ 3
Verificar datos de S.O. ................................................................................................................ 3
Instalar requerimientos. ............................................................................................................. 3
Crear usuario y contrasea Nagios. ............................................................................................ 4
Creamos el grupo para ejecucin de comandos desde la interfaz web ........................................ 4
Instalar repositorio EPEL. ........................................................................................................... 4
Instalar Nagios. .......................................................................................................................... 5
Configurar Nagios ...................................................................................................................... 5
Modificar parmetros de acceso a Nagios .................................................................................. 6
Cambiar la password de usuario Web Nagios ............................................................................. 6
Iniciar servicios........................................................................................................................... 6
Iniciar servicio HTTP ............................................................................................................... 6
Configurar arranque automtico ............................................................................................ 7
Activar servicio Nagios ........................................................................................................... 7
Iniciar Nagios. ............................................................................................................................ 7
Verificar que los servicios estn ejecutndose. ........................................................................... 7
Ingresar a Nagios........................................................................................................................ 8
Instalar requerimientos.
[root@weblogic ~]# yum install httpd php gcc glibc glibc-common gd gd-devel net-snmp-utils net-
x86_64
x86_64
4.4.7-3.el6
4.4.7-3.el6
base
base
293 k
1.6 M
Transaction Summary
========================================================================================
====================================
Install 14 Package(s)
Upgrade 17 Package(s)
Total download size: 55 M
Is this ok [y/N]: y
Downloading Packages:
(1/31): cpp-4.4.7-3.el6.x86_64.rpm
| 3.7 MB 00:00
(2/31): gcc-4.4.7-3.el6.x86_64.rpm
Installed:
gd.x86_64 0:2.0.35-11.el6 gd-devel.x86_64 0:2.0.35-11.el6 libjpeg-turbo.x86_64 0:1.2.1-1.el6
mod_ssl.x86_64 1:2.2.15-29.el6.centos net-snmp.x86_64 1:5.5-44.el6_4.4
php.x86_64 0:5.3.3-23.el6_4
Dependency Installed:
libXpm.x86_64 0:3.5.10-2.el6
libXpm-devel.x86_64 0:3.5.10-2.el6 libjpeg-turbo-devel.x86_64
0:1.2.1-1.el6
lm_sensors-libs.x86_64 0:3.1.1-17.el6 net-snmp-libs.x86_64 1:5.5-44.el6_4.4 php-cli.x86_64 0:5.3.323.el6_4
php-common.x86_64 0:5.3.3-23.el6_4
Complete!
nagios/Nagios (ejemplo)
8.noarch.rpm
--2013-10-22 22:20:51-- http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-68.noarch.rpm
Resolviendo dl.fedoraproject.org... 209.132.181.23, 209.132.181.24, 209.132.181.25, ...
Connecting to dl.fedoraproject.org|209.132.181.23|:80... conectado.
Peticin HTTP enviada, esperando respuesta... 200 OK
Longitud: 14540 (14K) [application/x-rpm]
Saving to: `epel-release-6-8.noarch.rpm'
100%[==================================================================================>]
14.540 88,2K/s in 0,2s
2013-10-22 22:20:52 (88,2 KB/s) - `epel-release-6-8.noarch.rpm' saved [14540/14540]
[root@weblogic ~]# rpm -ivh epel-release-6-8.noarch.rpm
advertencia:epel-release-6-8.noarch.rpm: CabeceraV3 RSA/SHA256 Signature, ID de clave 0608b895: NOKEY
Preparando...
########################################### [100%]
1:epel-release
########################################### [100%]
Instalar Nagios.
[root@weblogic ~]# yum install -y nagios*
Extracto
Installing : nagios-plugins-rhev-1.0.0-2.el6.noarch
91/93
Installing : nagios-plugins-apt-1.4.16-5.el6.x86_64
92/93
Installing : nagios-plugins-bdii-1.0.14-1.el6.x86_64
93/93
Installed:
nagios.x86_64 0:3.5.1-1.el6
nagios-common.x86_64 0:3.5.1-1.el6
nagios-devel.x86_64 0:3.5.1-1.el6
nagios-lcgdm.x86_64 0:0.9.4-1.el6
Dependency Installed:
dejavu-lgc-sans-mono-fonts.noarch 0:2.30-2.el6
Complete!
fping.x86_64 0:2.4b2-10.el6
Configurar Nagios
nagiosadmin
generic-contact
Nagios Admin
jhon_doe@acme.com
15 # Order allow,deny
16 # Allow from all
17 Order deny,allow
18 Deny from all
19 Allow from 127.0.0.1 192.168.232.0/24
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</Directory>
Nagiosweb (ejemplo)
Iniciar servicios
Iniciar servicio HTTP
[root@weblogic ~]# service httpd start
Iniciando httpd: httpd: apr_sockaddr_info_get() failed for weblogic.domain
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for
ServerName
[ OK ]
[root@weblogic ~]#
Iniciar Nagios.
[root@weblogic ~]# service nagios start
Starting nagios: done.
[root@weblogic ~]# iptables -A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT
[root@ weblogic ~]# service iptables save
[root@ weblogic ~]# service iptables restart
iptables: Flushing firewall rules:
[ OK ]
iptables: Setting chains to policy ACCEPT: filter
[ OK ]
iptables: Unloading modules:
[ OK ]
iptables: Applying firewall rules:
[ OK ]
Ingresar a Nagios
Fuentes:
http://fraterneo.blogspot.com/2013/03/instalando-y-configurando-nagios-en.html
http://drivemeca.blogspot.com/2013/04/como-instalar-nagios-en-centos-64-paso.html