<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1.3" -->
<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/"
	>

<channel>
	<title>NukeSilo.com</title>
	<link>http://www.nukesilo.com</link>
	<description></description>
	<pubDate>Fri, 10 Aug 2007 18:09:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>
	<language>en</language>
			<item>
		<title>Remotely Enable Remote Desktop</title>
		<link>http://www.nukesilo.com/2007/08/10/remotely-enable-remote-desktop/</link>
		<comments>http://www.nukesilo.com/2007/08/10/remotely-enable-remote-desktop/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 18:09:10 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Terminal Services]]></category>
<category>registry editor</category><category>remote desktop</category><category>Terminal Services</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/08/10/remotely-enable-remote-desktop/</guid>
		<description><![CDATA[There are times when accessing a computer with remote desktop is essential. However, what do you if you forget to enable remote desktop before you deploy the machine at a remote location. The only difference between enabling remote desktop and disabling it is a simple registry setting.  Thankfully we can remotely edit the registry [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when accessing a computer with remote desktop is essential. However, what do you if you forget to enable remote desktop before you deploy the machine at a remote location. The only difference between enabling remote desktop and disabling it is a simple registry setting.  Thankfully we can remotely edit the registry to enable remote desktop.</p>
<p>Logon to a XP workstation or 2000/2003 Server with administrator permissions.</p>
<p>Start the registry editor by choosing Start &gt; Run. Type &#8220;regedit&#8221; and click OK.</p>
<p>Next, select File &gt; Connect Network Registry</p>
<p>Type in the computer name you want to connect to in the object name field.</p>
<p>Click OK and you should see a new computer node appear in the tree.</p>
<p>Expand the new node and browse to following registry key.</p>
<pre>HKLMSYSTEMCurrentControlSetControlTerminal Server</pre>
<p>In the Terminal Server key locate the REG_WORD value fDenyTSConnection. Edit the fDenyTSConnection DWORD and change the value field from 1 to 0 and click OK.</p>
<p>Right-click on the computer node in the left tree and select Disconnect.</p>
<p>You should now be able to use remote desktop to connect to the remote machine. It may be necessary to reboot the machine remotely as well. If so, you can simply run this command at a command prompt.</p>
<pre>shutdown -m servername r</pre>
<a href="http://www.nukesilo.com/tag/registry_editor" rel="tag">registry editor</a>, <a href="http://www.nukesilo.com/tag/remote_desktop" rel="tag">remote desktop</a>, <a href="http://www.nukesilo.com/tag/terminal-services" rel="tag">Terminal Services</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=465&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_465" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/08/10/remotely-enable-remote-desktop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nagios 2.6 Basic Configuration</title>
		<link>http://www.nukesilo.com/2007/05/30/nagios-26-basic-configuration/</link>
		<comments>http://www.nukesilo.com/2007/05/30/nagios-26-basic-configuration/#comments</comments>
		<pubDate>Wed, 30 May 2007 22:25:17 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[Nagios]]></category>
<category>linux</category><category>Nagios</category><category>ubuntu</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/05/30/nagios-26-basic-configuration/</guid>
		<description><![CDATA[Overview
Nagios is an application that monitors any device on a network that is addressable. It is easily configured to monitor a servers availability on the network from just simple TCP/IP ping requests, to more advanced service monitors such as http, dns, and telnet. With plugins it can also monitor health status of devices such as [...]]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p>Nagios is an application that monitors any device on a network that is addressable. It is easily configured to monitor a servers availability on the network from just simple TCP/IP ping requests, to more advanced service monitors such as http, dns, and telnet. With plugins it can also monitor health status of devices such as CPU load, memory utilizaton and drive usage.</p>
<p>Before nagios can be configured it needs to be installed. That documentation can be found here: <a href="http://www.nukesilo.com/2007/03/28/nagios-26-installation-on-ubuntu-606-linux-server/">Nagios 2.6 Installation on Ubuntu 6.06 Linux</a></p>
<p>This tutorial will be broken into two halves. First I&#8217;ll cover the individual configuration files to get a basic install working. There are many ways to organize these files but I&#8217;m only covering the basics. Many of these files will be somewhat self explanatory. The second half will be the step-by-step guide that walks through the process of creating and editing the files.</p>
<p>I&#8217;ve included a downloadable file archive of the configuration files used in this tutorial. They would be useful to have for review while going through the tutorial. (<a href="http://www.nukesilo.com/wp-content/uploads/2007/05/nagios_2-6_sample_config.zip" title="Sample Nagios 2.6 Configuration Files">Sample Nagios 2.6 Configuration Files</a>)</p>
<h2>Configuration Files</h2>
<p>Nagios stores it&#8217;s configuration settings in text files. The organizaion of these text files is variable depending on your preference but the method described here uses the following files for configuration settings:</p>
<ul>
<li>cgi.cfg</li>
<li>commands.cfg</li>
<li>contactgroups.cfg</li>
<li>contacts.cfg</li>
<li>hostgroups.cfg</li>
<li>hosts.cfg</li>
<li>nagios.cfg</li>
<li>resource.cfg</li>
<li>services.cfg</li>
<li>timeperiods.cfg</li>
</ul>
<h3>cgi.cfg</h3>
<p>The cgi.cfg file allows you to modify user permissions and set paths for the nagios system. The excerpt below shows the path where the main nagios configuration file (nagios.cfg) is located.</p>
<pre>
#################################################################
#
# CGI.CFG - Sample CGI Configuration File for Nagios 2.6
#
# Last Modified: 11-21-2006
#
#################################################################
# MAIN CONFIGURATION FILE
# This tells the CGIs where to find your main configuration file.
# The CGIs will read the main and host config files for any other
# data they might need.

main_config_file=/usr/local/share/nagios/etc/nagios.cfg</pre>
<h3>commands.cfg</h3>
<p>A sample commands.cfg file is installed when you run the configure script. It will contain some basic check commands that nagios can use. In our case we&#8217;ll be using the check_host_alive command.</p>
<pre>
#################################################################################
# SAMPLE HOST CHECK COMMANDS
#################################################################################
# This command checks to see if a host is "alive" by pinging it
# The check must result in a 100% packet loss or 5 second (5000ms) round trip
# average time to produce a critical error.
# Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument)
# 'check-host-alive' command definition
define command{
command_name    check-host-alive
command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
}</pre>
<h3>contactgroups.cfg</h3>
<p>A contact group definition is used to group one or more contacts together for the purpose of sending out alert/recovery notifications. When a host or service has a problem or recovers, Nagios will find the appropriate contact groups to send notifications to, and notify all contacts in those contact groups.</p>
<pre>
define contactgroup{
contactgroup_name       admins
alias                   Nagios Administrators
members                 nagios-admin
}</pre>
<h3>contacts.cfg</h3>
<p>A contact definition is used to identify someone who should be contacted in the event of a problem on your network.</p>
<pre>
define contact{
contact_name                    nagios-admin
alias                           Nagios Admin
service_notification_period     24x7
host_notification_period        24x7
service_notification_options    w,u,c,r
host_notification_options       d,r
service_notification_commands   notify-by-email
host_notification_commands      host-notify-by-email
email                           youremail@mail.com
}</pre>
<h3>hostgroups.cfg</h3>
<p>The hostgroups.cfg file allows you to organize your devices into logical groups like swtiches, firewalls, citrix servers etc&#8230; Groups are pretty easy to create. All you need to do is define the group and assign devices. When assigning devices you must use the hostname used in the hosts.cfg file.</p>
<pre>
define hostgroup{
hostgroup_name  Linux Servers
alias           Linux Servers
members         ZEUS
}</pre>
<p>Multiple devices can be added by using &#8220;,&#8221; (commas) as delimiters for your entries.</p>
<pre>
define hostgroup{
hostgroup_name  Linux Servers
alias           Linux Servers
members         ZEUS,HADES,POSEIDON
}</pre>
<h3>hosts.cfg</h3>
<p>hosts.cfg contain all the unique information that pertains to a individual host. There are many options that can be configured for hosts. One way to keep your configurations smaller and reduce repetition is by using templates. Templates allow you to set common settings that can be used for multiple hosts.</p>
<pre>
# Generic host definition template - This is NOT a real host, just a template!
define host{
name                            generic-host    ; The name of this host template
notifications_enabled           1       ; Host notifications are enabled
event_handler_enabled           1       ; Host event handler is enabled
flap_detection_enabled          1       ; Flap detection is enabled
failure_prediction_enabled      1       ; Failure prediction is enabled
process_perf_data               1       ; Process performance data
retain_status_information       1       ; Retain status information across program restarts
retain_nonstatus_information    1       ; Retain non-status information across program restarts
register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}</pre>
<p>Once your template is setup you can begin adding hosts&#8230;</p>
<pre>
define host{
use                     generic-host            ; Name of host template to use
host_name               ZEUS                   ; Name of device being monitored
alias                   ZEUS                   ; Longer name or description of device
address                 127.0.0.1               ; IP or FQDN of device being monitored
check_command           check-host-alive        ; Short name of command used to check if host is up or down, usually a ping
max_check_attempts      10                      ; Number of reties before an alert is sent
check_period            24x7
notification_interval   120                     ; Time period to wait until re-notifying contacts
notification_period     24x7                    ; Time period where notifications are allowed to be sent
notification_options    d,r
contact_groups          admins                  ; Groups that are notified when notifications are sent
}</pre>
<h3>nagios.cfg</h3>
<p>nagios.cfg holds global configuration options for the nagios application. It also tells nagios what and where to find the other configuration files. In order to make nagios recognize the above list of configuration files, you will need to uncomment their entries in the nagios.cfg file. The following is an excerpt from the nagios.cfg files that shows the section controls what configuration files are used.</p>
<pre>
# You can split other types of object definitions across several
# config files if you wish (as done here), or keep them all in a
# single config file.

cfg_file=/usr/local/share/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/share/nagios/etc/contacts.cfg
#cfg_file=/usr/local/share/nagios/etc/dependencies.cfg
#cfg_file=/usr/local/share/nagios/etc/escalations.cfg
cfg_file=/usr/local/share/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/share/nagios/etc/hosts.cfg
cfg_file=/usr/local/share/nagios/etc/services.cfg
cfg_file=/usr/local/share/nagios/etc/timeperiods.cfg</pre>
<h3>resource.cfg</h3>
<p>The resource.cfg file is used to define resources external to nagios such as plugins.</p>
<h3>services.cfg</h3>
<p>A service definition is used to identify a &#8220;service&#8221; that runs on a host. The term &#8220;service&#8221; is used very loosely. It can mean an actual service that runs on the host (POP, SMTP, HTTP, etc.) or some other type of metric associated with the host (response to a ping, number of logged in users, free disk space, etc.).</p>
<p>Again, a template is created to set some of the more common options.</p>
<pre>
# Generic service definition template - This is NOT a real service, just a template!
define service{
name                            generic-service ; The 'name' of this service template
active_checks_enabled           1       ; Active service checks are enabled
passive_checks_enabled          1       ; Passive service checks are enabled/accepted
parallelize_check               1       ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service             1       ; We should obsess over this service (if necessary)
check_freshness                 0       ; Default is to NOT check service 'freshness'
notifications_enabled           1       ; Service notifications are enabled
event_handler_enabled           1       ; Service event handler is enabled
flap_detection_enabled          1       ; Flap detection is enabled
failure_prediction_enabled      1       ; Failure prediction is enabled
process_perf_data               1       ; Process performance data
retain_status_information       1       ; Retain status information across program restarts
retain_nonstatus_information    1       ; Retain non-status information across program restarts
register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}

# Define a service to "ping" a machine
define service{
use                             generic-service         ; Name of service template to use
host_name                       ZEUS
service_description             PING
is_volatile                     0
check_period                    24x7
max_check_attempts              4
normal_check_interval           5
retry_check_interval            1
contact_groups                  admins
notification_options            w,u,c,r
notification_interval           960
notification_period             24x7
check_command                   check_ping!100.0,20%!500.0,60%
}</pre>
<h3>timeperiods.cfg</h3>
<p>The timeperiods.cfg file allows us to set time schedules for nagios to enable or disable checks and notifications.</p>
<h2>Configuration Steps</h2>
<p><em>(*note: Commands preceded by a “$” are run as a normal user and commands preceded by a “#” are run as root.)</em></p>
<p>Logon to your nagios system and change to root privileges.</p>
<p><code># root</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_0.png" title="configuring_nagios_2-6_0.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_0_slim.png" alt="configuring_nagios_2-6_0.png" /></a></p>
<p>Change to the nagios config directory.</p>
<p><code># cd /usr/local/share/nagios/etc/</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_1.png" title="configuring_nagios_2-6_1.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_1_slim.png" alt="configuring_nagios_2-6_1.png" /></a></p>
<p>View a listing of the etc folder contents.</p>
<p><code># ls</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_2.png" title="configuring_nagios_2-6_2.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_2_slim.png" alt="configuring_nagios_2-6_2.png" /></a></p>
<p>The contents should show sample configuration files created when you ran the configuration script during the nagios install.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_3.png" title="configuring_nagios_2-6_3.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_3_slim.png" alt="configuring_nagios_2-6_3.png" /></a></p>
<p>Let&#8217;s create a folder called backup to store those files in case we need them in the future.</p>
<p><code># mkdir backup</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_4.png" title="configuring_nagios_2-6_4.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_4_slim.png" alt="configuring_nagios_2-6_4.png" /></a></p>
<p>Now we&#8217;ll copy all the files to the new backup folder.</p>
<p><code># cp *.* backup/</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_5.png" title="configuring_nagios_2-6_5.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_5_slim.png" alt="configuring_nagios_2-6_5.png" /></a></p>
<p>View the contents of the backup folder to make sure the files made it in there.</p>
<p><code># ls backup</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_6.png" title="configuring_nagios_2-6_6.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_6_slim.png" alt="configuring_nagios_2-6_6.png" /></a></p>
<p>The files are listed in the backup folder.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_7.png" title="configuring_nagios_2-6_7.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_7_slim.png" alt="configuring_nagios_2-6_7.png" /></a></p>
<p>Now we can begin the process of configure nagios for our use. We&#8217;ll start with the nagios.cfg file by renaming the nagios.cfg-sample file.</p>
<p><code># mv nagios.cfg-sample nagios.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_8.png" title="configuring_nagios_2-6_8.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_8_slim.png" alt="configuring_nagios_2-6_8.png" /></a></p>
<p>Now let&#8217;s open nagios.cfg in the nano editor.</p>
<p><code># nano nagios.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_9.png" title="configuring_nagios_2-6_9.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_9_slim.png" alt="configuring_nagios_2-6_9.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/commands.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/commands.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_10.png" title="configuring_nagios_2-6_10.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_10_slim.png" alt="configuring_nagios_2-6_10.png" /></a></p>
<p>Find the line</p>
<pre>cfg_file=/usr/local/share/nagios/etc/localhost.cfg</pre>
<p>and <strong>comment</strong> it by adding a leading &#8220;#&#8221; symbol.</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/localhost.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_11.png" title="configuring_nagios_2-6_11.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_11_slim.png" alt="configuring_nagios_2-6_11.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/contactgroups.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/contactgroups.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_12.png" title="configuring_nagios_2-6_12.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_12_slim.png" alt="configuring_nagios_2-6_12.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/contacts.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/contacts.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_13.png" title="configuring_nagios_2-6_13.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_13_slim.png" alt="configuring_nagios_2-6_13.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/hostgroups.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/hostgroups.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_14.png" title="configuring_nagios_2-6_14.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_14_slim.png" alt="configuring_nagios_2-6_14.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/hosts.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/hosts.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_15.png" title="configuring_nagios_2-6_15.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_15_slim.png" alt="configuring_nagios_2-6_15.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/services.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/services.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_16.png" title="configuring_nagios_2-6_16.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_16_slim.png" alt="configuring_nagios_2-6_16.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/timeperiods.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/timeperiods.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_17.png" title="configuring_nagios_2-6_17.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_17_slim.png" alt="configuring_nagios_2-6_17.png" /></a></p>
<p>Find the line</p>
<pre>#cfg_file=/usr/local/share/nagios/etc/resource.cfg</pre>
<p>and uncomment it by removing the leading &#8220;#&#8221; symbol.</p>
<pre>cfg_file=/usr/local/share/nagios/etc/resource.cfg</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_18.png" title="configuring_nagios_2-6_18.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_18_slim.png" alt="configuring_nagios_2-6_18.png" /></a></p>
<p>Save the modifications to nagios.cfg by pressing &#8220;ctrl-x&#8221; and then &#8220;y&#8221; to confirm.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_19.png" title="configuring_nagios_2-6_19.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_19_slim.png" alt="configuring_nagios_2-6_19.png" /></a></p>
<p>Press &#8220;enter&#8221; to save the file as the default original name.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_20.png" title="configuring_nagios_2-6_20.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_20_slim.png" alt="configuring_nagios_2-6_20.png" /></a></p>
<p>We&#8217;ve just configured nagios to be aware of several files. Now, let&#8217;s rename the available sample files to the corresponding names set in the nagios.cfg file.</p>
<p>First up is the resourse.cfg file.</p>
<p><code># mv resource.cfg-sample resource.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_21.png" title="configuring_nagios_2-6_21.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_21_slim.png" alt="configuring_nagios_2-6_21.png" /></a></p>
<p>Next, the commands.cfg file.</p>
<p><code># mv commands.cfg-sample commands.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_22.png" title="configuring_nagios_2-6_22.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_22_slim.png" alt="configuring_nagios_2-6_22.png" /></a></p>
<p>Now, the cgi.cfg file.</p>
<p><code># mv cgi.cfg-sample cgi.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_23.png" title="configuring_nagios_2-6_23.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_23_slim.png" alt="configuring_nagios_2-6_23.png" /></a></p>
<p>A listing shows the renamed files.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_24.png" title="configuring_nagios_2-6_24.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_24_slim.png" alt="configuring_nagios_2-6_24.png" /></a></p>
<p>Now, we will create the hosts.cfg file.</p>
<p><code># nano hosts.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_25.png" title="configuring_nagios_2-6_25.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_25_slim.png" alt="configuring_nagios_2-6_25.png" /></a></p>
<p>As you can see, we have a blank editor to work in.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_26.png" title="configuring_nagios_2-6_26.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_26_slim.png" alt="configuring_nagios_2-6_26.png" /></a></p>
<p>The easiest way to enter the hosts.cfg information is by pasting it in. I&#8217;m using the PuTTY SSH client to access my server.  One nice feature is that you can paste text from the clipboard by simply right-clicking. You can find a copy of the hosts.cfg file in the <a href="http://www.nukesilo.com/wp-content/uploads/2007/05/nagios_2-6_sample_config.zip" title="Sample Nagios 2.6 Configuration Files">Sample Nagios 2.6 Configuration File</a></p>
<p>The first definition of the hosts.cfg file will be a template. This template will define common settings that can be applied to individual hosts with the &#8220;use&#8221; entry.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_27.png" title="configuring_nagios_2-6_27.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_27_slim.png" alt="configuring_nagios_2-6_27.png" /></a></p>
<p>For this tutorial we are setting up nagios to monitor one host, the nagios server itself. Most of the default settings in the host.cfg file are acceptable to get us up and running. All we need to edit is the &#8220;host_name&#8221; and &#8220;alias&#8221; to be the name of our nagios server. In my case the server is named &#8220;ZEUS&#8221;.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_28.png" title="configuring_nagios_2-6_28.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_28_slim.png" alt="configuring_nagios_2-6_28.png" /></a></p>
<p>I&#8217;ve entereed ZEUS as the host_name.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_29.png" title="configuring_nagios_2-6_29.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_29_slim.png" alt="configuring_nagios_2-6_29.png" /></a></p>
<p>I also went ahead and entered ZEUS for the alias as well. The address is the IP address of the device you are monitoring.</p>
<p>The process of adding more hosts is easy. All you need to do in the hosts.cfg file is duplicate the &#8220;define host&#8221; section for each host your are monitoring.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_30.png" title="configuring_nagios_2-6_30.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_30_slim.png" alt="configuring_nagios_2-6_30.png" /></a></p>
<p>Press &#8220;ctrl-x&#8221; to exit and press &#8220;y&#8221; to save your changes.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_31.png" title="configuring_nagios_2-6_31.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_31_slim.png" alt="configuring_nagios_2-6_31.png" /></a></p>
<p>Press enter to save with the default name of hosts.cfg.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_32.png" title="configuring_nagios_2-6_32.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_32_slim.png" alt="configuring_nagios_2-6_32.png" /></a></p>
<p>Next, we will create the hostgroups.cfg file.</p>
<p><code># nano hostgroups.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_34.png" title="configuring_nagios_2-6_34.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_34_slim.png" alt="configuring_nagios_2-6_34.png" /></a></p>
<p>Here is our blank editor waiting for us to paste the configuration information. You can find the hostgroups.cfg file in the <a href="http://www.nukesilo.com/wp-content/uploads/2007/05/nagios_2-6_sample_config.zip" title="Sample Nagios 2.6 Configuration Files">Sample Nagios 2.6 Configuration Files</a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_35.png" title="configuring_nagios_2-6_35.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_35_slim.png" alt="configuring_nagios_2-6_35.png" /></a></p>
<p>Here is a typical hostgroup entry name Linux Servers. I&#8217;ll be putting the nagios server in this group.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_36.png" title="configuring_nagios_2-6_36.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_36_slim.png" alt="configuring_nagios_2-6_36.png" /></a></p>
<p>It&#8217;s simple to add a host to a group. Just type the name of the host next to the members entry. If you wanted to add multiple hosts to a group you would simply enter each host name separating them by commas.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_37.png" title="configuring_nagios_2-6_37.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_37_slim.png" alt="configuring_nagios_2-6_37.png" /></a></p>
<p>Exit and save the changes.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_38.png" title="configuring_nagios_2-6_38.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_38_slim.png" alt="configuring_nagios_2-6_38.png" /></a></p>
<p>Save the file as hostgroups.cfg</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_39.png" title="configuring_nagios_2-6_39.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_39_slim.png" alt="configuring_nagios_2-6_39.png" /></a></p>
<p>Next, we&#8217;ll create the services.cfg file.</p>
<p><code># nano services.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_41.png" title="configuring_nagios_2-6_41.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_41_slim.png" alt="configuring_nagios_2-6_41.png" /></a></p>
<p>Once, again we have a blank editor to past the services configuration in. The services.cfg file can be found in the <a href="http://www.nukesilo.com/wp-content/uploads/2007/05/nagios_2-6_sample_config.zip" title="Sample Nagios 2.6 Configuration Files">Sample Nagios 2.6 Configuration Files</a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_42.png" title="configuring_nagios_2-6_42.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_42_slim.png" alt="configuring_nagios_2-6_42.png" /></a></p>
<p>The first definition of the services.cfg file is a template similar to the template in the hosts.cfg file.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_43.png" title="configuring_nagios_2-6_43.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_43_slim.png" alt="configuring_nagios_2-6_43.png" /></a></p>
<p>The next definition in the services.cfg file defines the check command and what host to apply it to, as well as other custom options. For our purposes we only need to enter the correct host name. You can change some of these settings to suit your needs but I&#8217;d recommend not changing them until you have a working system.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_44.png" title="configuring_nagios_2-6_44.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_44_slim.png" alt="configuring_nagios_2-6_44.png" /></a></p>
<p>Exit and save.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_45.png" title="configuring_nagios_2-6_45.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_45_slim.png" alt="configuring_nagios_2-6_45.png" /></a></p>
<p>Save the file as services.cfg</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_46.png" title="configuring_nagios_2-6_46.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_46_slim.png" alt="configuring_nagios_2-6_46.png" /></a></p>
<p>Next up is the contacts.cfg file.</p>
<p><code># nano contacts.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_48.png" title="configuring_nagios_2-6_48.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_48_slim.png" alt="configuring_nagios_2-6_48.png" /></a></p>
<p>Again, we have a blank editor to paste the contacts.cfg sample into.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_49.png" title="configuring_nagios_2-6_49.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_49_slim.png" alt="configuring_nagios_2-6_49.png" /></a></p>
<p>This file will need to have the email address modified if you plan on getting email notifications.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_50.png" title="configuring_nagios_2-6_50.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_50_slim.png" alt="configuring_nagios_2-6_50.png" /></a></p>
<p>Exit and save.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_51.png" title="configuring_nagios_2-6_51.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_51_slim.png" alt="configuring_nagios_2-6_51.png" /></a></p>
<p>Save the file as contacts.cfg</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_52.png" title="configuring_nagios_2-6_52.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_52_slim.png" alt="configuring_nagios_2-6_52.png" /></a></p>
<p>The next file we create will be contactgroups.cfg</p>
<p><code># nano contactgroups.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_54.png" title="configuring_nagios_2-6_54.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_54_slim.png" alt="configuring_nagios_2-6_54.png" /></a></p>
<p>Again we have a blank editor.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_55.png" title="configuring_nagios_2-6_55.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_55_slim.png" alt="configuring_nagios_2-6_55.png" /></a></p>
<p>Paste in the sample contactgroups.cfg file.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_56.png" title="configuring_nagios_2-6_56.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_56_slim.png" alt="configuring_nagios_2-6_56.png" /></a></p>
<p>Exit and save the file as contactgroups.cfg</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_57.png" title="configuring_nagios_2-6_57.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_57_slim.png" alt="configuring_nagios_2-6_57.png" /></a></p>
<p>Last, we will create the timeperiods.cfg file.</p>
<p><code># nano timeperiods.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_58.png" title="configuring_nagios_2-6_58.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_58_slim.png" alt="configuring_nagios_2-6_58.png" /></a></p>
<p>Blank editor.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_59.png" title="configuring_nagios_2-6_59.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_59_slim.png" alt="configuring_nagios_2-6_59.png" /></a></p>
<p>Paste in the sample timeperiods.cfg file. As with any of the configuration files we&#8217;ve created, it is completely customizable. However, I recommend that you leave it as is until you get nagios functioning&#8230; then tweak as much as you&#8217;d like.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_60.png" title="configuring_nagios_2-6_60.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_60_slim.png" alt="configuring_nagios_2-6_60.png" /></a></p>
<p>Exit and save the file.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_61.png" title="configuring_nagios_2-6_61.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_61_slim.png" alt="configuring_nagios_2-6_61.png" /></a></p>
<p>Save it as timeperiods.cfg</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_62.png" title="configuring_nagios_2-6_62.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_62_slim.png" alt="configuring_nagios_2-6_62.png" /></a></p>
<p>Now let&#8217;s use nagios to verify the structure of your configuration files. With any luck we will have zero errors. In the case of an error, nagios will attempt to direct you to the location of the error.</p>
<p>We will tell nagios to verify the nagios.cfg configuration.</p>
<p><code># ../bin/nagios -v nagios.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_64.png" title="configuring_nagios_2-6_64.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_64_slim.png" alt="configuring_nagios_2-6_64.png" /></a></p>
<p>We didn&#8217;t get any errors and can proceed to starting nagios.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_65.png" title="configuring_nagios_2-6_65.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_65_slim.png" alt="configuring_nagios_2-6_65.png" /></a></p>
<p>Let&#8217;s start nagios&#8230; or in my case restart nagios.</p>
<p>The command to start is:</p>
<p><code># /etc/init.d/nagios start</code></p>
<p>The command to kill and restart nagios is:</p>
<p><code># /etc/init.d/nagios restart</code></p>
<p>Take your pick.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_66.png" title="configuring_nagios_2-6_66.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_66_slim.png" alt="configuring_nagios_2-6_66.png" /></a></p>
<p>We didn&#8217;t get any errors other that nagios not being able kill the nagios process before starting&#8230; why? because it wasn&#8217;t running.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_67.png" title="configuring_nagios_2-6_67.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_67_slim.png" alt="configuring_nagios_2-6_67.png" /></a></p>
<p>Now that nagios is running, let&#8217;s open a web browser and access the nagios web interface.</p>
<p>If you followed the previous tutorial you should be prompted with a login box.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_68.png" title="configuring_nagios_2-6_68.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_68_slim.png" alt="configuring_nagios_2-6_68.png" /></a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_69.png" title="configuring_nagios_2-6_69.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_69_slim.png" alt="configuring_nagios_2-6_69.png" /></a></p>
<p>After entering your username and password, you will be directed to the nagios home page.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_70.png" title="configuring_nagios_2-6_70.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_70_slim.png" alt="configuring_nagios_2-6_70.png" /></a></p>
<p>Click on &#8220;Host Detail&#8221; in the left navigation bar. We&#8217;ve gotten a permissions error and will have to modify the cgi.cfg file.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_71.png" title="configuring_nagios_2-6_71.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_71_slim.png" alt="configuring_nagios_2-6_71.png" /></a></p>
<p>Return back to the nagios configuration directory.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_72.png" title="configuring_nagios_2-6_72.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_72_slim.png" alt="configuring_nagios_2-6_72.png" /></a></p>
<p>Web interface permissions are stored in the cgi.cfg file so we&#8217;ll edit that and grant ourselves access.</p>
<p><code># nano cgi.cfg</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_73.png" title="configuring_nagios_2-6_73.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_73_slim.png" alt="configuring_nagios_2-6_73.png" /></a></p>
<p>We&#8217;ll edit several permissions settings to grant ourselves more control.</p>
<p>Locate the line:</p>
<pre>authorized_for_system_information</pre>
<p>Make sure you add your username to the list of users like in the image below.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_74.png" title="configuring_nagios_2-6_74.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_74_slim.png" alt="configuring_nagios_2-6_74.png" /></a></p>
<p>Next add your username to the line</p>
<pre>authorized_for_configuration_information</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_75.png" title="configuring_nagios_2-6_75.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_75_slim.png" alt="configuring_nagios_2-6_75.png" /></a></p>
<p>Next add your username to the line</p>
<pre>authorized_for_system_commands</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_76.png" title="configuring_nagios_2-6_76.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_76_slim.png" alt="configuring_nagios_2-6_76.png" /></a></p>
<p>Next add your username to the line</p>
<pre>authorized_for_all_services</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_77.png" title="configuring_nagios_2-6_77.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_77_slim.png" alt="configuring_nagios_2-6_77.png" /></a></p>
<p>Next add your username to the line</p>
<pre>authorized_for_all_hosts</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_78.png" title="configuring_nagios_2-6_78.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_78_slim.png" alt="configuring_nagios_2-6_78.png" /></a></p>
<p>Next add your username to the line</p>
<pre>authorized_for_all_service_commands</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_79.png" title="configuring_nagios_2-6_79.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_79_slim.png" alt="configuring_nagios_2-6_79.png" /></a></p>
<p>Next add your username to the line</p>
<pre>authorized_for_all_host_commands</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_80.png" title="configuring_nagios_2-6_80.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_80_slim.png" alt="configuring_nagios_2-6_80.png" /></a></p>
<p>Exit and save.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_81.png" title="configuring_nagios_2-6_81.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_81_slim.png" alt="configuring_nagios_2-6_81.png" /></a></p>
<p>Make sure to save the file as cgi.cfg</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_82.png" title="configuring_nagios_2-6_82.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_82_slim.png" alt="configuring_nagios_2-6_82.png" /></a></p>
<p>Return to the web interface and try the &#8220;Host Detail&#8221; link again. This time you should see the Host Status Details for your monitored host(s). Click on the host name of your nagios server. In my case that would be ZEUS.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_84.png" title="configuring_nagios_2-6_84.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_84_slim.png" alt="configuring_nagios_2-6_84.png" /></a></p>
<p>You will be directed to the status page for that host. Notice how there isn&#8217;t any status information available. That&#8217;s because nagios hasn&#8217;t had time to do it&#8217;s scheduled check for this host.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_85.png" title="configuring_nagios_2-6_85.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_85_slim.png" alt="configuring_nagios_2-6_85.png" /></a></p>
<p>Click on &#8220;Scheduling Queue&#8221; in the left navigation.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_86.png" title="configuring_nagios_2-6_86.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_86_slim_a.png" alt="configuring_nagios_2-6_86.png" /></a></p>
<p>You should get a page the lists all devices currently queued for checks along with the time of the last check and the time of the next check.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_86.png" title="configuring_nagios_2-6_86.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_86_slim_b.png" alt="configuring_nagios_2-6_86.png" /></a></p>
<p>Notice how I have about a minute to wait before nagios checks this host.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_87.png" title="configuring_nagios_2-6_87.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_87_slim.png" alt="configuring_nagios_2-6_87.png" /></a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_88.png" title="configuring_nagios_2-6_88.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_88_slim.png" alt="configuring_nagios_2-6_88.png" /></a></p>
<p>Now that nagios has checked the host the status has changed from pending to green/up which indicates that the host is alive and healthy.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_89.png" title="configuring_nagios_2-6_89.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_89_slim.png" alt="configuring_nagios_2-6_89.png" /></a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_90.png" title="configuring_nagios_2-6_90.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/05/configuring_nagios_2-6_90_slim.png" alt="configuring_nagios_2-6_90.png" /></a></p>
<h3>Credits</h3>
<p>Nagios:<br />
<a href="http://www.nagios.org" target="_blank"> http://www.nagios.org</a></p>
<p>Nagios Documentation:<br />
<a href="http://nagios.sourceforge.net/docs/2_0/" target="_blank"> http://nagios.sourceforge.net/docs/2_0/</a></p>
<a href="http://www.nukesilo.com/tag/linux" rel="tag">linux</a>, <a href="http://www.nukesilo.com/tag/nagios" rel="tag">Nagios</a>, <a href="http://www.nukesilo.com/tag/ubuntu" rel="tag">ubuntu</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=460&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_460" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/05/30/nagios-26-basic-configuration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Configuring Multiple IP Addresses for Ubuntu Linux</title>
		<link>http://www.nukesilo.com/2007/03/29/configuring-multiple-ip-addresses-for-ubuntu-linux/</link>
		<comments>http://www.nukesilo.com/2007/03/29/configuring-multiple-ip-addresses-for-ubuntu-linux/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 19:07:00 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>
<category>ip addresses</category><category>linux</category><category>multiple ip</category><category>ubuntu</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/03/29/configuring-multiple-ip-addresses-for-ubuntu-linux/</guid>
		<description><![CDATA[There are times when you may want to add a second or multiple IP addresses to your linux system. It&#8217;s fairly straightforward to add a sub-interface to your current configuration.  In fact, it&#8217;s just as easy to add ten sub-interfaces as it is one.
Start by opening a console with root permissions.

Next we edit the [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when you may want to add a second or multiple IP addresses to your linux system. It&#8217;s fairly straightforward to add a sub-interface to your current configuration.  In fact, it&#8217;s just as easy to add ten sub-interfaces as it is one.</p>
<p>Start by opening a console with root permissions.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux0.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux0.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux0_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux0.png" /></a></p>
<p>Next we edit the interfaces configuration file.</p>
<p><code># nano /etc/network/interfaces</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux1.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux1.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux1_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux1.png" /></a></p>
<p>Within the interfaces file, you should see a section that contains IP information for your current network interface cards.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux2.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux2.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux2_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux2.png" /></a></p>
<p>My primary interface in this example is &#8220;eth0&#8243;. If I want to add another ip address to that interface I would start by defining it. For example add a line like the following and modify it to match your setup.</p>
<p><code>auto eth0:1</code></p>
<p>Notice that it is named the same as my original &#8220;eth0&#8243; but also has &#8220;:1&#8243; appended to it.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux3.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux3.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux3_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux3.png" /></a></p>
<p>Below that line add the following line. Again, modifying the interface name to match your configuration.</p>
<p><code>iface eth0:1 inet static</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux4.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux4.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux4_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux4.png" /></a></p>
<p>Next you need to add the IP addressing information. I&#8217;ve used the following.</p>
<pre>address 172.17.2.10

netmask 255.255.0.0

network 172.17.0.0

broadcast 172.17.255.255

gateway 172.17.1.1</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux5.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux5.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux5_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux5.png" /></a></p>
<p>Press &#8220;ctrl-x&#8221; to exit nano editor. Press &#8220;y&#8221; to save modifications.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux6.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux6.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux6_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux6.png" /></a></p>
<p>Accept the default save path.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux7.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux7.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux7_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux7.png" /></a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux8.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux8.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux8_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux8.png" /></a></p>
<p>Next, we need to restart the network service.</p>
<p><code># /etc/init.d/networking restart</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux9.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux9.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux9_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux9.png" /></a></p>
<p>Be alert for any errors when restarting the network. This will indicate a possible typo in the configuration if you get an error.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux10.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux10.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux10_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux10.png" /></a></p>
<p>Let&#8217;s view the new sub-interface we created.</p>
<p><code># ifconfig eth0:1</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux11.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux11.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux11_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux11.png" /></a></p>
<p>All the settings seem to have taken effect&#8230;</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux12.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux12.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux12_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux12.png" /></a></p>
<p>Next we&#8217;ll ping the interface to test it.</p>
<p><code># ping 172.17.2.10</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux13.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux13.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux13_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux13.png" /></a></p>
<p>Successful ping requests are always a good sign. At this point you may want to try to ping another IP address on the same subnet as your new interface. I&#8217;ll leave that part in your capable hands. <img src='http://www.nukesilo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux14.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux14.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux14_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux14.png" /></a></p>
<p>We&#8217;re all done here, so I&#8217;ll log off as root.</p>
<p><code># exit</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux15.png" title="configuring_multiple_ip_addresses_for_ubuntu_linux15.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_multiple_ip_addresses_for_ubuntu_linux15_slim.png" alt="configuring_multiple_ip_addresses_for_ubuntu_linux15.png" /></a></p>
<a href="http://www.nukesilo.com/tag/ip_addresses" rel="tag">ip addresses</a>, <a href="http://www.nukesilo.com/tag/linux" rel="tag">linux</a>, <a href="http://www.nukesilo.com/tag/multiple_ip" rel="tag">multiple ip</a>, <a href="http://www.nukesilo.com/tag/ubuntu" rel="tag">ubuntu</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=225&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_225" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/03/29/configuring-multiple-ip-addresses-for-ubuntu-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nagios 2.6 Installation on Ubuntu 6.06 Linux Server</title>
		<link>http://www.nukesilo.com/2007/03/28/nagios-26-installation-on-ubuntu-606-linux-server/</link>
		<comments>http://www.nukesilo.com/2007/03/28/nagios-26-installation-on-ubuntu-606-linux-server/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 22:41:31 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[Nagios]]></category>
<category>cpu load</category><category>linux</category><category>memory utilization</category><category>Nagios</category><category>service monitors</category><category>snmp</category><category>ubuntu</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/03/28/nagios-26-installation-on-ubuntu-606-linux-server/</guid>
		<description><![CDATA[Nagios is an open source tool that monitors any device on a network that is IP addressable. I use it extensively on a daily basis at my workplace. It is easily configured to monitor a servers availability on the network from just simple TCP/IP ping requests, to more advanced service monitors such as http, dns, [...]]]></description>
			<content:encoded><![CDATA[<p>Nagios is an open source tool that monitors any device on a network that is IP addressable. I use it extensively on a daily basis at my workplace. It is easily configured to monitor a servers availability on the network from just simple TCP/IP ping requests, to more advanced service monitors such as http, dns, telnet, smtp and snmp. With additional plugins it can also monitor health status of devices such as CPU load, memory utilization and drive space consumption.This tutorial is created as a way for me to document the steps I took to install Nagios. There are many ways to install Nagios into a functional system, this just happens to be the way that I got it to work. If you are looking for an easy way to build your own Nagios server follow along and you&#8217;ll have your own running in no time.</p>
<p>Some assumptions are that you have basic Linux skills, and you have a freshly installed Ubuntu 6.06 LAMP server. Even though I&#8217;m going to give you a step-by-step walk through, a foundation of basic Linux knowledge would be preferred. If you need help installing Ubuntu Linux, take a look at my tutorial &#8220;<a href="http://www.nukesilo.com/2007/03/02/installing-a-ubuntu-606-lamp-server/">Installing a Ubuntu 6.06 LAMP Server</a>.&#8221;</p>
<p><em>(*note: Commands preceded by a “$” are run as a normal user and commands preceded by a “#” are run as root.)</em></p>
<h3>System Requirements</h3>
<p>The following software is required for a functional nagios server. This tutorial covers the installation of this software.</p>
<ul>
<li>Apache2</li>
<li>GD Library</li>
<li>Nagios</li>
<li>Nagios Plugins</li>
<li>Basic Compilers</li>
</ul>
<h3>Installation</h3>
<p>Starting from an unprivileged session, we need to change to root.</p>
<p><code>$ su</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux4.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux4.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux4_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux4.png" /></a></p>
<p>Enter your root password.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux5.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux5.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux5_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux5.png" /></a></p>
<p>Now that we have root privileges, we need to  install the &#8220;build-essential&#8221; package. This is really just a list of header files that assist with compiling software.</p>
<p><code># apt-get install build-essential</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux7.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux7.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux7_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux7.png" /></a></p>
<p>Press &#8220;y&#8221; to confirm the installation.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux9.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux9.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux9_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux9.png" /></a></p>
<p>Next, we need to install the GD Graphics Library.</p>
<p><code># apt-get install libgd2-dev</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux11.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux11.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux11_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux11.png" /></a></p>
<p>Once again, press &#8220;y&#8221; to confirm the installation.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux13.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux13.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux13_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux13.png" /></a></p>
<p>Next, we will install apache2.</p>
<p><code># apt-get install apache2</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux15.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux15.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux15_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux15.png" /></a></p>
<p>Notice how it says apache2 is already the newest version? I started this tutorial with a fresh install of a LAMP server so apache2 was already installed and ready.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux16.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux16.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux16_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux16.png" /></a></p>
<p>Now it&#8217;s time to download the nagios and nagios plugin package. I&#8217;m still in the home directory of my unprivileged account. This is where I want to download the files. In the command below, I used one of many download locations. If it doesn&#8217;t work for you another source can be found at <a href="http://www.nagios.com">nagios.com</a>.</p>
<p>The following command will download nagios:</p>
<pre># wget http://umn.dl.sourceforge.net/sourceforge/nagios/nagios-2.6.tar.gz</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux17.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux17.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux17_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux17.png" /></a></p>
<p>When the download is complete you will be returned to the command prompt.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux18.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux18.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux18_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux18.png" /></a></p>
<p>The following command will download the nagios plugins:</p>
<pre># wget http://umn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.5.tar.gz</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux19.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux19.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux19_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux19.png" /></a></p>
<p>Again, you are returned to the command prompt when the download finishes.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux20.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux20.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux20_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux20.png" /></a></p>
<p>Do a directory listing to confirm that the files were downloaded.</p>
<p><code># ls</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux22.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux22.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux22_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux22.png" /></a></p>
<p>Next, we use the &#8220;tar&#8221; command to unwrap and extract the source files of nagios.</p>
<p><code># tar -xvf nagios-2.6.tar.gz</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux23.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux23.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux23_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux23.png" /></a></p>
<p>Let&#8217;s go into the newly extracted nagios folder.</p>
<p><code># cd nagios-2.6</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux25.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux25.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux25_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux25.png" /></a></p>
<p>Let&#8217;s do a directory listing and see what we have.</p>
<p><code># ls</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux27.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux27.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux27_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux27.png" /></a></p>
<p>Everything looks in order here.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux28.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux28.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux28_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux28.png" /></a></p>
<p>Before we proceed, it&#8217;s time to create an account for the purpose of running the nagios scripts.</p>
<p><code># adduser nagios</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux29.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux29.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux29_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux29.png" /></a></p>
<p>You will be asked to create a password. You can pick any password you like.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux30.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux30.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux30_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux30.png" /></a></p>
<p>You will be asked to confirm that password.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux31.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux31.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux31_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux31.png" /></a></p>
<p>Next you will be asked to enter some information pertaining to the new user. All of this information is optional.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux32.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux32.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux32_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux32.png" /></a></p>
<p>Press &#8220;y&#8221; to confirm. After confirming the information, the user is created.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux33.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux33.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux33_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux33.png" /></a></p>
<p>Next we need to make new home for our nagios installation. You can choose any location you like, however you will need to modify this tutorial to correspond to your installation. If this is your first install it may be best to use my suggested location.</p>
<p><code># mkdir /usr/local/share/nagios</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux35.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux35.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux35_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux35.png" /></a></p>
<p>Now we need to make the nagios user the owner of our nagios install folder.</p>
<p><code># chown nagios.nagios /usr/local/share/nagios/</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux37.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux37.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux37_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux37.png" /></a></p>
<p>Next, we need to create a group on our system that will be allowed to execute external commands from the web interface.</p>
<p><code># /usr/sbin/groupadd nagcmd</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux39.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux39.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux39_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux39.png" /></a></p>
<p>Now, we&#8217;ll add the apache user and the nagios user to the nagcmd group.</p>
<p><code># /usr/sbin/usermod -G nagcmd www-data</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux41.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux41.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux41_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux41.png" /></a></p>
<p><code># /usr/sbin/usermod -G nagcmd nagios</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux43.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux43.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux43_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux43.png" /></a></p>
<p>Now we&#8217;re ready to prepare the installation scripts.</p>
<pre># ./configure --prefix=/usr/local/share/nagios --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux45.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux45.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux45_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux45.png" /></a></p>
<p>If the previous command comes back without reporting any errors you can run the following commands. If errors are reported, fix them and run &#8220;make clean&#8221; before running the previous command again.</p>
<p><code># make all</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux47.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux47.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux47_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux47.png" /></a></p>
<p><code># make install</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux49.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux49.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux49_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux49.png" /></a></p>
<p>The following command creates the initialization scripts for nagios.</p>
<p><code># make install-init</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux51.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux51.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux51_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux51.png" /></a></p>
<p>The following command creates the folder permissions nagios needs.</p>
<p><code># make install-commandmode</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux53.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux53.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux53_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux53.png" /></a></p>
<p>Create the sample configuration files.</p>
<p><code># make install-config</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux55.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux55.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux55_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux55.png" /></a></p>
<p>Let&#8217;s move up one directory</p>
<p><code># cd ..</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux57.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux57.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux57_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux57.png" /></a></p>
<p>A directory listing will show us the contents.</p>
<p><code># ls</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux60.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux60.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux60_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux60.png" /></a></p>
<p>It&#8217;s time to extract the nagios plugin scripts.</p>
<p><code># tar -xvf nagios-plugins-1.4.5.tar.gz</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux61.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux61.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux61_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux61.png" /></a></p>
<p>Next, we change to the nagios plugins folder.</p>
<p><code># cd nagios-plugins-1.4.5</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux63.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux63.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux63_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux63.png" /></a></p>
<p>Now, we configure the plugin installation scripts.</p>
<pre># ./configure --prefix=/usr/local/share/nagios --with-cgiurl=/nagios/cgi-bin</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux65.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux65.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux65_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux65.png" /></a></p>
<p>If the previous command comes back without reporting any errors you can run the following commands. If errors are reported, fix them and run &#8220;make clean&#8221; before running the previous command again.</p>
<p><code># make</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux67.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux67.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux67_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux67.png" /></a></p>
<p>Install the plugins.</p>
<p><code># make install</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux69.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux69.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux69_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux69.png" /></a></p>
<p><code># make install-root</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux71.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux71.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux71_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux71.png" /></a></p>
<p>Change directories up one level.</p>
<p><code># cd ..</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux73.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux73.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux73_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux73.png" /></a></p>
<p>Now, it&#8217;s time to configure apache2 to serve up the nagios web interface.</p>
<p><code># nano /etc/apache2/conf.d/nagios.conf</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux76.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux76.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux76_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux76.png" /></a></p>
<p>Type or past the following lines into the nano editor.</p>
<pre>ScriptAlias /nagios/cgi-bin /usr/local/share/nagios/sbin

&lt;Directory "/usr/local/share/nagios/sbin"&gt;
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/share/nagios/etc/htpasswd.users
Require valid-user
&lt;/Directory&gt;

Alias /nagios /usr/local/share/nagios/share

&lt;Directory "/usr/local/share/nagios/share"&gt;
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/share/nagios/etc/htpasswd.users
Require valid-user
&lt;/Directory&gt;</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux78.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux78.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux78_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux78.png" /></a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux79.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux79.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux79_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux79.png" /></a></p>
<p>Press &#8220;ctrl-x&#8221; to close the file. Press &#8220;y&#8221; to confirm saving when asked.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux80.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux80.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux80_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux80.png" /></a></p>
<p>Use the default location of &#8220;/etc/apache2/conf.d/nagios.conf&#8221; for saving the file.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux81.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux81.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux81_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux81.png" /></a></p>
<p>Reload apache to apply the new settings.</p>
<p><code># /etc/init.d/apache2 restart</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux83.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux83.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux83_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux83.png" /></a></p>
<p>Create a password file for users authorized to access the nagios web interface. Here I&#8217;ll use &#8220;nagiosadmin&#8221; as the username.</p>
<p><em>(* The &#8220;-c&#8221; option tells htpasswd to create a new file. If you are adding multiple users don&#8217;t use the &#8220;-c&#8221; option or else you will continually create a new file, erasing the previous entries before them.)</em></p>
<pre># htpasswd -c /usr/local/share/nagios/etc/htpasswd.users nagiosadmin</pre>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux85.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux85.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux85_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux85.png" /></a></p>
<p>Choose a secure password for the nagiosadmin account.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux86.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux86.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux86_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux86.png" /></a></p>
<p>Confirm your password.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux87.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux87.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux87_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux87.png" /></a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux88.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux88.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux88_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux88.png" /></a></p>
<p>We&#8217;re finished using root access for now, time to logout.</p>
<p><code># exit</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux89.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux89.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux89_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux89.png" /></a></p>
<p>We can now proceed to a computer with a web browser. In the address bar, type http://&lt;your.server.ip&gt;/nagios where &lt;your.server.ip&gt; is the IP address of the nagios server.<a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux92.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux92.png" rel="lightbox"><br />
</a></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux93.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux93.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux93_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux93.png" /></a></p>
<p>You should get an authentication prompt. You can enter your nagiosadmin user-name and password here and click ok.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux95.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux95.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux95_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux95.png" /></a></p>
<p>What should appear next is your nagios server&#8217;s web interface.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux96.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux96.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux96_slim.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux96.png" /></a></p>
<h3>What next?</h3>
<p>At this point you have nagios installed. It isn&#8217;t useful yet because we haven&#8217;t configured it, nor have we started the nagios service on the server.  The next step is to follow my guide for <a href="http://www.nukesilo.com/2007/05/30/nagios-26-basic-configuration/">configuring nagios</a>.</p>
<p>If you find any errors, typos, omissions or have any questions, please give me a shout. Thanks!</p>
<h3>Credits</h3>
<p>Jon aka cavern<br />
<a href="http://ubuntuforums.org/showthread.php?t=223498">http://ubuntuforums.org/showthread.php?t=223498</a></p>
<a href="http://www.nukesilo.com/tag/cpu_load" rel="tag">cpu load</a>, <a href="http://www.nukesilo.com/tag/linux" rel="tag">linux</a>, <a href="http://www.nukesilo.com/tag/memory_utilization" rel="tag">memory utilization</a>, <a href="http://www.nukesilo.com/tag/nagios" rel="tag">Nagios</a>, <a href="http://www.nukesilo.com/tag/service_monitors" rel="tag">service monitors</a>, <a href="http://www.nukesilo.com/tag/snmp" rel="tag">snmp</a>, <a href="http://www.nukesilo.com/tag/ubuntu" rel="tag">ubuntu</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=138&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_138" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/03/28/nagios-26-installation-on-ubuntu-606-linux-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nagios Teaser</title>
		<link>http://www.nukesilo.com/2007/03/27/nagios-teaser/</link>
		<comments>http://www.nukesilo.com/2007/03/27/nagios-teaser/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 17:24:00 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Nagios]]></category>
<category>howto</category><category>Nagios</category><category>tutorial</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/03/27/nagios-teaser/</guid>
		<description><![CDATA[ Here is a little glimpse of the next article I&#8217;m writing. It&#8217;ll be a step-by-step tutorial on installing Nagios on Ubuntu.  It&#8217;s a little lengthy so it&#8217;s taking me a little time to get all the screenshots organized. I&#8217;ll get the tutorial out the door as fast as I can. In the meantime, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux96.png" title="nagios_2-6_installation_on_ubuntu_6-06_linux96.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/nagios_2-6_installation_on_ubuntu_6-06_linux96.thumbnail.png" alt="nagios_2-6_installation_on_ubuntu_6-06_linux96.png" style="border: medium none ; float: left; margin-right: 10px" /></a> Here is a little glimpse of the next article I&#8217;m writing. It&#8217;ll be a step-by-step tutorial on installing Nagios on Ubuntu.  It&#8217;s a little lengthy so it&#8217;s taking me a little time to get all the screenshots organized. I&#8217;ll get the tutorial out the door as fast as I can. In the meantime, here is a link out to the <a href="http://www.nagios.com">Nagios</a> web site for more information.</p>
<a href="http://www.nukesilo.com/tag/howto" rel="tag">howto</a>, <a href="http://www.nukesilo.com/tag/nagios" rel="tag">Nagios</a>, <a href="http://www.nukesilo.com/tag/tutorial" rel="tag">tutorial</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=328&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_328" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/03/27/nagios-teaser/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Kill Disconnected Terminal Services Sessions Remotely</title>
		<link>http://www.nukesilo.com/2007/03/22/kill-disconnected-terminal-services-sessions-remotely/</link>
		<comments>http://www.nukesilo.com/2007/03/22/kill-disconnected-terminal-services-sessions-remotely/#comments</comments>
		<pubDate>Thu, 22 Mar 2007 17:13:04 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Terminal Services]]></category>
<category>administration mode</category><category>rdp client</category><category>Terminal Services</category><category>terminal server</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/03/22/kill-disconnected-terminal-services-sessions-remotely/</guid>
		<description><![CDATA[Terminal Services Remote Administration mode is a great tool for gaining access to servers at remote sites. It allows for a maximum of two sessions to allows administrators to connect and perform their duties. By default broken connections are set to go into a disconnected state rather than resetting. This allows system updates, patches or [...]]]></description>
			<content:encoded><![CDATA[<p>Terminal Services Remote Administration mode is a great tool for gaining access to servers at remote sites. It allows for a maximum of two sessions to allows administrators to connect and perform their duties. By default broken connections are set to go into a disconnected state rather than resetting. This allows system updates, patches or other tasks being performed on the server to continue even if the remote session gets interrupted.</p>
<p>This is all well and good, however, there are times when the maximum number of sessions is reached and the terminal server will not allow you to connect anymore. This can be frustrating when the server you are trying to access is across town or in another city.</p>
<p>There is a solution to this dilemma. From a command-line it is possible to get a list of sessions on any server in your network with the &#8220;qwinsta&#8221; command. The &#8220;rwinsta&#8221; command will then allow you to reset a session as well.</p>
<p>The command to list all sessions:</p>
<p><code>qwinsa /SERVER:servername</code></p>
<p>The command to reset a session:</p>
<p><code>rwinsta {sessionname | sessionid} /SERVER:servername</code></p>
<p>Just pick either the sessionname or sessionid of the session you want to reset and replace the brackets above.</p>
<p>Use the qwinsta command to verify that the session was reset. You can now reconnect with your RDP client.</p>
<a href="http://www.nukesilo.com/tag/administration_mode" rel="tag">administration mode</a>, <a href="http://www.nukesilo.com/tag/rdp_client" rel="tag">rdp client</a>, <a href="http://www.nukesilo.com/tag/terminal-services" rel="tag">Terminal Services</a>, <a href="http://www.nukesilo.com/tag/terminal_server" rel="tag">terminal server</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=224&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_224" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/03/22/kill-disconnected-terminal-services-sessions-remotely/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bookmark All Tabs in Firefox</title>
		<link>http://www.nukesilo.com/2007/03/21/bookmark-all-tabs-in-firefox/</link>
		<comments>http://www.nukesilo.com/2007/03/21/bookmark-all-tabs-in-firefox/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 22:49:24 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Firefox]]></category>
<category>Firefox</category><category>tabs</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/03/21/bookmark-all-tabs-in-firefox/</guid>
		<description><![CDATA[If you&#8217;re anything like me you tend to have several tabs open in Firefox at any given time. Anytime I&#8217;m reading an article and I come across a link I want to follow I&#8217;ll open it in a new tab with the intent of checking it out when I&#8217;m done with my current page. More [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re anything like me you tend to have several tabs open in Firefox at any given time. Anytime I&#8217;m reading an article and I come across a link I want to follow I&#8217;ll open it in a new tab with the intent of checking it out when I&#8217;m done with my current page. More often than not this tends to leave me with 1-2 dozen tabs open at any given time.</p>
<p>Inevitably, I usually have other things to do and I can&#8217;t always browse through my open tabs before I have to leave my workstation. I certainly don&#8217;t want to risk losing all those open pages that I spent time finding.  The answer for me is to bookmark them all at once.</p>
<p>If Firefox, under the Bookmarks menu, click Bookmark All Tabs.</p>
<p>Type in a name for new folder where it says &#8220;[Folder Name]&#8221;.</p>
<p>In &#8220;Create In&#8221;, select the folder you want the new folder to be located.</p>
<p>Click OK and that&#8217;s all there is to it.</p>
<a href="http://www.nukesilo.com/tag/firefox" rel="tag">Firefox</a>, <a href="http://www.nukesilo.com/tag/tabs" rel="tag">tabs</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=223&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_223" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/03/21/bookmark-all-tabs-in-firefox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Configuring Static IP Addressing for Ubuntu Linux</title>
		<link>http://www.nukesilo.com/2007/03/20/configuring-static-ip-addressing-for-ubuntu-linux/</link>
		<comments>http://www.nukesilo.com/2007/03/20/configuring-static-ip-addressing-for-ubuntu-linux/#comments</comments>
		<pubDate>Tue, 20 Mar 2007 22:40:19 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>
<category>broadcast address</category><category>gateway address</category><category>linux</category><category>network id</category><category>static ip addresses</category><category>subnet mask</category><category>tcp ip</category><category>ubuntu</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/03/20/configuring-static-ip-addressing-for-ubuntu-linux/</guid>
		<description><![CDATA[Since I covered configuring DHCP Addressing for Ubuntu Linux yesterday, I figured it would be a good idea to post a quick article about assigning static IP addresses to your system. Often when you install Ubuntu on a network with a live DHCP server, it will not give you the chance to statically set your [...]]]></description>
			<content:encoded><![CDATA[<p>Since I covered configuring DHCP Addressing for Ubuntu Linux yesterday, I figured it would be a good idea to post a quick article about assigning static IP addresses to your system. Often when you install Ubuntu on a network with a live DHCP server, it will not give you the chance to statically set your IP when you are installing. After the install it&#8217;s easy to go in and make the necessary changes.First there are a few decisions you need to make. You will need to decide what IP address, subnet mask, network id, broadcast address and gateway address you will be using on your system.  It is beyond the scope of this article to help you caclulate the necessary settings. If there is enough demand, maybe I&#8217;ll write a TCP/IP subnetting tutorial.</p>
<p>For this example I have chosen the following settings:</p>
<p><em>IP Address: 192.168.200.10<br />
Subnet Mask: 255.255.255.0<br />
Network: 192.168.200.0<br />
Broadcast: 192.168.200.255<br />
Gateway: 192.168.200.2</em></p>
<p>Now that we have decided what settings we are going to use, all we need to do is apply them.</p>
<p>We&#8217;ll start at the command prompt. I have already logged in using my unprivileged account.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux0.png" title="configuring_static_ip_addressing_for_ubuntu_linux0.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux0_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux0.png" /></a></p>
<p>Next, we need to gain root privileges.</p>
<p><code>$ su</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux1.png" title="configuring_static_ip_addressing_for_ubuntu_linux1.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux1_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux1.png" /></a></p>
<p>Enter your root password.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux2.png" title="configuring_static_ip_addressing_for_ubuntu_linux2.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux2_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux2.png" /></a></p>
<p>Now we can begin.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux3.png" title="configuring_static_ip_addressing_for_ubuntu_linux3.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux3_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux3.png" /></a></p>
<p>It would be wise to backup our current network configuration just to be on the safe side. We&#8217;ll make a copy of the interfaces file and name it interfaces.backup</p>
<p><code># cp /etc/network/interfaces /etc/network/interfaces.backup</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux4.png" title="configuring_static_ip_addressing_for_ubuntu_linux4.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux4_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux4.png" /></a></p>
<p>That was easy.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux5.png" title="configuring_static_ip_addressing_for_ubuntu_linux5.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux5_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux5.png" /></a></p>
<p>Now we&#8217;ll use the nano editor to make our changes to the interfaces file.</p>
<p><code># nano /etc/network/interfaces</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux6.png" title="configuring_static_ip_addressing_for_ubuntu_linux6.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux6_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux6.png" /></a></p>
<p>After opening the file you will see something similar to this. Depending on your hardware configuration, you may have a different name for your interface, or you may have multiple interfaces.</p>
<p>My primary network interface is called &#8220;eth0&#8243;</p>
<p>Notice how it says &#8220;dhcp&#8221;? Let&#8217;s remove that word.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux7.png" title="configuring_static_ip_addressing_for_ubuntu_linux7.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux7_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux7.png" /></a></p>
<p>OK, done.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux8.png" title="configuring_static_ip_addressing_for_ubuntu_linux8.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux8_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux8.png" /></a></p>
<p>Now lets put the word &#8220;static&#8221; in it&#8217;s place.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux9.png" title="configuring_static_ip_addressing_for_ubuntu_linux9.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux9_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux9.png" /></a></p>
<p>Now comes the IP settings. These settings will have to be unique for your network. However they must follow the basic structure as indicated below. These settings will go directly below the line &#8220;<em>iface eth0 inet static</em>&#8220;.</p>
<p><em>address 192.168.200.10<br />
netmask 255.255.255.0<br />
network 192.168.200.0<br />
broadcast 192.168.200.255<br />
gateway 192.168.200.2</em></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux10.png" title="configuring_static_ip_addressing_for_ubuntu_linux10.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux10_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux10.png" /></a></p>
<p>After double-checking the settings we need to save the file. Press &#8220;ctrl-x&#8221; and then press &#8220;y&#8221; to confirm saving.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux11.png" title="configuring_static_ip_addressing_for_ubuntu_linux11.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux11_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux11.png" /></a></p>
<p>Press enter to select the default save path and update the original file.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux12.png" title="configuring_static_ip_addressing_for_ubuntu_linux12.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux12_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux12.png" /></a></p>
<p>Nano tells us the save was successful.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux13.png" title="configuring_static_ip_addressing_for_ubuntu_linux13.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux13_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux13.png" /></a></p>
<p>Now we need to restart the networking services.</p>
<p><code># /etc/init.d/networking restart</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux14.png" title="configuring_static_ip_addressing_for_ubuntu_linux14.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux14_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux14.png" /></a></p>
<p>Watch for any errors while the system re-initiates the network with our new settings.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux15.png" title="configuring_static_ip_addressing_for_ubuntu_linux15.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux15_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux15.png" /></a></p>
<p>Lets check to see if our settings have taken effect.</p>
<p><code># ifconfig eth0</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux16.png" title="configuring_static_ip_addressing_for_ubuntu_linux16.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux16_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux16.png" /></a></p>
<p>Looks like the system is now using our new settings. If the system doesn&#8217;t show you the updated settings, try rebooting the system and checking again.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux17.png" title="configuring_static_ip_addressing_for_ubuntu_linux17.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_static_ip_addressing_for_ubuntu_linux17_slim.png" alt="configuring_static_ip_addressing_for_ubuntu_linux17.png" /></a></p>
<p>We&#8217;re all good here. Don&#8217;t forget to exit out of root privilege mode when you&#8217;re finished.</p>
<a href="http://www.nukesilo.com/tag/broadcast_address" rel="tag">broadcast address</a>, <a href="http://www.nukesilo.com/tag/gateway_address" rel="tag">gateway address</a>, <a href="http://www.nukesilo.com/tag/linux" rel="tag">linux</a>, <a href="http://www.nukesilo.com/tag/network_id" rel="tag">network id</a>, <a href="http://www.nukesilo.com/tag/static_ip_addresses" rel="tag">static ip addresses</a>, <a href="http://www.nukesilo.com/tag/subnet_mask" rel="tag">subnet mask</a>, <a href="http://www.nukesilo.com/tag/tcp_ip" rel="tag">tcp ip</a>, <a href="http://www.nukesilo.com/tag/ubuntu" rel="tag">ubuntu</a><p class="akst_link"><a href="http://www.nukesilo.com/?p=185&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_185" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.nukesilo.com/2007/03/20/configuring-static-ip-addressing-for-ubuntu-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Configuring DHCP Addressing for Ubuntu Linux</title>
		<link>http://www.nukesilo.com/2007/03/19/configuring-dhcp-addressing-for-ubuntu-linux/</link>
		<comments>http://www.nukesilo.com/2007/03/19/configuring-dhcp-addressing-for-ubuntu-linux/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 21:33:01 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>
<category>dhcp</category><category>ip addressing</category><category>linux</category><category>nano</category><category>network interface cards</category><category>ubuntu</category>
		<guid isPermaLink="false">http://www.nukesilo.com/2007/03/19/configuring-dhcp-addressing-for-ubuntu-linux/</guid>
		<description><![CDATA[Normally the network interface cards are configured during the installation of Linux. However, sometimes certain circumstances require you to change the addressing scheme of your system. This article will take you step by step through the process of configuring your system to use DHCP for obtaining its IP addressing information. Ubuntu has some very nice [...]]]></description>
			<content:encoded><![CDATA[<p>Normally the network interface cards are configured during the installation of Linux. However, sometimes certain circumstances require you to change the addressing scheme of your system. This article will take you step by step through the process of configuring your system to use DHCP for obtaining its IP addressing information. Ubuntu has some very nice GUI tools to allow you to change your settings with the click of the mouse but this article will focus on how to make your changes from a command line in the event that you don&#8217;t have the GUI installed. Also, this tutorial is Ubuntu/Debian centric but the principles can be applied to many other Linux distributions, especially any that are based on Debian.</p>
<p>There is one tool that is needed, a text editor. In this article we&#8217;ll use the nano editor. Nano is a nice and easy editor that is installed by default in Ubuntu.</p>
<p><em>(*note: Commands preceded by a “$” are run as a normal user and commands preceded by a “#” are run as root.)</em></p>
<p>All of the network interface settings are contained in a text file. In order to change any settings we just need to edit the file correctly and restart the networking services. The file we need to edit is stored in /etc/network/interfaces.</p>
<p>The first thing we need to do is login. You know the drill&#8230;</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux0.png" title="configuring_dchp_addressing_for_ubuntu_linux0.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux0_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux0.png" /></a></p>
<p>Username</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux1.png" title="configuring_dchp_addressing_for_ubuntu_linux1.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux1_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux1.png" /></a></p>
<p>Password</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux2.png" title="configuring_dchp_addressing_for_ubuntu_linux2.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux2_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux2.png" /></a></p>
<p>Success!</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux3.png" title="configuring_dchp_addressing_for_ubuntu_linux3.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux3_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux3.png" /></a></p>
<p>In order to make any system changes like network interface settings, we need to have root privileges. Use the &#8220;su&#8221; command to change to root.</p>
<p><code>$ su</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux4.png" title="configuring_dchp_addressing_for_ubuntu_linux4.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux4_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux4.png" /></a></p>
<p>And the root password is required.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux5.png" title="configuring_dchp_addressing_for_ubuntu_linux5.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux5_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux5.png" /></a></p>
<p>Alright, before we get into editing any settings, I want to suggest that you make a backup of the file we are editing. We are editing the file stored in /etc/network/interfaces. I don&#8217;t have a screen shot of backing up the file because I was bad and didn&#8217;t do it. However, an easy way to back the file up would be as follows:</p>
<p><code># cp /etc/network/interfaces /etc/network/interfaces.backup</code></p>
<p>That command will give us a copy of interfaces called interfaces.backup that we can restore if necessary.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux6.png" title="configuring_dchp_addressing_for_ubuntu_linux6.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux6_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux6.png" /></a></p>
<p>Now we can open the interfaces file for editing. We will use the nano editor with the &#8220;-w&#8221; option to signify no wrapping of long lines of text.</p>
<p><code># nano -w /etc/network/interfaces</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux7.png" title="configuring_dchp_addressing_for_ubuntu_linux7.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux7_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux7.png" /></a></p>
<p>Since we are changing the system to use DHCP we need to remove some of the information that pertains to static IP addressing. Notice below that there are several indented lines.</p>
<p>We need to remove this section of data:</p>
<p><em>address 192.168.200.10<br />
netmask 255.255.255.0<br />
network 192.168.200.0<br />
broadcast 192.168.200.2<br />
# dns-* options are implemented&#8230;<br />
dns-nameservers 192.168.200.2</em></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux8.png" title="configuring_dchp_addressing_for_ubuntu_linux8.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux8_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux8.png" /></a></p>
<p>Notice here that the interface is set to static.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux9.png" title="configuring_dchp_addressing_for_ubuntu_linux9.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux9_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux9.png" /></a></p>
<p>Remove the word &#8220;static&#8221;&#8230;</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux10.png" title="configuring_dchp_addressing_for_ubuntu_linux10.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux10_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux10.png" /></a></p>
<p>&#8230;and replace it with &#8220;dhcp&#8221;.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux11.png" title="configuring_dchp_addressing_for_ubuntu_linux11.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux11_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux11.png" /></a></p>
<p>Were all done editing, press &#8220;ctrl-x&#8221; to close the file. Nano will respond by asking if you want to save.</p>
<p>Press &#8220;y&#8221; to save.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux12.png" title="configuring_dchp_addressing_for_ubuntu_linux12.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux12_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux12.png" /></a></p>
<p>Nano will ask for a name and path to save the file.</p>
<p>Just press enter to save the modifications over the original file.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux13.png" title="configuring_dchp_addressing_for_ubuntu_linux13.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux13_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux13.png" /></a></p>
<p>You know the save was successful when nano tells you that it wrote X lines. If you get a save error, you most likely aren&#8217;t root.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux14.png" title="configuring_dchp_addressing_for_ubuntu_linux14.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux14_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux14.png" /></a></p>
<p>To make the new setting take effect, we need to restart the networking services. That is accomplished with the following command:</p>
<p><code># /etc/init.d/networking restart</code></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux15.png" title="configuring_dchp_addressing_for_ubuntu_linux15.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux15_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux15.png" /></a></p>
<p>Notice that when the restart is initiated we see that it is using DHCP.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux16.png" title="configuring_dchp_addressing_for_ubuntu_linux16.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux16_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux16.png" /></a></p>
<p>Let&#8217;s check to see if we received an IP address dynamically. Issue the command:</p>
<p><code># ifconfig eth0</code></p>
<p><em>(*substitute eth0 with the interface appropriate to your system)</em></p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux17.png" title="configuring_dchp_addressing_for_ubuntu_linux17.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux17_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux17.png" /></a></p>
<p>If we see address information like below, we know that it&#8217;s working.</p>
<p><a href="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux18.png" title="configuring_dchp_addressing_for_ubuntu_linux18.png" rel="lightbox"><img src="http://www.nukesilo.com/wp-content/uploads/2007/03/configuring_dchp_addressing_for_ubuntu_linux18_slim.png" alt="configuring_dchp_addressing_for_ubuntu_linux18.png" /></a></