How to install & configure Nagios 4.x on Centos 6.5
login as root user
yum install httpd php gcc glibc glibc-common gd gd-devel -y
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.1.tar.gz
tar zxvf nagios-4.0.1.tar.gz
cd nagios-4.0.1
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
tar xzvf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
SELinux is enforcing then add this line.
semanage fcontext -a -t httpd_sys_content_t /usr/local/nagios/
Set nagios at auto-start & service to start
chkconfig nagios on
chkconfig httpd on
service httpd start
service nagios start
http://localhost/nagios or http://yourserver/nagios
username nagiosadmin
password password
No comments:
Post a Comment