Hello,
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 Apache2
installed gd lib’s
Nagios install process:
unzipped source package
cd nagios-3*
groupadd nagios
useradd -g nagios -M nagios (as told in the book)
Then created/added command group to appropriate users:
groupadd ncmd
usermod -G ncmd nagios
usermod -G ncmd wwwrun
compileing Nagios:
./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
make install-commandmode
ls -al /usr/local/nagios/var/rw
make install-config
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…
make
make install
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
<Directory “/usr/local/nagios/sbin”>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
Alias /nagios/ /usr/local/nagios/share
<Directory “/usr/local/nagios/share”>
AllowOverride None
Options None
Order allow,deny
Allow from all
do I delete the other stuff before this this stuff:
AllowOverride None Options None Order deny,allow Deny from allOk, 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!