cd ~/
# Get monitoring-plugins source
wget https://www.monitoring-plugins.org/download/nagios-plugins-1.5.tar.gz
tar -xzvf nagios-plugins-1.5.tar.gz -C /usr/local/src/
rm -rf nagios-plugins-1.5.tar.gz
# Get qstat precompiled package, can't find source code to build from source
wget http://pkgs.repoforge.org/qstat/qstat-2.11-1.el6.rf.`uname -p`.rpm
rpm -i --nosignature qstat-2.11-1.el6.rf.*.rpm
rm -rf qstat-2.11-1.el6.rf.*.rpm
# Get fping source
wget http://fping.org/dist/fping-3.8.tar.gz
tar -xzvf fping-3.8.tar.gz -C /usr/local/src/
rm -rf fping-3.8.tar.gz
# Get radiusclient-ng source
wget http://downloads.sourceforge.net/project/radiusclient-ng.berlios/radiusclient-ng-0.5.6.tar.gz
tar -xzvf radiusclient-ng-0.5.6.tar.gz -C /usr/local/src/
rm -rf radiusclient-ng-0.5.6.tar.gz
# Get lmutil, this is a tricky one. lmstat is the component that are required but it's
# not longer available. All little tools have been incorporated within lmutil but
# we can create a substitute that will work
wget http://www.globes.com/products/utilities/v11.12/lmutil-x64_lsb-11.12.0.0v6.tar.gz
tar -xzvf lmutil-x64_lsb-11.12.0.0v6.tar.gz -C /usr/local/bin/
rm -rf lmutil-x64_lsb-11.12.0.0v6.tar.gz
chmod +x /usr/local/bin/lmutil
echo #!/bin/bash > /usr/local/bin/lmstat
echo /usr/local/bin/lmutil lmstat "$@" >> /usr/local/bin/lmstat
chmod +x /usr/local/bin/lmstat
# Build and install radiusclient-nt
cd /usr/local/src/radiusclient-ng-0.5.6
./configure
make
make install
# Build and install fping
cd /usr/local/src/fping-3.8/
./configure
make
make install
# Install dependencies
yum install net-snmp-utils postgresql-devel libdbi-devel bind-utils samba-client
# Install perl modules
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install Net::SNMP'
# Build and install nagios-plugins
cd /usr/local/src/nagios-plugins-1.5
./configure --with-nagios-user=naemon --with-nagios-group=naemon --libexec=/usr/lib64/naemon/plugins/
make
make install