1. Añadir los usuarios necesarios:
~#:useradd nagios
~#:groupadd nagcmd
~#:usermod -a -G nagcmd nagios
~#:usermod -a -G nagcmd www-data
2. Descargar el paquete de nagios:
~#:wget “https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.2.tar.gz”
3. Descomprimirlo y configurarlo:
~#:./configure –with-nagios-group=nagios –with-command-group=nagcmd –with-httpd_conf=/etc/apache2/sites-enabled/./configure –with-nagios-group=nagios –with-command-group=nagcmd –with-httpd_conf=/etc/apache2/sites-enabled/
4. Compilar e instalar:
~#:make all
~#:make install-init
~#:make install-config
~#:make install-commandmode
~#:make install-webconf
5. Securizar el acceso:
htpasswd -c /usr/local/nagios/etc/htpasswd.users [usuario]
6. Habilitar el módulo cgi de Apache:
a2enmod cgi
7. Configurar Nagios con nuestros servidores
8. Reiniciar Apache
systemctl restart apache2
7. Recargar Aapche