Page 1 of 2
Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Sun Jul 06, 2014 7:19 pm
by shaunie1975
Hi Guys,
Is there a easy to follow guide for installing Nagios Core 4.0.7 on Ubuntu 14.04?
When I installed Ubuntu I opted to install LAMP at the same time.
I then ran update and upgrade a few times and a system reboot.
However when I get to the make install-webconf I get the below error:
Code: Select all
root@ubuntu:/tmp/nagios-4.0.7# make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file â/etc/httpd/conf.d/nagios.confâ: No such file or directory
make: *** [install-webconf] Error 1
From initial searches its something to do with Nagios using an older version of Apache2 where the directory structure is different.
I am no expert with nagios or Linux so please be gentle if you can help.
Thanks
Shaun
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Mon Jul 07, 2014 9:51 am
by shaunie1975
Ok so I got passed that part by creating the missing directories.
Now installed the plugins but when it comes to the chkconfig
I get an error that the command is not recognised. Has this been removed from 14.04?
Can I install it?
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Mon Jul 07, 2014 2:36 pm
by slansing
Hi Shaunie, what guide are you using to install Core and the plugins? I'd recommend this one:
http://assets.nagios.com/downloads/nagi ... Source.pdf
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Mon Jul 07, 2014 3:25 pm
by shaunie1975
Hi Slansing,
That is the guide I'm using however I'm installing 4.0.7 and pluggin 2.0.3
On Ubuntu 14.04 server.
Thanks
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Tue Jul 08, 2014 9:09 am
by shaunie1975
Ok So I got around the chkconfig error by installing:
sysv-rc-conf
restarted apache2 and even the whole server. Now when I try an goto http://<serverip>/nagios i get page not found

Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Tue Jul 08, 2014 9:58 am
by slansing
Hmm, looks like apache may not be running, what is the output of:
Code: Select all
/etc/init.d/apache2 status
/etc/init.d/apache2 stop
/etc/init.d/apache2 start
When you browse to just:
Does it show the apache splash page?
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Wed Jul 09, 2014 1:53 am
by shaunie1975
Hi Slansing,
Here is the ouput:
Code: Select all
eto@ubuntu:~$ /etc/init.d/apache2 status
* apache2 is running
eto@ubuntu:~$ /etc/init.d/apache2 stop
* Stopping web server apache2 *
eto@ubuntu:~$
eto@ubuntu:~$ /etc/init.d/apache2 start
* Starting web server apache2 *
eto@ubuntu:~$
Browsing to http://<address of server> lans me on the 'Apache2 Ubuntu Default Page'
When I look in /var/www/ the only folder there is html which has the index.html file, I believe this just the default apache2 page?
Thanks
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Wed Jul 09, 2014 3:56 pm
by tmcdonald
Ubuntu has a different directory structure than RHEL or CentOS.
shaunie1975 wrote:Ok so I got passed that part by creating the missing directories.
Can you post or PM the httpd nagios conf file that should be present in that directory? Apache probably does not know where it is so it cannot load the Nagios webpage.
Ubuntu uses /etc/apache2 and RHEL/CentOS use /etc/httpd so you may have to copy over some files.
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Wed Jul 09, 2014 4:27 pm
by emislivec
shaunie1975 wrote:Browsing to http://<address of server> lans me on the 'Apache2 Ubuntu Default Page'
When I look in /var/www/ the only folder there is html which has the index.html file, I believe this just the default apache2 page?
That is the default splash page, so we know Apache is up and serving pages. I think the problem comes down to the earlier installation error:
shaunie1975 wrote:However when I get to the make install-webconf I get the below error:
Code: Select all
root@ubuntu:/tmp/nagios-4.0.7# make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file â/etc/httpd/conf.d/nagios.confâ: No such file or directory
make: *** [install-webconf] Error 1
On Debian or Ubuntu it should be "/etc/apache2/conf.d/nagios.conf" instead of "/etc/httpd/conf.d/nagios.conf". When you created the "/etc/httpd/conf.d/" it let the "make install-webconf" complete successfully, but Apache doesn't know anything about that directory or file.
We can tell ./configure where to install nagios.conf so apache will see it: add "--with-httpd-conf=/etc/apache2/conf.d/nagios.conf" to the end of the ./configure command you ran earlier. For example:
Code: Select all
./configure --with-command-group=nagcmd --with-httpd-conf=/etc/apache2/conf.d
Then make and install like before.
Re: Guide for installing 4.0.7 on Ubuntu 14.04
Posted: Thu Jul 10, 2014 8:22 am
by shaunie1975
Hi Guys,
So I have got the
http://serverip/nagios page to load.
I ran the ./configure as
Code: Select all
./configure --with-command-group=nagcmd --with-httpd-conf=/etc/apache2/conf.d
which didnt work so then I ran it as
Code: Select all
./configure --with-command-group=nagcmd --with-httpd-conf=/etc/apache2
Which still didnt work. I then added the contents of
to the end of
Now when I login I see the nagios core and the logo then below that i see a red X and not running next to it.
Thanks