<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gHacks technology news &#187; nagios</title>
	<atom:link href="http://www.ghacks.net/tag/nagios/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 23:31:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to install Nagios on Ubuntu server</title>
		<link>http://www.ghacks.net/2009/06/08/how-to-install-nagios-on-ubuntu-server/</link>
		<comments>http://www.ghacks.net/2009/06/08/how-to-install-nagios-on-ubuntu-server/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 23:06:10 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[Tutorials Advanced]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[server monitoring]]></category>
		<category><![CDATA[system monitoring]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=13369</guid>
		<description><![CDATA[Are you one of those special geeks that think there is never TMI (too much information)? If that describes you then Nagios is the monitor for you. Once installed, Nagios will keep you busy with more information about your system than you ever thought possible. But it&#8217;s not just a matter of running apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>Are you one of those special geeks that think there is never TMI (too much information)? If that describes you then <a title="Nagios" href="http://www.nagios.org" target="_blank">Nagios</a> is the monitor for you. Once installed, Nagios will keep you busy with more information about your system than you ever thought possible. But it&#8217;s not just a matter of running apt-get install nagios. No, there&#8217;s more to the installation than that.</p>
<p>In this article you will see how to install Nagios on a working Ubuntu Server installation. The release I used was 9.04, but you should be able to use 8.04 just as easily.</p>
<p><span id="more-13369"></span><strong>Features</strong></p>
<p>You want features? Nagios is full of them. Nagios can monitor your entire network, you can handle problem remediation, you can plan network downtime, you can watch hosts, systems, services, applications..there&#8217;s very little you can&#8217;t do with Nagios.</p>
<p>But let&#8217;s think about this installation. The best (and really only good) way to install Nagios is from source. This means you are going to have to do some compliation. Don&#8217;t worry, it&#8217;s not hard&#8230;when you have a step-by-step guide that is.</p>
<p><strong>Before you start</strong></p>
<p>If you are using, as I did, a Ubuntu server installation, you will need to install a few tools first. So from the command line (on your Ubuntu server) issue the following commands:</p>
<p><em>sudo apt-get install php5-gd</em></p>
<p><em>sudo apt-get install gcc</em></p>
<p><em>sudo apt-get install make</em></p>
<p>The above commands will install the tools you need in order to get Nagios installed. If you don&#8217;t install the above, you won&#8217;t be able to complete the installation.</p>
<p><strong>Installing Nagios &#8211; preflight</strong></p>
<p>Before you actually run the installation you will need to take care of some user/group accounting first.</p>
<p>Create the user <strong>nagios:</strong></p>
<p><strong></strong><em>sudo useradd -m nagios</em></p>
<p><em><span style="font-style: normal;">Give the nagios user a password:</span></em></p>
<p><em>sudo passwd nagios<span style="font-style: normal;"> </span></em></p>
<p>NOTE: You will have to enter the new password twice for the above command.</p>
<p>Create the group <strong>nagios:<br />
<span style="font-weight: normal;"><em>sudo groupadd nagios</em></span> </strong></p>
<p>Add the user <strong>nagios </strong>to the group <strong>nagios:</strong></p>
<p><em>sudo usermod -G nagios nagios</em></p>
<p>Create the group <strong>nagcmd:</strong></p>
<p>sudo groupadd nagcmd</p>
<p>Add the user <strong>nagios </strong>to the group <strong>nagcmd:</strong></p>
<p>sudo usermod -a -G nagcmd nagios</p>
<p>Add the Apache user to the group <strong>nagcmd:</strong></p>
<p><em>sudo usermod -a -G nagcmd www-data</em></p>
<p><em><strong>Installing Nagios and Nagios Plugins</strong></em></p>
<p><em>The first thing to do is to download the files you need. Issue the commands:</em></p>
<p><code>wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz</code></p>
<p>and</p>
<p><code>wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-<br />
plugins-1.4.11.tar.gz</code></p>
<p>to download the files you need.</p>
<p>Untar the Nagios file with:</p>
<p><em>tar xvzf nagios-3.0.6.tar.gz</em></p>
<p>Change into the newly created Nagios directory with the command:</p>
<p><em>cd nagios-3.0.6</em></p>
<p>Now run the configure script using the nagcmd defined as the command group with the command:</p>
<p><em>sudo ./configure &#8211;with-command-group=nagcmd</em></p>
<p>Time to compile:</p>
<p><em>sudo make all</em></p>
<p>Time to install everything:</p>
<p><em>make install</em></p>
<p><em>make install-init</em></p>
<p><em>make install-config</em></p>
<p><em>make install-commandmode</em></p>
<p>Almost ready to finalize the installation of Nagios (before moving on to installing the plugins.) There is one simple configuration to take care of (for the basic installation). Open up the <strong>/usr/local/nagios/etc/objects/contacts.cfg </strong>file and add your email address as the contact email address. That&#8217;s the only configuration to change for now.</p>
<p><strong>Configuring for the Web interface</strong></p>
<p>There are just a few commands to run to configure the Web interface:</p>
<p><em>make install-webconf</em></p>
<p><em>htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin</em></p>
<p><em>/etc/init.d/apache2 reload</em></p>
<p>The final command above simply restarts Apache.</p>
<p><strong>Install the plugins</strong></p>
<p>Before you log into your Nagios installation you have to install your plugins first. Change to the directory you downloaded the Nagios files to and untar the plugins file:</p>
<p><em>tar xvzf nagios-plugins-1.4.11.tar.gz</em></p>
<p>Now change into the newly created directory:</p>
<p><em>cd nagios-plugins-1.4.11</em></p>
<p>Compile the plugins with the command:</p>
<p><em>sudo ./configure &#8211;with-nagios-user=nagios &#8211;with-nagios-group=nagios</em></p>
<p>Now install the plugins with the following commands:</p>
<p>make</p>
<p>make install</p>
<p><em><strong>Fire it up!</strong></em></p>
<p><em>Of course you want to make sure Nagios starts any time the system is restarted. Do this with the command:</em></p>
<p><em>sudo ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios</em></p>
<p>And finally, before you start up Nagios, make sure there are no errors with the command:</p>
<p><em>sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg</em></p>
<p>If you see no errors reported, it&#8217;s time to start it up. Issue the command:</p>
<p><em>sudo /etc/init.d/nagios start</em></p>
<p>Nagios is ready to go. Point your browser to:</p>
<p><em>http://ADDRESS_OF_NAGIOS_SERVER/nagios</em></p>
<p>You should be ready to enjoy all that is Nagios. Congratulations.</p>

	Tags: <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/nagios/" title="nagios" rel="tag">nagios</a>, <a href="http://www.ghacks.net/tag/server-monitoring/" title="server monitoring" rel="tag">server monitoring</a>, <a href="http://www.ghacks.net/tag/system-monitoring/" title="system monitoring" rel="tag">system monitoring</a>, <a href="http://www.ghacks.net/tag/ubuntu/" title="ubuntu" rel="tag">ubuntu</a>, <a href="http://www.ghacks.net/tag/ubuntu-server/" title="ubuntu server" rel="tag">ubuntu server</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/04/02/which-ubuntu-derivative-is-right-for-you/" title="Which Ubuntu Derivative Is Right For You? (April 2, 2009)">Which Ubuntu Derivative Is Right For You?</a> (16)</li>
	<li><a href="http://www.ghacks.net/2009/04/06/keep-logged-in-users-informed-with-motd/" title="Keep logged in users informed with motd (April 6, 2009)">Keep logged in users informed with motd</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
	<li><a href="http://www.ghacks.net/2006/12/20/why-you-should-switch-your-parents-pc-to-ubuntu/" title="Why you should switch your parents pc to ubuntu (December 20, 2006)">Why you should switch your parents pc to ubuntu</a> (20)</li>
	<li><a href="http://www.ghacks.net/2009/10/06/what-makes-ubuntu-so-user-friendly/" title="What makes Ubuntu so user friendly? (October 6, 2009)">What makes Ubuntu so user friendly?</a> (47)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/06/08/how-to-install-nagios-on-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
