Created
August 31, 2018 14:54
-
-
Save sacgov/4b013312bfbe5ad2455a3c0cdb479eb6 to your computer and use it in GitHub Desktop.
Nagios Configuration
This file contains 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
#Install Build Dependencies | |
sudo yum install gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel xinetd unzip | |
#Create Nagios User and Group | |
sudo useradd nagios | |
sudo groupadd nagcmd | |
sudo usermod -a -G nagcmd nagios | |
#Install Nagios Core | |
cd ~ | |
#L specifies the location and 0 specifies the http version to use | |
# https://www.nagios.org/downloads/nagios-core/thanks/?skip=1 | |
curl -L -O https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.2.tar.gz | |
tar xvf nagios-*.tar.gz | |
cd nagios-* | |
#Build Nagios | |
./configure --with-command-group=nagcmd | |
make all | |
sudo make install | |
sudo make install-commandmode | |
sudo make install-init | |
sudo make install-config | |
sudo make install-webconf | |
#To give commands from the web interface we need to add the apache user to nagios | |
sudo usermod -G nagcmd apache | |
#Install Nagios Plugins | |
#Plugin Location http://nagios-plugins.org/download/?C=M;O=D | |
cd ~ | |
curl -L -O http://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz | |
tar xvf nagios-plugins-*.tar.gz | |
cd nagios-plugins-* | |
./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl | |
make | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment