Nagios - Install

Jump to navigation Jump to search

Compiling from source is the only sure way to install a consistent Nagios platform across distributions, their various versions, on varied hardware.

Perform a fresh install - Minimal Centos 6 first. Then make sure the following packages are installed. Many of these will be duplicated from the basic install, but are included as an accurate list as to what's needed for Nagios, and Nagiosgraph

htop wget htop iftop nmon sysstat gd gd-devel httpd php gcc glibc glibc-common 
openssl-devel gcc glibc glibc-common gcc php-devel php-pear libssh2 libssh2-devel
mysql-server mysql php-mysql sendmail man ntp mail mutt which mailx cpan libcurl
curl-devel curl yaml php-gd rrdtool rrdtool perl-rrdtool perl-Time-HiRes
yum groupinstall "Development Tools"
cpan install CGI

Disable firewall and selinux - This box should only be available from the internal network and these options are redundant.

vim /etc/selinux/config
chkconfig iptables off
>- REBOOT -<

Create nagios compile folder, nagios user, change to nagios compile folder.

mkdir nagios 
adduser nagios
cd nagios

Download and Compile Nagios

./configure && make all && make install && make install-init && make install-commandmode && make install-config && make install-webconf

Download and compile Nagios Plugins

./configure --with-nagios-user=nagios --with-nagios-group=nagios && make && make install 

Set the nagiosadmin password.

 htpasswd  -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Gracefully restart apache.



The last part above will need a little correction later.