Installing Nagios on centos 7
Installation of Nagios on CentOS 7 -
Installing LAMP -
yum install httpd mariadb-server php php-mysql
Installing required packages -
yum install gcc glibc glibc-common wget gd gd-devel perl postfix
Installing Nagios core
cd /opt
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.2.tar.gz
tar xzf nagios core.tar.gz
cd /opt/nagioscore-nagios-4.4.2
./configure
make all
make install-groups-users
usermod -a -G nagios apache
make install
make install-daemon init
make install-config
make install-command mode
make install-webconf
systemctl restart httpd
Creation of Nagiosadmin user account
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Nagios plugins installation -
yum install gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release perl-Net-SNMP
cd /opt
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz
tar zxf nagios-plugins.tar.gz
cd /opt/nagios-plugins-release-2.2.1/
./tools/setup
./configure
make
make install
Starting Nagios core service
systemctl start nagios
On browsing - http:///nagios using “nagiosadmin” user account will get below page