Here is a full step by step of my installation. The lines with ** are where things went wrong. I'm not going to try and 'hack' it together. I'll just wait for you to get back to me. I will try out a couple more things on my 2 other servers to see if it will work. In the Ubuntu forums a guy seems to have an crazy extensive installation explanation that he used but on VM's but the installation should apply to regular physical installation. I'll give that a try and see if that is any different. It is not the latest version of nagios though so I'm not sure if that will make a difference.
Here is my installation steps/issues:
////////////////////////////////////////////////////////////////////////////////////////////////////
sudo -i
sudo apt-get install wget (*had to split up this install command as it wasnt' working the way it was written in the docs)
sudo apt-get install build-essential
sudo apt-get install apache2 php5-gd
sudo apt-get install libgd2-xpm libgd2-xpm-dev libapache2-mod-php5
cd /tmp
wget
http://prdownloads.sourceforge.net/sour ... 4.1.tar.gz
wget
http://sourceforge.net/projects/nagiosp ... .15.tar.gz
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
tar zxvf nagios-3.4.1.tar.gz
tar zxvf nagios-plugins-1.4.15.tar.gz
cd nagios
./configure --with-nagios-group=nagios --with-command-group=nagcmd -–with-mail=/usr/bin/sendmail
*this is where things go wrong. the comand "--with-mail=/usr/bin/sendmail" get this error message: "configure: error: unrecognized option: -–with-mail=/usr/bin/sendmail"
*So I used ./configure --with-nagios-group=nagios --with-command-group=nagcmd
eliminating the --with-mail=/usr/bin/sendmail but this allowed it to run ./configure
make
make
make
make
make
make
all
install
install-init
install-config
install-commandmode
install-webconf
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
*for whatever reason this command wouldn't run so I did the following
*cd /usr/local/nagios/etc ... then htpasswd -c htpasswd.users nagiosadmin
* I have no idea why it didn't work with the original command.
cd /tmp/nagios-plugins-1.4.15
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
**ln: failed to create symbolic link `/etc/rcS.d/S99nagios': File exists
** I'm not exactly sure why this didn't work as planned. I completely erased all traces of the former nagios installation so there shouldn't have been a S99nagios file created already.
** I looked withini /etc there is no "rcS.d" directory. There is a rc'5'.d directory. So I ran the cmd using that directory and it worked fine.
**So after doing that final command I went to http://<your.nagios.server.ip>/nagios which didn't work . I get the following: "The requested URL /nagios was not found on this server."
**I double check with: "http://<your.nagios.server.ip>/nagios/" which didn't work either gave me the same error message. I thought perhaps it was the "ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios" command that I changed to rc'5'.d (without the quotes of course); but the oringal error after running that command according to the documentation was that the file already exists. So if it already exists, and is the correct command (not the one with the 'five') then it should be working. Unfortunately it isn't.
**One thing I did notice about this set of installation instructions is that it contains no changes to the config files to include my email address or anything to send myself updates. I don't quite remember exacty which files I changed before but I do remember doing that step when I got it running before.
**So status is: It installed completely. It has actually been run. But it is not working within the web browser at this time.
**I reboot my system and tried to run /etc/init.d/httpd start and got the following message: "Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration." Which in fact as the installation instructions said that we set it up to have nagios start on boot....this shouldn't really have been a necessary step.
///////////////////////////////////////////////////////////////////////////////////////////////////////