Error: Cannot open main configuration file '/usr/local/


#1

Preflight Check = OK
Result =
Things look okay - No serious problems were detected during the pre-flight check[root@nagios nagios]# /usr/local/nagios/bin/nagios nagios.cfg

Start Nagios
[root@nagios nagios]# /usr/local/nagios/bin/nagios nagios.cfg

Result =
Error: Cannot open main configuration file ‘/usr/local/nagios/nagios.cfg’ for reading!
Warning: Cannot open log file ‘/usr/local/nagios/var/nagios.log’ for writing
Nagios 2.5 starting… (PID=20045)
Warning: Cannot open log file ‘/usr/local/nagios/var/nagios.log’ for writing
Warning: Cannot open log file ‘/usr/local/nagios/var/nagios.log’ for writing
Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before
restarting. (PID=20045)

I Did not do make command-mode during the Install, Is this what the problem may be?
Cheers


#2

No Matter, I went through the documentation again.
Went back to the installation process and included the following:

1…/configure --with-command-group=nagcmd
make install


#3

Sorry Heres the rest of it…

  1. ./configure --with-command-group=nagcmd (Previously was nagios)
  2. make install-commandmode
  3. Took out all the trailing / from the previous script alias added to httpd.conf e.g /usr/local/nagios/share/ to /usr/local/nagios/share
  4. restarted apache

Cheers


#4

and that fixed it?
Nothing that you did, should have affected your problem, since it appears it was the permissions on your .cfg files in /etc. Those files are not created by the install.