nagios 4.0.7 installation
Posted: Mon Oct 06, 2014 10:54 pm
Halo, every1. i have installed nagios 4.0.7 on centos 6.4 recently. this is the steps i do.... hope every1 can have a look .
Install packages necessary
install apache2 build-essential libapache2-mod-php5 libgd2-xpm-dev traceroute wget httpd php install gcc glibc glibc-common gd gd-devel make net-snmp
Got to local directory and get Nagios tarball using wget
cd /usr/local
wget http://prdownloads.sourceforge.net/sour ... 0.8.tar.gz
Extract tarball by using tar xvf , rename it and got to Nagios directory
tar xvf nagios-4.0.8.tar.gz
mv nagios-4.0.8 nagios
cd nagios
Before configure Nagios add user Nagios and add group
useradd Nagios
groupadd nagcmd usermod -a -G nagcmd Nagios
configure with group nagcmd
./configure --with-command-group=nagcmd
make all
make install
make install-init - This installs the init script in /etc/rc.d/init.d
make install-config *** Config files installed ***
make install-commandmode This installs and configures permissions on the directory for holding the external command file
make install-webconf Nagios/Apache conf file installed "/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf"
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
use this command to verifty Nagios configuration file
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Add a user named nagiosadmin and password for Web Interface Access
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
After it, start it
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
done nagios
Nagios plugin install
wget nagios plugin
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
done nagios plugin
mk_livestatus install
install package necessary
yum install gcc-c++ -y
wget http://mathias-kettner.de/download/mk-l ... 4p5.tar.gz
configure it
./configure --with-nagios4
make
make install
edit /Nagios/etc/Nagios.cfg by add the below command in it
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /var/lib/nagios/rw/live
event_broker_options=-1
troubleshoot if only able acess main page
setenforce 0
chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
chcon -R -t httpd_sys_content_t /usr/local/nagios/
Install packages necessary
install apache2 build-essential libapache2-mod-php5 libgd2-xpm-dev traceroute wget httpd php install gcc glibc glibc-common gd gd-devel make net-snmp
Got to local directory and get Nagios tarball using wget
cd /usr/local
wget http://prdownloads.sourceforge.net/sour ... 0.8.tar.gz
Extract tarball by using tar xvf , rename it and got to Nagios directory
tar xvf nagios-4.0.8.tar.gz
mv nagios-4.0.8 nagios
cd nagios
Before configure Nagios add user Nagios and add group
useradd Nagios
groupadd nagcmd usermod -a -G nagcmd Nagios
configure with group nagcmd
./configure --with-command-group=nagcmd
make all
make install
make install-init - This installs the init script in /etc/rc.d/init.d
make install-config *** Config files installed ***
make install-commandmode This installs and configures permissions on the directory for holding the external command file
make install-webconf Nagios/Apache conf file installed "/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf"
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
use this command to verifty Nagios configuration file
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Add a user named nagiosadmin and password for Web Interface Access
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
After it, start it
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
done nagios
Nagios plugin install
wget nagios plugin
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
done nagios plugin
mk_livestatus install
install package necessary
yum install gcc-c++ -y
wget http://mathias-kettner.de/download/mk-l ... 4p5.tar.gz
configure it
./configure --with-nagios4
make
make install
edit /Nagios/etc/Nagios.cfg by add the below command in it
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /var/lib/nagios/rw/live
event_broker_options=-1
troubleshoot if only able acess main page
setenforce 0
chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
chcon -R -t httpd_sys_content_t /usr/local/nagios/