Created
January 28, 2012 18:23
-
-
Save flaudisio/1695347 to your computer and use it in GitHub Desktop.
Nagios - Compilação e Instalação (básico)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Nagios - Compilação e Instalação (básico) | |
# | |
# Variáveis | |
USUARIO=nagios | |
GRUPO=nagios | |
GRUPOCMD=nagioscmd | |
USUARIOAPACHE=www-data | |
# Grupos e Usuário | |
groupadd $GRUPO | |
groupadd $GRUPOCMD | |
useradd -c "Nagios Control User" -d /usr/local/nagios -M -s /bin/bash -g $GRUPO $USUARIO | |
# Configuração | |
./configure --prefix=/usr/local/nagios --with-nagios-user=$USUARIO --with-nagios-group=$GRUPO --with-command-user=$USUARIO --with-command-group=$GRUPOCMD --with-httpd-conf=/etc/apache2/conf.d | |
# Compilação | |
JOBS=$(expr `cat /proc/cpuinfo | grep 'model name' | wc -l` \* 2) | |
make all -j$JOBS | |
###### Patch para evitar Erro 2 na Instalação ###### | |
sed -i 's:for file in includes/rss/\*;:for file in includes/rss/\*.\*;:g' ./html/Makefile | |
sed -i 's:for file in includes/rss/extlib/\*;:for file in includes/rss/extlib/\*.\*;:g' ./html/Makefile | |
##################################################### | |
# Instalação | |
make install | |
make install-init | |
make install-config | |
make install-commandmode | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment