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

<channel>
	<title>blogt0sk1 &#187; Debian</title>
	<atom:link href="http://blog.jerodsanto.net/category/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jerodsanto.net</link>
	<description>with Jerod Santo</description>
	<lastBuildDate>Sat, 19 Jun 2010 14:34:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Let Capistrano Compile Ruby 1.9 For You</title>
		<link>http://blog.jerodsanto.net/2009/06/let-capistrano-compile-ruby-19-for-you/</link>
		<comments>http://blog.jerodsanto.net/2009/06/let-capistrano-compile-ruby-19-for-you/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 20:46:17 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[ruby19]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=434</guid>
		<description><![CDATA[A Capistrano task to install Ruby 1.9.1 to &#8220;/opt/ruby-1.9.1&#8221; on Debian: With this task, you can quickly upgrade all your Debian machines to Ruby 1.9.1 without having to go through the process each time. Just: cap ruby:install_19]]></description>
			<content:encoded><![CDATA[<p>A Capistrano task to install Ruby 1.9.1 to &#8220;<strong>/opt/ruby-1.9.1</strong>&#8221; on Debian:<br />
<span id="more-434"></span><br />
<script src="http://gist.github.com/122553.js"></script></p>
<p>With this task, you can quickly upgrade all your Debian machines to Ruby 1.9.1 without having to go through the process each time. Just:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">cap ruby:install_19</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/06/let-capistrano-compile-ruby-19-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoid Sore Fingers While SSHing Around</title>
		<link>http://blog.jerodsanto.net/2009/05/avoid-sore-fingers-while-sshing-around/</link>
		<comments>http://blog.jerodsanto.net/2009/05/avoid-sore-fingers-while-sshing-around/#comments</comments>
		<pubDate>Thu, 14 May 2009 12:58:36 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=308</guid>
		<description><![CDATA[If you&#8217;re anything like me, you&#8217;ve gotten accustomed to commands like this: ssh [user]@[remote.server.com] If you find yourself connecting to the same machines repeatedly, save a few keystrokes by creating a handy alias for them. Create (or edit) &#8220;~/.ssh/config&#8221; and add as many of these as your little heart desires: Host &#91;the alias&#93; HostName &#91;domain [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re anything like me, you&#8217;ve gotten accustomed to commands like this:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">ssh [user]@[remote.server.com]</pre></div></div>

<p>If you find yourself connecting to the same machines repeatedly, save a few keystrokes by creating a handy alias for them. Create (or edit) &#8220;<strong>~/.ssh/config</strong>&#8221; and add as many of these as your little heart desires:</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">Host <span style="color: #000066; font-weight:bold;"><span style="color: #000;">&#91;</span>the alias<span style="color: #000;">&#93;</span></span>
HostName <span style="color: #000066; font-weight:bold;"><span style="color: #000;">&#91;</span>domain name or IP address<span style="color: #000;">&#93;</span></span>
User <span style="color: #000066; font-weight:bold;"><span style="color: #000;">&#91;</span>the account to login as<span style="color: #000;">&#93;</span></span></pre></div></div>

<p>Now you don&#8217;t have to use the full command to access the machine, just use the alias! For example, here is how I access one of my DreamHost servers:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">ssh dh</pre></div></div>

<p>The same goes for SCP! So, to secure copy a file (my_file.txt) in my current directory to the same machine I would simply issue:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">scp my_file.txt dh:</pre></div></div>

<p>Ahh&#8230; that is easy on the fingers! What else can we do with SSH config files?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/05/avoid-sore-fingers-while-sshing-around/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2&gt;&amp;1</title>
		<link>http://blog.jerodsanto.net/2009/03/2-1/</link>
		<comments>http://blog.jerodsanto.net/2009/03/2-1/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 12:57:46 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[cron]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=183</guid>
		<description><![CDATA[A common practice when adding entries to crontab is to end the entry like this: &#62;/dev/null 2&#62;&#38;1 The purpose of this is to suppress any output from the command itself, because we&#8217;re not interested. I picked up this syntax years ago because it just works, but I never knew what the &#8217;2>&#038;1&#8242; actually meant, until [...]]]></description>
			<content:encoded><![CDATA[<p>A common practice when adding entries to crontab is to end the entry like this:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"> &gt;/dev/null 2&gt;&amp;1</pre></div></div>

<p>The purpose of this is to suppress any output from the command itself, because we&#8217;re not interested. I picked up this syntax years ago because it just works, but I never knew what the &#8217;2>&#038;1&#8242; actually meant, until today.</p>
<p>The first part:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"> &gt;/dev/null</pre></div></div>

<p>Means redirect STDOUT (the standard output stream) to /dev/null (which is basically a blackhole for bits). That&#8217;s easy enough.</p>
<p>The second part:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"> 2&gt;&amp;1</pre></div></div>

<p>Means redirect STDERR (standard error stream) to the same place as STDOUT (which was just specified). STDOUT has the assigned number 1 and STDERR has the assigned number 2.</p>
<p>This way both STDOUT (1) and STDERR (2) are directed to /dev/null and all output of the cronned command is suppressed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/03/2-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsnapshot (Rsync) Gotcha</title>
		<link>http://blog.jerodsanto.net/2009/03/rsnapshotrsync-gotcha/</link>
		<comments>http://blog.jerodsanto.net/2009/03/rsnapshotrsync-gotcha/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 19:43:41 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[gotchas]]></category>
		<category><![CDATA[rsnapshot]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=179</guid>
		<description><![CDATA[If you&#8217;re trying to backup a remote host using rsnapshot (or rsync by itself) and run into one of the following ambiguous errors: rsnapshot version: ERROR: /usr/bin/rsync returned 12 while processing ... rsync version: rsync error: error in rsync protocol data stream (code 12) It&#8217;s probably because you don&#8217;t have rsync installed on the remote [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re trying to backup a remote host using <a href="http://rsnapshot.org/">rsnapshot</a> (or rsync by itself) and run into one of the following ambiguous errors:</p>
<p><strong>rsnapshot version:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">ERROR: /usr/bin/rsync returned 12 while processing ...</pre></div></div>

<p><strong>rsync version:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">rsync error: error in rsync protocol data stream (code 12)</pre></div></div>

<p>It&#8217;s probably because you don&#8217;t have rsync installed on the remote host (doh!)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/03/rsnapshotrsync-gotcha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bash array and loops in FireHOL configuration</title>
		<link>http://blog.jerodsanto.net/2009/02/bash-array-and-loops-in-firehol-configuratio/</link>
		<comments>http://blog.jerodsanto.net/2009/02/bash-array-and-loops-in-firehol-configuratio/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 15:50:49 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[firehol]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=172</guid>
		<description><![CDATA[IPTables is a powerful but cryptic firewall solution. FireHOL is an IPTables configurator that flat out rocks. One of FireHOL&#8217;s strengths is that it uses standard BASH syntax inside its configuration file, so you get all the power of BASH to configure your firewall. Let&#8217;s see how a BASH array and for loop can help [...]]]></description>
			<content:encoded><![CDATA[<p>IPTables is a powerful but cryptic firewall solution. <a href="http://firehol.sourceforge.net/">FireHOL</a> is an IPTables configurator that flat out rocks. One of FireHOL&#8217;s strengths is that it uses standard <a href="http://www.gnu.org/software/bash/bash.html">BASH</a> syntax inside its configuration file, so you get all the power of BASH to configure your firewall.</p>
<p>Let&#8217;s see how a BASH array and for loop can help clean up our FireHOL config:</p>
<p>You have 3 machines that need SSH access to the server. First, you can setup variable names to reference the IP addresses (or DNS names) of the machines. Put these declarations at the top of your FireHOL config for easy maintenance.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">srv1</span>=<span style="color: #D14;">&quot;205.205.205.1&quot;</span>
<span style="color: #007800;">srv2</span>=<span style="color: #D14;">&quot;srv2.example.com&quot;</span>
<span style="color: #007800;">srv3</span>=<span style="color: #D14;">&quot;143.32.2.44&quot;</span></pre></div></div>

<p>Now lets see what the SSH allow declaration will look like using these variables on interface eth0:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">interface eth0 public
  policy reject
  server <span style="color: #c20cb9; font-weight: bold;">ssh</span> accept src <span style="color: #007800;">$srv1</span>
  server <span style="color: #c20cb9; font-weight: bold;">ssh</span> accept src <span style="color: #007800;">$srv2</span>
  server <span style="color: #c20cb9; font-weight: bold;">ssh</span> accept src <span style="color: #007800;">$srv3</span></pre></div></div>

<p>Notice how each host you want to allow SSH access adds another line to your configuration. This may seem trivial in my example but can add a lot of complexity as your environment grows. Is there a better way to implement? You bet.</p>
<p>First, lets create an array to house all of the hosts we want to provide SSH access to:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">ssh_list</span>=<span style="color: #000;">&#40;</span><span style="color: #007800;">$srv1</span> <span style="color: #007800;">$srv2</span> <span style="color: #007800;">$srv3</span><span style="color: #000;">&#41;</span></pre></div></div>

<p>Next, we change the declaration on our interface to simply loop through this list of hosts and allow SSH access:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">interface eth0 public
  policy reject
  <span style="color: #000; font-weight: bold;">for</span> host <span style="color: #000; font-weight: bold;">in</span> <span style="color: #6F6F6F;">${ssh_list[@]}</span>; <span style="color: #000; font-weight: bold;">do</span>
    server <span style="color: #c20cb9; font-weight: bold;">ssh</span> accept <span style="color: #007800;">$host</span>
  <span style="color: #000; font-weight: bold;">done</span></pre></div></div>

<p>Much better! Now we can simply add/remove hosts from our ssh_list array (at the top of the config file where all our variables are declared) and let BASH do the rest. The key here is the ${ssh_list[@]} which returns the evaluated list of hosts inside the ssh_list array. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/02/bash-array-and-loops-in-firehol-configuratio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Article on Aptitude vs Apt-Get</title>
		<link>http://blog.jerodsanto.net/2009/02/great-article-on-aptitude-vs-apt-get/</link>
		<comments>http://blog.jerodsanto.net/2009/02/great-article-on-aptitude-vs-apt-get/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:42:50 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[aptitude]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=156</guid>
		<description><![CDATA[If you need some convincing to start using aptitude for all your Debian/Ubuntu software management needs, Aaron Toponce&#8217;s article will do the job. It&#8217;s a few years old (at the time of this post) but still relevant. Don&#8217;t take my word for it. Read it for yourself.]]></description>
			<content:encoded><![CDATA[<p>If you need some convincing to start using aptitude for all your Debian/Ubuntu software management needs, Aaron Toponce&#8217;s article will do the job. It&#8217;s a few years old (at the time of this post) but still relevant.</p>
<p>Don&#8217;t take my word for it. <a href="http://pthree.org/2007/08/12/aptitude-vs-apt-get/">Read it for yourself.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/02/great-article-on-aptitude-vs-apt-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian 5.0 (Lenny) Released</title>
		<link>http://blog.jerodsanto.net/2009/02/debian-50-lenny-released/</link>
		<comments>http://blog.jerodsanto.net/2009/02/debian-50-lenny-released/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 13:28:55 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[upgrades]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=154</guid>
		<description><![CDATA[Its been almost 2 years since Debian 4.0 (Etch) was first released. Debian release cycles are so long (because of their commitment to stable releases, amongst other reasons) that they often fly off my radar. I was completely surprised by this release, and almost every software package in my favorite server operating system has been [...]]]></description>
			<content:encoded><![CDATA[<p>Its been almost 2 years since Debian 4.0 (Etch) was first released. Debian release cycles are so long (because of their commitment to stable releases, amongst other reasons) that they often fly off my radar.</p>
<p>I was completely surprised by this release, and almost every software package in my favorite server operating system has been upgraded!</p>
<p>Check out the <a href="http://lists.debian.org/debian-announce/2009/msg00002.html">Release announcement</a>. The list of <a href="http://wiki.debian.org/NewInLenny">new packages</a>. And the <a href="http://www.debian-administration.org/articles/626">Debian Administration</a> post which includes instructions on how to upgrade</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/02/debian-50-lenny-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fix your Debian VMware image&#8217;s network after offline copy</title>
		<link>http://blog.jerodsanto.net/2008/09/fix-your-debian-vmware-image-s-network-after-offline-copy/</link>
		<comments>http://blog.jerodsanto.net/2008/09/fix-your-debian-vmware-image-s-network-after-offline-copy/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 21:47:00 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://0/2008/09/17/fix-your-debian-vmware-image-s-network-after-offline-copy</guid>
		<description><![CDATA[If you copy and move a VMware virtual machine that runs Debian, you&#8217;ll find that the network adapter is no longer available, which sucks. I implemented a simple fix using Ruby. Just make it start at boot by adding it to your /etc/rc.local and it should be all good. NOTICE: automatically reboots machine # 2&#62;&#38;1 [...]]]></description>
			<content:encoded><![CDATA[<p>If you copy and move a VMware virtual machine that runs Debian, you&#8217;ll find that the network adapter is no longer available, which sucks.</p>
<p>I implemented a simple fix using Ruby. Just make it start at boot by adding it to your <strong>/etc/rc.local</strong> and it should be all good.</p>
<p><strong>NOTICE:</strong> automatically reboots machine</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color: #6F6F6F;"># 2&gt;&amp;1 redirects stderr to stdout so we can capture it</span>
if_status = <span style="color: #D14;">`ifconfig eth0 2&gt;&amp;1`</span>
config_file = <span style="color: #D14;">&quot;/etc/udev/rules.d/z25_persistent-net.rules&quot;</span>
&nbsp;
<span style="color: #000; font-weight: bold;">if</span> if_status =~ <span style="color: #000;">/</span>Device <span style="color: #000; font-weight: bold;">not</span> found<span style="color: #000;">/</span>
  config_text = <span style="color: #0086B3;">Array</span>.<span style="color: #0086B3;">new</span>
  <span style="color: #009926;">File</span>.<span style="color: #0086B3;">open</span><span style="color: #000;">&#40;</span>config_file,<span style="color: #D14;">&quot;r&quot;</span><span style="color: #000;">&#41;</span> <span style="color: #000;">&#123;</span> <span style="color: #000;">|</span>file<span style="color: #000;">|</span> config_text = file.<span style="color: #0086B3;">readlines</span> <span style="color: #000;">&#125;</span>
  relevant_text = config_text.<span style="color: #0086B3;">select</span> <span style="color: #000;">&#123;</span> <span style="color: #000;">|</span>line<span style="color: #000;">|</span> line =~ <span style="color: #000;">/</span>^SUBSYSTEM==<span style="color: #000;">/</span> <span style="color: #000;">&#125;</span>
  output = relevant_text.<span style="color: #0086B3;">last</span>.<span style="color: #0086B3;">gsub</span><span style="color: #000;">&#40;</span><span style="color: #000;">/</span>ethd<span style="color: #000;">/</span>,<span style="color: #D14;">&quot;eth0&quot;</span><span style="color: #000;">&#41;</span>
  <span style="color: #009926;">File</span>.<span style="color: #0086B3;">open</span><span style="color: #000;">&#40;</span>config_file,<span style="color: #D14;">&quot;w&quot;</span><span style="color: #000;">&#41;</span><span style="color: #000;">&#123;</span> <span style="color: #000;">|</span>file<span style="color: #000;">|</span> file.<span style="color: #0086B3;">puts</span> output <span style="color: #000;">&#125;</span>
  <span style="color: #0086B3;">system</span><span style="color: #000;">&#40;</span><span style="color: #D14;">&quot;reboot&quot;</span><span style="color: #000;">&#41;</span>
<span style="color: #000; font-weight: bold;">end</span></pre></div></div>

<p><a href="http://jerodsanto.net/src/ruby/vm_mac_fixer.rb">Download</a> and use it if you&#8217;d like.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2008/09/fix-your-debian-vmware-image-s-network-after-offline-copy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting Asterisk on Boot in Debian</title>
		<link>http://blog.jerodsanto.net/2008/09/starting-asterisk-on-boot-in-debian/</link>
		<comments>http://blog.jerodsanto.net/2008/09/starting-asterisk-on-boot-in-debian/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 07:58:00 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[asterisk]]></category>

		<guid isPermaLink="false">http://0/2008/09/03/starting-asterisk-on-boot-in-debian</guid>
		<description><![CDATA[Here&#8217;s a quickie. You just compiled Asterisk on your Debian server and you want to make sure it starts when you reboot. Here&#8217;s how: Look in the /contrib/init.d folder of your Asterisk source directory. You&#8217;ll see a file called rc.debian.asterisk. If you installed Asterisk to the default location, don&#8217;t worry about editing this file. If [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quickie. You just compiled <a href="http://asterisk.org/">Asterisk</a> on your <a href="http://debian.org/">Debian</a> server and you want to make sure it starts when you reboot. Here&#8217;s how:</p>
<p>Look in the <code>/contrib/init.d</code> folder of your Asterisk source directory. You&#8217;ll see a file called <code>rc.debian.asterisk</code>. If you installed Asterisk to the default location, don&#8217;t worry about editing this file. If you installed to a different location (eg &#8211; /usr/local), change the following line in the file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000;">/</span>usr<span style="color: #000;">/</span>sbin<span style="color: #000;">/</span>asterisk</pre></div></div>

<p>Point this at your Asterisk binary. Not sure where it is? Just type <code>which asterisk</code> from the command line and it will show you the full path.</p>
<p>Next, copy the file into the <code>/etc/init.d/</code> directory like so:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> rc.debian.asterisk <span style="color: #000;">/</span>etc<span style="color: #000;">/</span>init.d<span style="color: #000;">/</span>asterisk</pre></div></div>

<p>(NOTE: I am renaming the file on purpose)</p>
<p>Now you can control Asterisk by executing this script. Make sure it starts and stops before continuing:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000;">/</span>etc<span style="color: #000;">/</span>init.d<span style="color: #000;">/</span>asterisk start
Starting Asterisk PBX: asterisk.
<span style="color: #000;">/</span>etc<span style="color: #000;">/</span>init.d<span style="color: #000;">/</span>asterisk stop
Stopping Asterisk PBX: asterisk.</pre></div></div>

<p>Finally, make the system run this script during the boot process:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">update-rc.d asterisk defaults</pre></div></div>

<p>Done and done. Reboot and check the process list just to be sure!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2008/09/starting-asterisk-on-boot-in-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure Network Time Protocol (NTP) in Debian</title>
		<link>http://blog.jerodsanto.net/2008/08/configure-network-time-protocol-ntp-in-debian/</link>
		<comments>http://blog.jerodsanto.net/2008/08/configure-network-time-protocol-ntp-in-debian/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 23:03:00 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[ntp]]></category>

		<guid isPermaLink="false">http://0/2008/08/27/configure-network-time-protocol-ntp-in-debian</guid>
		<description><![CDATA[Ok, this bugs the crap out of me. I set up a shiny new Debian 4.0 base install and go on my merry way, meanwhile the system time is off by a long shot! I only notice when it starts to hurt&#8230; Here&#8217;s how to synchronize your Debian system&#8217;s time with network time servers, in [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, this bugs the crap out of me. I set up a shiny new Debian 4.0 base install and go on my merry way, meanwhile the system time is off by a long shot! I only notice when it starts to hurt&#8230;</p>
<p>Here&#8217;s how to synchronize your Debian system&#8217;s time with network time servers, in a few simple steps (use sudo as needed):</p>
<p>1) Install the necessary packages:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ntp ntpdate</pre></div></div>

<p>2) Stop the NTP daemon for now (apt-get will start the service upon successful installation):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000;">/</span>etc<span style="color: #000;">/</span>init.d<span style="color: #000;">/</span>ntp stop</pre></div></div>

<p>3) Manually synchronize the system clock to the NTP server pool:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ntpdate pool.ntp.org</pre></div></div>

<p>3.5) An explanation: the NTP server daemon will fail to sync with the NTP servers if the system time is too far from the NTP servers time so its best to manually synchronize once to get your system time close enough.</p>
<p>4) Restart the NTP daemon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000;">/</span>etc<span style="color: #000;">/</span>init.d<span style="color: #000;">/</span>ntp start</pre></div></div>

<p>5) (Optionally) Verify that the NTP daemon is synchronized by checking the syslog:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">grep</span> ntpd <span style="color: #000;">/</span>var<span style="color: #000;">/</span>log<span style="color: #000;">/</span>syslog <span style="color: #000;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span>
ntpd<span style="color: #000;">&#91;</span><span style="color: #000000;">6348</span><span style="color: #000;">&#93;</span>: synchronized to 74.53.198.146, stratum <span style="color: #000000;">2</span>
ntpd<span style="color: #000;">&#91;</span><span style="color: #000000;">6348</span><span style="color: #000;">&#93;</span>: kernel <span style="color: #000; font-weight: bold;">time</span> <span style="color: #c20cb9; font-weight: bold;">sync</span> enabled 0001
ntpd<span style="color: #000;">&#91;</span><span style="color: #000000;">6348</span><span style="color: #000;">&#93;</span>: synchronized to 128.10.19.24, stratum <span style="color: #000000;">1</span></pre></div></div>

<p>Your output may vary, but it should look similar to mine.</p>
<p>That&#8217;s all for now!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2008/08/configure-network-time-protocol-ntp-in-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
