<?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>logIt &#187; CGI</title>
	<atom:link href="https://lakm.us/logit/tag/cgi/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/logit</link>
	<description>Log Around The Clock</description>
	<lastBuildDate>Sat, 06 Jun 2015 14:17:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Install Nagios 3 and Plugins</title>
		<link>https://lakm.us/logit/2009/10/install-nagios-3-and-plugins/</link>
		<comments>https://lakm.us/logit/2009/10/install-nagios-3-and-plugins/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 05:48:46 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[General Linux]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[make-install]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[web-based]]></category>

		<guid isPermaLink="false">http://localhost/it/?p=95</guid>
		<description><![CDATA[Quickstart I decided to install in RedHat 5.2. Maybe it is easier in Ubuntu (Nagios 3 already listed in the repository, but I haven&#8217;t tried it). As pointed out by the quickstart (it is meant for Fedora by the way), requirements are: php, httpd gcc, glibc, glibc-common gd, gd-devel After getting those, the configure-make-install procedure [...]]]></description>
				<content:encoded><![CDATA[<h3>Quickstart</h3>
<p>I decided to install in RedHat 5.2. Maybe it is easier in Ubuntu (Nagios 3 already listed in the repository, but I haven&#8217;t tried it). As pointed out by the quickstart (it is meant for Fedora by the way), requirements are:</p>
<ol>
<li><span style="background-color: #ffffff;">php, httpd </span></li>
<li><span style="background-color: #ffffff;">gcc, glibc, glibc-common</span></li>
<li><span style="background-color: #ffffff;">gd, gd-devel</span></li>
</ol>
<p>After getting those, the <code>configure-make-install</code> procedure runs well, except that I don&#8217;t check the warnings. It turns out that only some of Nagios core components are installed. It can be seen from the content of <code>/usr/local/nagios/libexec</code> directory. There is no <code>check_snmp</code> etc. Error also appears in statusmap page of Nagios.</p>
<h3>Compile More Nagios Core Components</h3>
<p>I run through <code>./configure</code> once more, check out all warnings, and begin to evaluate <strong>requirements</strong> (found this text inside <code>nagios-plugins-1.4.14</code> tarball)</p>
<h4>MySQL</h4>
<p>For <code>check_mysql</code> functionality, <code>mysql</code> (MySQL client for linux) must be installed. <code>./configure</code> also test this client, by default config, to the local MySQL socket, hence <code>mysql-server</code> must also exist.</p>
<h4>Radius Client</h4>
<p>Client from freeradius package doesn&#8217;t meet Nagios requirements. It must be the ones from original radiusclient, I found RPMs for  <code>radiusclient-0.3.2-0.2.el5.rf.i386.rpm</code> and <code>radiusclient-devel-0.3.2-0.2.el5.rf.i386.rpm</code>.</p>
<h4>GD</h4>
<p>It is quite tricky to get <code>statusmap.c</code> to be compiled for the <code>.cgi</code> of Nagios status map. Compilation needs <code>gd</code> library from <a href="http://www.libgd.org/">http://www.libgd.org/</a>. <code>gd</code> requires <code>zlib</code>, <code>libjpeg</code>, and <code>libpng</code>. On first attempt, I installed from RPMs. This appeared to be not working as I could still see warnings about <code>gd2</code> during .<code>/configure</code>.</p>
<p>So, I choose to compile from the source <code>gd-2.0.33.tar.bz2</code>. This tarball was found in the older section of current <code>gd2</code> web. I chose this version because the RPM used was <code>gd-2.0.33-9.4.el5_1.1.rpm</code>. I removed this RPM first which made me to remove also <code>libmwf</code> and <code>ImageMagick</code>.</p>
<p>After straightforward  <code>configure-make-install</code> the library will be installed under <code>/usr/local/lib</code> i.e <code>libgd.so.2.0.0</code>. Header files will also be available in /<code>usr/local/include</code> i.e <code>gd.h</code>. These are different from the situation when I installed from RPM where <code>libgd.so.2.0.0</code> is under <code>/usr/lib/</code> and no <code>gd.h</code> found under <code>/usr/include</code>.</p>
<p>So, I <code>make devclean</code> and rerun</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-gd-lib</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">--with-gd-inc</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">--with-command-group</span>=nagcmd</pre></div></div>

<p>I configure the /usr/local/nagios/etc/cgi.conf but status map page is still empty. Next workaround is to install back  <code>gd-2.0.33-9.4.el5_1.1.rpm</code>. (which also bring back <code>libmwf</code> and <code>ImageMagick</code>) and point the <code>gd</code> library to the ones created from RPM. I <code>make devclean</code> and rerun:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-gd-lib</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">--with-gd-inc</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">--with-command-group</span>=nagcmd</pre></div></div>

<p>At this point I regret not to have Ubuntu implementation in the first place. Just a small regret.</p>
<p>Other library needed for <code>check_smtp</code>, <code>check_http</code>, etc. don&#8217;t seem to trouble me much, I need <code>openssl</code>, <code>openldap</code>, etc. and simply get them from RPMs.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2009/10/install-nagios-3-and-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
