I am new to Nagios, and Linux as well. I am trying to do an installation but I'm coming up with nothing. I am following the step by step guide given in the book "Apress Pro Nagios 2.0 By James Turnbull." Yes, an old version of Nagios, but I thought it would work. I'm trying to just do a quick install and followed everything in the book verbatim just about with no errors. Until I tested the Web interface and it doesn't work. I did the install on a Suse 11.1 box. Here's what I did:
Installed Dependecies via Yast2:
installed C compiler
installed gd lib's
Nagios install process:
unzipped source package
useradd -g nagios -M nagios (as told in the book)
Then created/added command group to appropriate users:
usermod -G ncmd nagios
usermod -G ncmd wwwrun
./configure --prefix=/usr/local/nagios --with-htmlurl=/nagios/ --with-cgiurl=/nagios/cgi-bin --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=ncmd
then installed binaries, CGI, and HTML files etc...:
make install && make install-init
ls -al /usr/local/nagios/var/rw
then the plugins after unzipping:
./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-cgiurl=/nagios/cgi-bin
install binaries, CGI, etc...
THEN, after all that is done I have to config the web interface like so by editing the httpd.conf file. I found this file here: /etc/apache2/httpd.conf . IS this right? There isn't an apache folder in /usr/local/apache and no directory for httpd here: /etc/httpd/conf* There is no httpd.conf or directory just the one I mentioned. Here's what I modified the script. I JUST ADDED TO IT I DIDN'T MODIFIY THE INITIAL CONTENTS. I dont know if this is right, but I tried to also delete the initial configuration with the Directory directive and used the one in the book. Here is what it tole me to add to the httpd.conf file:
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
Allow from all
Alias /nagios/ /usr/local/nagios/share
Allow from all
do I delete the other stuff before this this stuff:
Deny from all
Ok, after doing so I restarted apache2 service and as for Nagios. I type "service nagios start" and I get this: Starting nagios:su: warning: cannot change directory to /home/nagios: No such file or directory
it seems like its trying to get at the nagios user and the home directory that I didn't create for it because the BOOK told me not to. Anyway, I manually start it by this:
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
It shows up under process when I type ps -A as nagios. So idk what to do. I need help. I read through the forums and google... With no avail. This book lied to me. OR i'm doing somthing stupid. I try to get to my web interface by typing in the url:http://localhost/nagios/ and get Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
This help is much appreciated. Thank you so much!