Search This Blog

Monday 6 May 2019

NAGIOS INSTALLATION STEPS

yum install -y httpd httpd-tools php gcc glibc glibc-common gd gd-devel make net-snmp
useradd nagios
groupadd nagcmd
usermod -G nagcmd nagios
usermod -G nagcmd apache
mkdir /root/nagios
cd /root/nagios
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.3.4.tar.gz
wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
tar -xvf nagios-4.3.4.tar.gz
tar -xvf nagios-plugins-2.2.1.tar.gz
ls -l
cd nagios-4.3.4/
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-commandmode
make install-config
vi /usr/local/nagios/etc/objects/contacts.cfg
make install-webconf
htpasswd -s -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd start
systemctl start httpd.service
cd /root/nagios
cd nagios-plugins-2.2.1/
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
systemctl enable nagios   
systemctl enable httpd
service nagios start
systemctl start nagios.service
PublicIP/nagios (in browser)
nagiosadmin(user name)
password

No comments:

Post a Comment