Page 1 of 1

nagios 4.0.7 installation

Posted: Mon Oct 06, 2014 10:54 pm
by yuuna
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/

Re: nagios 4.0.7 installation

Posted: Tue Oct 07, 2014 9:24 am
by tmcdonald
I might be missing something here, but what is the actual problem you are having? "troubleshoot if only able acess main page" - does that mean you can't view the main page or that you couldn't but the steps following fixed it?

Re: nagios 4.0.7 installation

Posted: Tue Oct 14, 2014 10:21 pm
by yuuna
Hi tmcdonald ,


This post is about steps how i installed Nagios 4.0.7 is not a problem. Hope can help some1 as reference. But is it Nagios no need to install database?

Re: nagios 4.0.7 installation

Posted: Tue Oct 14, 2014 10:23 pm
by yuuna
Btw, that sentence means if u only able to access main website, others showed permission error..
can follow step below to solve the problem...

Re: nagios 4.0.7 installation

Posted: Tue Oct 14, 2014 10:44 pm
by tmcdonald
Nagios does not require a database in order to work.

Thank you for the info. I am going to lock the topic because it is not a question so it is "solved" already.