Installing Nagios from Source on Ubuntu 9.04
Good choice, I give my respect. Anyways, lets do this!
First lets start by cheating a bit. The scope of this is obviously to install Nagios from source. Of course you can install these any way you like, but I will demonstrate installing the required dependencies with Aptitude.
What you’ll end up with after following this portion of the guide…
- Nagios and the plugin’s will be installed under /usr/local/nagios
- Nagios will be configured enough to monitor a handful of things on your local server
- The handy web interface will work so you can see your local server’s alerts and monitors that come pre-configured.
Required packages
- Apache 2 – Linux webserver
- PHP5 – Scripting language
- GD – Graphics development libraries
- GCC – GNU Compiler
Create Account Information
- Install Apache2, PHP5, GCC and GD dev libraries
- Now we must create our users and groups.
- Set the “nagios” user password to what ever you want, just don’t forget it
- Create a group for external commands to be submitted through the web interface
- Add both the “nagios” user and “www-data” user to the nagcmd group
- Confirm that both of your users and groups were created and added correctly
- You should recieve a response like this
$ sudo aptitude install apache2 libapache2-mod-php5 build-essential libgd2-xpm-dev
$ sudo useradd -m -s /bin/bash nagios
$ sudo passwd nagios
$ sudo groupadd nagcmd$ sudo usermod -a -G nagcmd nagios $ sudo usermod -a -G nagcmd www-data
$ sudo grep nagios /etc/group
nagios:x:1001: nagcmd:x:1002:nagios,www-data
Download Nagios and the Plugins
- Create a folder to work with the downloaded source files and move into it.
- Download the latest tarballs. As of creating this article Nagios Core 3.1.2 and Nagios Plugins 1.4.13 are the latest stable.
$ mkdir ~/download $ cd ~/download
$ wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.1.2.tar.gz $ wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz






















12 Comments
Only this min located this web site Nagios & Ubuntu 9.04 – Part 1 | 2009-07-24 02:37:34 | by way of Google, a pleasant surprise! Rgds ! Rob Rasner Wikipedia
Very nice read, some valid points were made. (This isn’t some stupid spam reply either, I’m a true follower.)