<?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>Racker Hacker</title>
	<atom:link href="http://rackerhacker.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Mon, 29 Jun 2009 18:47:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rotating rails logs when using Phusion Passenger</title>
		<link>http://rackerhacker.com/2009/06/26/rotating-rails-logs-when-using-phusion-passenger/</link>
		<comments>http://rackerhacker.com/2009/06/26/rotating-rails-logs-when-using-phusion-passenger/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 15:09:54 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[logrotate]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=944</guid>
		<description><![CDATA[I found a great post on Overstimulate about handling the rotation of rails logs when you use Phusion Passenger.  Most of the data for your application should end up in the apache logs, but if your site is highly dynamic, you may end up with a giant production log if you&#8217;re not careful.
Toss this [...]]]></description>
			<content:encoded><![CDATA[<p>I found a <a href="http://overstimulate.com/articles/logrotate-rails-passenger">great post</a> on <a href="http://overstimulate.com/">Overstimulate</a> about handling the rotation of rails logs when you use Phusion Passenger.  Most of the data for your application should end up in the apache logs, but if your site is highly dynamic, you may end up with a giant production log if you&#8217;re not careful.</p>
<p>Toss this into /etc/logrotate.d/yourrailsapplication:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/var/www/yourrailsapp/log/*.log {
  daily
  missingok
  rotate 30
  compress
  delaycompress
  sharedscripts
  postrotate
    touch /var/www/yourrailsapp/tmp/restart.txt
  endscript
}</pre></div></div>

<p>For a detailed explanation, <a href="http://overstimulate.com/articles/logrotate-rails-passenger">see the post</a> on <a href="http://overstimulate.com/">Overstimulate</a>.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/06/26/rotating-rails-logs-when-using-phusion-passenger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting all e-mail messages in your inbox with mutt</title>
		<link>http://rackerhacker.com/2009/06/19/deleting-all-e-mail-messages-in-your-inbox-with-mutt/</link>
		<comments>http://rackerhacker.com/2009/06/19/deleting-all-e-mail-messages-in-your-inbox-with-mutt/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 17:37:58 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mutt]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=934</guid>
		<description><![CDATA[Occasionally, I&#8217;ll end up with a mailbox full of random data, alerts, or other useless things.  If you have SSH access to the server, you can always clear out your mail spool, but if you connect to an IMAP server, you can use mutt to do the same thing.
First, use mutt to connect to [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally, I&#8217;ll end up with a mailbox full of random data, alerts, or other useless things.  If you have SSH access to the server, you can always clear out your mail spool, but if you connect to an IMAP server, you can use mutt to do the same thing.</p>
<p>First, use mutt to connect to your server remotely (via IMAP over SSL in this example):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mutt -f imaps://mail.yourdomain.com/</pre></div></div>

<p>Once you&#8217;ve connected and logged in, press <strong>SHIFT-D</strong> (uppercase d).  The status bar of mutt should show:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Delete messages matching:</pre></div></div>

<p>Type in <code>~s .*</code> so that the line looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Delete messages matching: ~s .*</pre></div></div>

<p>When you press enter, mutt will put a <strong>D</strong> next to all of the messages, which marks them for deletion.  Press <code>q</code> to quit, and then <code>y</code> to confirm the deletion.  After a brief moment, all of those messages will be deleted and mutt will exit.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/06/19/deleting-all-e-mail-messages-in-your-inbox-with-mutt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Two great signals: SIGSTOP and SIGCONT</title>
		<link>http://rackerhacker.com/2009/06/15/two-great-signals-sigstop-and-sigcont/</link>
		<comments>http://rackerhacker.com/2009/06/15/two-great-signals-sigstop-and-sigcont/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 18:16:19 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[processes]]></category>
		<category><![CDATA[sigcont]]></category>
		<category><![CDATA[signals]]></category>
		<category><![CDATA[sigstop]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=920</guid>
		<description><![CDATA[The best uses I&#8217;ve found for the SIGSTOP and SIGCONT signals are times when a process goes haywire, or when a script spawns too many processes at once.
You can issue the signals like this:

kill -SIGSTOP [pid]
kill -SIGCONT [pid]

Wikipedia has great definitions for SIGSTOP:
When SIGSTOP is sent to a process, the usual behaviour is to pause [...]]]></description>
			<content:encoded><![CDATA[<p>The best uses I&#8217;ve found for the SIGSTOP and SIGCONT signals are times when a process goes haywire, or when a script spawns too many processes at once.</p>
<p>You can issue the signals like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">kill -SIGSTOP [pid]
kill -SIGCONT [pid]</pre></div></div>

<p>Wikipedia has great definitions for <a href="http://en.wikipedia.org/wiki/SIGSTOP">SIGSTOP</a>:</p>
<blockquote><p>When SIGSTOP is sent to a process, the usual behaviour is to pause that process in its current state. The process will only resume execution if it is sent the SIGCONT signal. SIGSTOP and SIGCONT are used for job control in the Unix shell, among other purposes. SIGSTOP cannot be caught or ignored.</p></blockquote>
<p>and <a href="http://en.wikipedia.org/wiki/SIGCONT">SIGCONT</a>:</p>
<blockquote><p>When SIGSTOP or SIGTSTP is sent to a process, the usual behaviour is to pause that process in its current state. The process will only resume execution if it is sent the SIGCONT signal. SIGSTOP and SIGCONT are used for job control in the Unix shell, among other purposes.</p></blockquote>
<p>In short, SIGSTOP tells a process to &#8220;hold on&#8221; and SIGCONT tells a process to &#8220;pick up where you left off&#8221;.  This can work really well for rsync jobs since you can pause the job, clear up some space on the destination device, and then resume the job.  The source rsync process just thinks that the destination rsync process is taking a long time to respond.</p>
<p>In the <code>ps</code> output, stopped processes will have a status containing <em>T</em>.  Here&#8217;s an example with <code>crond</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># kill -SIGSTOP `pgrep crond`
# ps aufx | grep crond
root      3499  0.0  0.0 100328  1236 ?        Ts   Jun11   0:01 crond
# kill -SIGCONT `pgrep crond`
# ps aufx | grep crond
root      3499  0.0  0.0 100328  1236 ?        Ss   Jun11   0:01 crond</pre></div></div>

<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/06/15/two-great-signals-sigstop-and-sigcont/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ugly upgrade path from Wordpress 2.7.1 to 2.8</title>
		<link>http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/</link>
		<comments>http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 17:48:15 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=909</guid>
		<description><![CDATA[When I tried to do an automatic upgrade from Wordpress 2.7.1 to 2.8 yesterday, it failed miserably.  The files were all put in place, but when I tried to load /wp-admin/upgrade.php, this error popped up:

Fatal error: Call to undefined method wpdb::has_cap() in 
/path/to/wordpress/wp-admin/includes/schema.php on line 22

I was perplexed at the error, so I restored [...]]]></description>
			<content:encoded><![CDATA[<p>When I tried to do an automatic upgrade from Wordpress 2.7.1 to 2.8 yesterday, it failed miserably.  The files were all put in place, but when I tried to load <code>/wp-admin/upgrade.php</code>, this error popped up:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Fatal error: Call to undefined method wpdb::has_cap() in 
/path/to/wordpress/wp-admin/includes/schema.php on line 22</pre></div></div>

<p>I was perplexed at the error, so I restored from a backup and began <a href="http://codex.wordpress.org/Upgrading_WordPress">upgrading manually</a>.  The manual upgrades have always worked well for me in the past, so I figured this would probably fix the problem.  After the upgrade, I went to <code>/wp-admin/upgrade.php</code> and saw:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Fatal error: Call to undefined method wpdb::has_cap() in 
/path/to/wordpress/wp-admin/includes/schema.php on line 22</pre></div></div>

<p><strong>What the heck is going on?</strong>  I restored from a backup, tried the manual upgrade again, and it still failed.  I took a look at the lines causing the problem in <code>schema.php</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">has_cap</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'collation'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">charset</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;DEFAULT CHARACTER SET <span style="color: #006699; font-weight: bold;">$wpdb-&gt;charset</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">collate</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; COLLATE <span style="color: #006699; font-weight: bold;">$wpdb-&gt;collate</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I figured I could comment out the if statement and probably still be safe:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// if ( $wpdb-&gt;has_cap( 'collation' ) ) {</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">charset</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;DEFAULT CHARACTER SET <span style="color: #006699; font-weight: bold;">$wpdb-&gt;charset</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">collate</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; COLLATE <span style="color: #006699; font-weight: bold;">$wpdb-&gt;collate</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// }</span></pre></div></div>

<p><strong>Success?</strong>  I could make it through the <code>upgrade.php</code> part fine at this point, but whenever I tried to add a tag to a post, it wasn&#8217;t saving to the database.  I caught this error in my apache logs:</p>
<p><code>[Fri Jun 12 23:45:03 2009] [error] [client 72.183.200.144] WordPress database error Duplicate entry 'debian' for key 'slug' for query INSERT INTO wp_terms (`name`,`slug`,`term_group`) VALUES ('debian','debian','0') made by wp_insert_term, referer: http://rackerhacker.com/wp-admin/post.php?action=edit&#038;post=877</code></p>
<p><strong>Frustration quickly ensued.</strong>  I moved my <code>/wp-content/</code> folder out of the way and replaced it with the standard Wordpress stuff, but that didn&#8217;t help.  I moved plugins out of the way, one by one, but that didn&#8217;t fix it either.  Then I spotted a strange file sitting in <code>/wp-content/</code> called <code>db.php</code>.  When I opened it, I found a <a href="http://pastie.org/private/rmbmk3ohgmdbujotnrg">lot of database setup classes for mysqli</a>.</p>
<p>I renamed it to <code>db.pleasedonteverrunthisphp</code> and I was able to save tags properly.  So far, I haven&#8217;t found any issues after I made chat change.</p>
<p>Does anyone know where that file might have come from?  I don&#8217;t remember adding it myself, so I&#8217;m wondering if it was ever packaged with a Wordpress plugin or a Wordpress installation.  I hope this helps someone else!</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Upgrading from Fedora 10 (Cambridge) to Fedora 11 (Leonidas)</title>
		<link>http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/</link>
		<comments>http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 17:48:39 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=894</guid>
		<description><![CDATA[There are two main ways to upgrade Fedora 10 (Cambridge) to Fedora 11 (Leonidas):
&#187; What the Fedora developers suggest:

yum -y upgrade
yum -y install preupgrade
yum clean all
preupgrade-cli &#34;Fedora 11 (Leonidas)&#34;

Of course, if you&#8217;re doing this on a Fedora desktop, you can use preupgrade (rather than preupgrade-cli) to upgrade with a GUI.
&#187; The method I prefer (and [...]]]></description>
			<content:encoded><![CDATA[<p>There are two main ways to upgrade Fedora 10 (Cambridge) to Fedora 11 (Leonidas):</p>
<p><strong>&raquo; What the Fedora developers suggest:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade
yum -y install preupgrade
yum clean all
preupgrade-cli &quot;Fedora 11 (Leonidas)&quot;</pre></div></div>

<p>Of course, if you&#8217;re doing this on a Fedora desktop, you can use <code>preupgrade</code> (rather than <em>preupgrade-cli</em>) to upgrade with a GUI.</p>
<p><strong>&raquo; The method I prefer (and it works properly on <a href="http://slicehost.com/">Slicehost</a>):</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade
yum clean all
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/Packages/fedora-release-11-1.noarch.rpm</pre></div></div>

<p>At this point, you would normally just start upgrading packages, but the Fedora developers threw us a curveball.  Since yum in Fedora 10 doesn&#8217;t support metalinks, your upgrades will fail with something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># yum -y upgrade
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. /
removing mirrorlist with no valid mirrors: //var/cache/yum/updates/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates. Please verify its path and try again</pre></div></div>

<p>It&#8217;s easily fixed, however.  Open up <code>/etc/yum.repos.d/fedora.repo</code> and <code>/etc/yum.repos.d/fedora-updates.repo</code> in your favorite text editor and change the <code>mirrorlist</code> URL&#8217;s like so:</p>
<p><strong>Fedora Repository</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&amp;arch=$basearch
mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&amp;arch=$basearch</pre></div></div>

<p><strong>Fedora Updates Repository</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&amp;arch=$basearch
mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&amp;arch=$basearch</pre></div></div>

<p>Once you make those changes, finish out the upgrade:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade</pre></div></div>

<p>This process will take a little while to complete, but there shouldn&#8217;t be any interaction required.  Once it&#8217;s done, change the <code>mirrorlist</code> lines back to the original values so you can benefit from the speedups provided by the metalink format.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Simple SOCKS proxy using SSH</title>
		<link>http://rackerhacker.com/2009/05/26/simple-socks-proxy-using-ssh/</link>
		<comments>http://rackerhacker.com/2009/05/26/simple-socks-proxy-using-ssh/#comments</comments>
		<pubDate>Tue, 26 May 2009 19:29:55 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=880</guid>
		<description><![CDATA[Sometimes we find ourselves in places where we don&#8217;t trust the network that we&#8217;re using.  I&#8217;ve found myself in quite a few situations where I know my data is being encrypted, but I want an additional layer of protection.  Luckily, that protection is built into SSH if you&#8217;d like to use it.
Create a [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we find ourselves in places where we don&#8217;t trust the network that we&#8217;re using.  I&#8217;ve found myself in quite a few situations where I know my data is being encrypted, but I want an additional layer of protection.  Luckily, that protection is built into SSH if you&#8217;d like to use it.</p>
<p>Create a simple SOCKS proxy with SSH by using the <code>-D</code> flag:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ssh -D 2400 username@some.host.com</pre></div></div>

<p>That command will open up a SOCKS proxy on your workstation on port 2400.  If you configure your application to use the local SOCKS proxy, any traffic using the proxy will be sent through an encrypted SSH connection to your remote server and out to the internet. Inbound traffic through the proxy is encrypted through the same connection.</p>
<p>You can pair that with autossh to keep your proxy connected at all times:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">autossh -f -M 20000 -D 2400 username@some.host.com -N</pre></div></div>

<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/05/26/simple-socks-proxy-using-ssh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comparing MySQL result sets quickly</title>
		<link>http://rackerhacker.com/2009/05/05/comparing-mysql-result-sets-quickly/</link>
		<comments>http://rackerhacker.com/2009/05/05/comparing-mysql-result-sets-quickly/#comments</comments>
		<pubDate>Tue, 05 May 2009 15:51:09 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=829</guid>
		<description><![CDATA[I found a really helpful tip on Xaprb for comparing result sets in MySQL:

mysql&#62; pager md5sum -
PAGER set to 'md5sum -'
mysql&#62; select * from test;
a09bc56ac9aa0cbcc659c3d566c2c7e4  -
4096 rows in set (0.00 sec)

It&#8217;s a quick way to determine if you have two tables that are properly in sync.  Although there are better ways to compare [...]]]></description>
			<content:encoded><![CDATA[<p>I found a really helpful tip on <a href="http://www.xaprb.com/blog/2009/03/25/mysql-command-line-tip-compare-result-sets/">Xaprb</a> for comparing result sets in MySQL:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mysql&gt; pager md5sum -
PAGER set to 'md5sum -'
mysql&gt; select * from test;
a09bc56ac9aa0cbcc659c3d566c2c7e4  -
4096 rows in set (0.00 sec)</pre></div></div>

<p>It&#8217;s a quick way to determine if you have two tables that are properly in sync.  Although there are <a href="http://www.maatkit.org/doc/mk-table-checksum.html">better ways</a> to compare tables in replicated environments, this method can get it done pretty quickly.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/05/05/comparing-mysql-result-sets-quickly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Re-scan the SCSI bus in Linux after hot-swapping a drive</title>
		<link>http://rackerhacker.com/2009/04/23/re-scan-the-scsi-bus-in-linux-after-hot-swapping-a-drive/</link>
		<comments>http://rackerhacker.com/2009/04/23/re-scan-the-scsi-bus-in-linux-after-hot-swapping-a-drive/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 17:00:54 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[emergency]]></category>
		<category><![CDATA[hard disk]]></category>
		<category><![CDATA[scsi]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=832</guid>
		<description><![CDATA[Servers with hot swappable drive bays are always handy.  However, things can turn ugly if the SCSI controller doesn&#8217;t like a new drive when it is inserted.  You may end up with these errors in your dmesg output:

kernel: sdb : READ CAPACITY failed.
kernel: sdb : status=0, message=00, host=4, driver=00 
kernel: sdb : sense [...]]]></description>
			<content:encoded><![CDATA[<p>Servers with hot swappable drive bays are always handy.  However, things can turn ugly if the SCSI controller doesn&#8217;t like a new drive when it is inserted.  You may end up with these errors in your dmesg output:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">kernel: sdb : READ CAPACITY failed.
kernel: sdb : status=0, message=00, host=4, driver=00 
kernel: sdb : sense not available. 
kernel: sdb: Write Protect is off
kernel: sdb: Mode Sense: 00 00 00 00
kernel: sdb: asking for cache data failed
kernel: sdb: assuming drive cache: write through
kernel:  sdb:&amp;lt;6&gt;sd 1:0:0:0: SCSI error: return code = 0x00040000
kernel: end_request: I/O error, dev sdb, sector 0
kernel: Buffer I/O error on device sdb, logical block 0
kernel: sd 1:0:0:0: SCSI error: return code = 0x00040000
kernel: end_request: I/O error, dev sdb, sector 0
kernel: Buffer I/O error on device sdb, logical block 0
kernel: sd 1:0:0:0: SCSI error: return code = 0x00040000
kernel: end_request: I/O error, dev sdb, sector 0</pre></div></div>

<p>The errors show that the SCSI bus is having issues bringing the new drive online, and it won&#8217;t be seen by the OS until the SCSI controller is pleased.  You can force the controller to re-scan the drives attached to it, and this should correct the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">cd /sys/class/scsi_host/hostX
echo &quot;- - - &quot; &gt; scan</pre></div></div>

<p>Replace the <b>X</b> with the proper controller number of your SCSI controller.  If you&#8217;re not sure which controller is which, try running:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># cat /sys/class/scsi_host/host0/proc_name
sata_nv</pre></div></div>

<p><em>Credit for this find goes to Tony Dolan</em></p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/04/23/re-scan-the-scsi-bus-in-linux-after-hot-swapping-a-drive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Piping log files to a syslog server</title>
		<link>http://rackerhacker.com/2009/04/21/piping-log-files-to-a-syslog-server/</link>
		<comments>http://rackerhacker.com/2009/04/21/piping-log-files-to-a-syslog-server/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 22:59:21 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=843</guid>
		<description><![CDATA[If you have a centralized syslog server, or you use Splunk for log tracking, you may find the need to get older log files into a syslog port on that server.  
Edit: Using logger (as suggested by David and Jerry below) will give you a more reliable way to send the data to a [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a centralized syslog server, or you use Splunk for log tracking, you may find the need to get older log files into a syslog port on that server.  </p>
<p><strong>Edit:</strong> Using logger (as suggested by David and Jerry below) will give you a more reliable way to send the data to a syslog server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">cat some.log | logger -t UsefulLabel -h yoursyslogserver.com -p 514</pre></div></div>

<p>You&#8217;ll also be able to set a label for the text before it&#8217;s piped into the syslog server, which would be handy if you&#8217;re sorting or parsing the data later on.</p>
<p>Also, you can send your data in the raw using netcat:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">cat some.log | nc -w 1 -u yoursyslogserver.com 514</pre></div></div>

<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/04/21/piping-log-files-to-a-syslog-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHPMyAdmin 3.x hides the table indexes</title>
		<link>http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/</link>
		<comments>http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 00:51:48 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=835</guid>
		<description><![CDATA[Users of PHPMyAdmin 3.x may find that the table indexes are automatically hidden at the bottom of the page.  I find this to be a huge annoyance since table indexes are tremendously important to the structure of the table.
If you don&#8217;t want to downgrade to PHPMyAdmin 2.x, just add the following line to the [...]]]></description>
			<content:encoded><![CDATA[<p>Users of PHPMyAdmin 3.x may find that the table indexes are automatically hidden at the bottom of the page.  I find this to be a huge annoyance since table indexes are tremendously important to the structure of the table.</p>
<p>If you don&#8217;t want to downgrade to PHPMyAdmin 2.x, just add the following line to the top of your config.inc.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cfg</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'InitialSlidersState'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'open'</span><span style="color: #339933;">;</span></pre></div></div>

<p>This will cause the indexes to be displayed when you click <strong>Structure</strong> for a certain table.  By default, they are hidden.</p>
<p><em><strong>Sidenote:</strong> Some of you might be thinking: &#8220;Hey, you&#8217;re a DBA, you should know MySQL queries without needing PHPMyAdmin.&#8221;  You&#8217;re right.  I do know how to get the job done without PHPMyAdmin, but I enjoy the way PHPMyAdmin allows me to visualize my table structures.  Also, it&#8217;s a handy way to present data to others very quickly.</em></p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling VNC as a pseudo-KVM with VMWare Server</title>
		<link>http://rackerhacker.com/2009/03/24/enabling-vnc-as-a-pseudo-kvm-with-vmware-server/</link>
		<comments>http://rackerhacker.com/2009/03/24/enabling-vnc-as-a-pseudo-kvm-with-vmware-server/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 01:28:59 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=820</guid>
		<description><![CDATA[Mac users feel a little left out when it comes to VMWare Server clients.  There&#8217;s one for Windows and Linux, but Mac users are out of luck.  Sure, you can VNC into a Linux box, use X forwarding, or use RDC to access a Windows box, but a real Mac client would really [...]]]></description>
			<content:encoded><![CDATA[<p>Mac users <a href="http://communities.vmware.com/thread/155201">feel a little left</a> out when it comes to <a href="http://www.vmware.com/products/server/">VMWare Server</a> clients.  There&#8217;s one for Windows and Linux, but Mac users are out of luck.  Sure, you can VNC into a Linux box, use X forwarding, or use RDC to access a Windows box, but a real Mac client would really be helpful.</p>
<p>However, I stumbled upon some documentation that will allow you to VNC to a VMWare Server VM&#8217;s main screen.  It&#8217;s equivalent to having a network KVM connected to the VM so you can have out-of-band management.  With VMWare server 2.x, you can enable it by following these steps:</p>
<p><strong>Step 1.</strong> Create a new VM in VMWare Server, but <em>don&#8217;t start the VM</em>.  </p>
<p><strong>Step 2.</strong> SSH to the server and find your VM&#8217;s .vmx file.  Normally, you can find the file in a location like <code>/var/lib/vmware/[vmname]/[vmname].vmx</code>.</p>
<p><strong>Step 3.</strong> Add the following lines to the end of the .vmx file:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">RemoteDisplay.vnc.enabled = &quot;TRUE&quot;
RemoteDisplay.vnc.password = &quot;vncpassword&quot;
RemoteDisplay.vnc.port = &quot;5900&quot;</pre></div></div>

<p><strong>Step 4.</strong> Change the VNC port and password to values that suit your environment and then start the VM.  </p>
<p><strong>DUH!</strong> Don&#8217;t set two VM&#8217;s to use the same vnc port, but that should go without saying.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/03/24/enabling-vnc-as-a-pseudo-kvm-with-vmware-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compare the RPM packages installed on two different servers</title>
		<link>http://rackerhacker.com/2009/03/10/compare-the-rpm-packages-installed-on-two-different-servers/</link>
		<comments>http://rackerhacker.com/2009/03/10/compare-the-rpm-packages-installed-on-two-different-servers/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 23:31:49 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=688</guid>
		<description><![CDATA[Setting up new servers can be a pain if you&#8217;re not able to clone them from a server that is known to be working.  Many VPS providers, like Slicehost, allow you to clone a system to a new system.  Without that option, you can pull a list of RPM&#8217;s without their version number [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up new servers can be a pain if you&#8217;re not able to clone them from a server that is known to be working.  Many VPS providers, like <a href="http://slicehost.com/">Slicehost</a>, allow you to clone a system to a new system.  Without that option, you can pull a list of RPM&#8217;s without their version number for a fairly quick and basic comparison.</p>
<p>First, pull a list of RPM package by name only:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">rpm -qa --queryformat='%{NAME}\n' | sort &gt; server.txt</pre></div></div>

<p>Once you&#8217;ve done that on both servers, just use diff to compare the two files:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">diff serverold.txt servernew.txt</pre></div></div>

<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/03/10/compare-the-rpm-packages-installed-on-two-different-servers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Prevent gnome-keyring from asking for a password when NetworkManager starts</title>
		<link>http://rackerhacker.com/2009/02/26/prevent-gnome-keyring-from-asking-for-a-password-when-networkmanager-starts/</link>
		<comments>http://rackerhacker.com/2009/02/26/prevent-gnome-keyring-from-asking-for-a-password-when-networkmanager-starts/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 00:21:21 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[annoyances]]></category>
		<category><![CDATA[gnome-keyring]]></category>
		<category><![CDATA[networkmanager]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=806</guid>
		<description><![CDATA[I recently tossed Ubuntu 8.10 on my Mac Mini at home to use it as a home theater PC (with Boxee).  When I connected to my wireless network via NetworkManager, I entered my WPA2 passphrase, and then I was prompted to enter a password for gnome-keyring.  I went back to the couch, SSH&#8217;ed [...]]]></description>
			<content:encoded><![CDATA[<p>I recently tossed Ubuntu 8.10 on my Mac Mini at home to use it as a home theater PC (with <a href="http://boxee.tv/">Boxee</a>).  When I connected to my wireless network via NetworkManager, I entered my WPA2 passphrase, and then I was prompted to enter a password for gnome-keyring.  I went back to the couch, SSH&#8217;ed in, and continued configuring it remotely.  When it rebooted, it never came back online.</p>
<p>Once I switched the TV back over to the Mini, I saw that gnome-keyring had popped up and it was asking for my password.  I entered it, and the Mini joined the wireless network.  Each time I rebooted, I had to go through this procedure (which is annoying to do with a HTPC that is across the room).  I found a <a href="http://ubuntu-tutorials.com/2007/07/12/automatically-unlocking-the-default-gnome-keyring-pam-keyring/">pretty fancy solution</a>, but it looked a little complicated for my setup.</p>
<p>Here&#8217;s how I did it in a simpler way in Ubuntu 8.10:</p>
<ul>
<li>Click <strong>Applications</strong> > <strong>Accessories</strong> ><strong> Passwords and Encryption Keys</strong></li>
<li>Click <strong>Edit</strong> > <strong>Preferences</strong></li>
<li>Click your keyring name (usually <em>default</em>)</li>
<li>Click <strong>Change Unlock Password</strong></li>
<li>Enter your current password in the top box, but leave the bottom two boxes blank</li>
<li>Click <strong>OK</strong></li>
<li>Click <strong>Use unsafe storage</strong> when you are prompted</li>
<li>Click <strong>Close</strong>
</li>
</ul>
<p>If you reboot your machine, it should not ask for a password for your keyring any longer.  This allowed my system to log into my wireless network automatically.</p>
<p><strong>WHOA THERE:</strong> Since the only password being stored on the device is my WPA2 password, I&#8217;m not concerned about the security of the keyring.  If you&#8217;re doing this on a laptop or desktop that other people use, I would highly recommend not following these steps.  All of your passwords and keys will be stored unencrypted.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/26/prevent-gnome-keyring-from-asking-for-a-password-when-networkmanager-starts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A new customer service blog: dontbeafraidofcustomers.com</title>
		<link>http://rackerhacker.com/2009/02/24/a-new-customer-service-blog-dontbeafraidofcustomerscom/</link>
		<comments>http://rackerhacker.com/2009/02/24/a-new-customer-service-blog-dontbeafraidofcustomerscom/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 03:36:25 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=802</guid>
		<description><![CDATA[I&#8217;m striving to keep the topics of this blog as technical as possible since that what most readers keep asking for.  Tech talk is always something I enjoy, but one of my other big passions is customer service.  It may sound trite, but I&#8217;m actually genuine about it.
I started a new customer service [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m striving to keep the topics of this blog as technical as possible since that what most readers keep asking for.  Tech talk is always something I enjoy, but one of my other big passions is customer service.  It may sound trite, but I&#8217;m actually genuine about it.</p>
<p>I started a <a href="http://dontbeafraidofcustomers.com/">new customer service blog</a> with a different approach.  The blog will cover different situations where companies often make errors while handling customer service issues.</p>
<p>If you have suggestions for a post, please <a href="http://dontbeafraidofcustomers.com/contact/">let me know</a>!</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/24/a-new-customer-service-blog-dontbeafraidofcustomerscom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Boxcheck v2.0 is on the way</title>
		<link>http://rackerhacker.com/2009/02/24/boxcheck-v20-is-on-the-way/</link>
		<comments>http://rackerhacker.com/2009/02/24/boxcheck-v20-is-on-the-way/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 13:20:32 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[boxcheck]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=798</guid>
		<description><![CDATA[
I&#8217;ve been a bit slow on new posts lately for two main reasons.  First, I&#8217;ve been working hard with my new position at Slicehost, (I&#8217;m still with Rackspace).  Also, I&#8217;ve thrown out the old code for Boxcheck.com and I&#8217;m re-writing it from scratch.
Most of you probably know that the first version of Boxcheck [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boxcheck.com/"><img alt="" src="http://cdn.cloudfiles.mosso.com/c8031/boxchecknannerpus.jpg" title="Boxcheck Nannerpus" class="alignright" width="228" height="174" /></a></p>
<p>I&#8217;ve been a bit slow on new posts lately for two main reasons.  First, I&#8217;ve been working hard with my <a href="http://www.slicehost.com/articles/2009/2/23/it-s-getting-crowded-in-here">new position at Slicehost</a>, (<a href="http://www.slicehost.com/articles/2008/10/22/big-news-today">I&#8217;m still with Rackspace</a>).  Also, I&#8217;ve thrown out the old code for Boxcheck.com and I&#8217;m re-writing it from scratch.</p>
<p>Most of you probably know that the first version of Boxcheck threw out some odd errors for some tests and caused confusion for those that depended on the results.  The code is being overhauled to handle errors and special cases much more efficiently.  I&#8217;m implementing multiple technologies on the back-end to make the interface simpler and easier to use.  There may also be an API that folks can script against &#8211; but I haven&#8217;t gotten that far yet.</p>
<p>In short &#8211; thanks for all of your e-mails!  Boxcheck isn&#8217;t going away at all.  It&#8217;s going to be back soon!  If you have any questions or suggestions, feel free to give me a shout.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/24/boxcheck-v20-is-on-the-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade Debian etch to lenny</title>
		<link>http://rackerhacker.com/2009/02/18/upgrade-debian-etch-to-lenny/</link>
		<comments>http://rackerhacker.com/2009/02/18/upgrade-debian-etch-to-lenny/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 13:28:39 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=791</guid>
		<description><![CDATA[I&#8217;ve tested this Debian etch to lenny upgrade process a few times so far, and it seems to be working well.

sudo vim /etc/apt/sources.list     [change 'etch' -&#62; 'lenny']
sudo aptitude update
sudo aptitude install apt dpkg aptitude
sudo aptitude full-upgrade

&#169;2009 Racker Hacker. All Rights Reserved..]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tested this Debian etch to lenny upgrade process a few times so far, and it seems to be working well.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sudo vim /etc/apt/sources.list     [change 'etch' -&gt; 'lenny']
sudo aptitude update
sudo aptitude install apt dpkg aptitude
sudo aptitude full-upgrade</pre></div></div>

<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/18/upgrade-debian-etch-to-lenny/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Linux security advisory Twitter bots</title>
		<link>http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/</link>
		<comments>http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 17:00:03 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=762</guid>
		<description><![CDATA[Thanks to the simplicity of ruby as well as the twitter and httparty gems, I&#8217;ve whipped up some Twitter bots today.  The three bots will alert you when there are Red Hat, Ubuntu, or Debian security advisories.  I&#8217;d set one up for Fedora, but their feed is broken today.
@redhaterrata &#8211; Red Hat Errata [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to the simplicity of <a href="http://ruby-lang.org/">ruby</a> as well as the <a href="http://twitter.rubyforge.org/">twitter</a> and <a href="http://github.com/jnunemaker/httparty/tree/master">httparty</a> gems, I&#8217;ve whipped up some Twitter bots today.  The three bots will alert you when there are Red Hat, Ubuntu, or Debian security advisories.  I&#8217;d set one up for Fedora, but their feed is broken today.</p>
<p><strong><a href="http://twitter.com/redhaterrata/">@redhaterrata</a></strong> &#8211; Red Hat Errata Updates<br />
<strong><a href="http://twitter.com/ubuntusecurity/">@ubuntusecurity</a></strong> &#8211; Ubuntu Security Notifications<br />
<strong><a href="http://twitter.com/debiansecurity/">@debiansecurity</a></strong> &#8211; Debian Security Advisories</p>
<p>As always, you can <a href="http://twitter.com/rackerhacker/">let me know</a> if you have any suggestions for improvements, or other bots you&#8217;d like to see.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL performance flow chart</title>
		<link>http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/</link>
		<comments>http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 17:00:29 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=756</guid>
		<description><![CDATA[
As much as some people might disagree, optimizing MySQL isn&#8217;t rocket science.  There are some basic steps that every server administrator can follow to improve the performance of their MySQL server.  I&#8217;ve outlined these steps in the flow chart included in this post.
While it won&#8217;t include all situations, it will give ideas to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cdn.cloudfiles.mosso.com/c8031/improvingmysqlperformance.pdf"><img alt="" src="http://cdn.cloudfiles.mosso.com/c8031/improvingmysqlperformance.jpg" title="Improving MySQL Performance flow chart" class="alignright" width="306" height="240" /></a><br />
As much as some people might disagree, optimizing MySQL isn&#8217;t rocket science.  There are some basic steps that every server administrator can follow to improve the performance of their MySQL server.  I&#8217;ve outlined these steps in the flow chart included in this post.</p>
<p>While it won&#8217;t include all situations, it will give ideas to those who are just starting down the path of MySQL optimization.  If you find any corrections or if you have suggestions for improvements, please let me know!</p>
<p><strong>UPDATE:</strong> I&#8217;ve received a lot of positive feedback via twitter and e-mail about the flow chart idea.  I&#8217;ll try to work on some more charts soon and get them onto the site.  Let me know if there are specific topics that you&#8217;re interested in.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: emergency reboot or shutdown with magic commands</title>
		<link>http://rackerhacker.com/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/</link>
		<comments>http://rackerhacker.com/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 02:07:06 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[emergency]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysctl]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=727</guid>
		<description><![CDATA[Most linux distributions use some type of mechanism to gracefully stop daemons and unmount storage volumes during a reboot or shutdown.  It&#8217;s most commonly done via scripts that will wait for each daemon to shut down gracefully before proceeding to the next daemon.
As we know, sometimes servers misbehave due to things put them through, [...]]]></description>
			<content:encoded><![CDATA[<p>Most linux distributions use some type of mechanism to gracefully stop daemons and unmount storage volumes during a reboot or shutdown.  It&#8217;s most commonly done via scripts that will wait for each daemon to shut down gracefully before proceeding to the next daemon.</p>
<p>As we know, sometimes servers misbehave due to things put them through, and you can quickly end up in a situation where things are going badly.  I&#8217;m talking about the type of situation where you&#8217;re connected via SSH to a server that controls phone lines for five million people and it sits in a tiny building 400 miles away from the nearest human being.  We&#8217;re talking bad.  If you issue a plain <code>reboot</code> command, it might not even make it that far.  Once SSH stops running, you&#8217;re going to be out of luck.</p>
<p>If you find yourself in this situation (and I hope you won&#8217;t!), you have some options to get your way with a misbehaving server remotely.  You can force an immediate reboot with the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo 1 &gt; /proc/sys/kernel/sysrq 
echo b &gt; /proc/sysrq-trigger</pre></div></div>

<p><span style="color: #ff0000;"><strong>WHOA THERE!</strong></span> This is pretty much the same as pressing the reset button on the server (if equipped).  No daemons will be shut down gracefully, no filesystem sync will occur, and you may get the wrath of a fsck (or worse, a non-booting server) upon reboot.  To do things a little more carefully, read on.</p>
<p>These are called <a href="http://en.wikipedia.org/wiki/Magic_SysRq_key">magic commands</a>, and they&#8217;re pretty much synonymous with holding down Alt-SysRq and another key on older keyboards.  Dropping <code>1</code> into <code>/proc/sys/kernel/sysrq</code> tells the kernel that you want to enable SysRq access (it&#8217;s usually disabled).  The second command is equivalent to pressing Alt-SysRq-b on a QWERTY keyboard.</p>
<p>There&#8217;s a better way of rebooting a misbehaving server that <a href="http://en.wikipedia.org/wiki/Magic_SysRq_key#.22Raising_Elephants.22_mnemonic_device">Wikipedia shows</a> with the mnemonic &#8220;Reboot Even If System Utterly Broken&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">unRaw      (take control of keyboard back from X),  
 tErminate (send SIGTERM to all processes),
 kIll      (send SIGKILL to all processes), 
  Sync     (flush data to disk),
  Unmount  (remount all filesystems read-only),
reBoot.</pre></div></div>

<p>I can&#8217;t vouch for this actually working, but I&#8217;m interested to try it.  <strong>UPDATE:</strong> I&#8217;ve been told that doing this series of commands with ReiserFS is a very bad idea.</p>
<p>If you want to shut the machine down entirely (please think about it before using this on a remote system):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo 1 &gt; /proc/sys/kernel/sysrq 
echo o &gt; /proc/sysrq-trigger</pre></div></div>

<p>If you want to keep SysRq enabled all the time, you can do that with an entry in your server&#8217;s <code>sysctl.conf</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">kernel.sysrq = 1</pre></div></div>

<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linux: Adjust storage kernel module load order</title>
		<link>http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/</link>
		<comments>http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 20:40:01 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=717</guid>
		<description><![CDATA[I set up a system at home that has two SATA controllers: one is on the motherboard (nvidia chipset), while the other is on a Silicon Image SATA card that has three eSATA ports.  Here is the relevant lspci output:
root@storageserver:~# lspci &#124; grep ATA
00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
00:08.1 IDE [...]]]></description>
			<content:encoded><![CDATA[<p>I set up a system at home that has two SATA controllers: one is on the motherboard (nvidia chipset), while the other is on a Silicon Image SATA card that has three eSATA ports.  Here is the relevant <code>lspci</code> output:</p>
<pre>root@storageserver:~# lspci | grep ATA
00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
00:08.1 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
03:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)</pre>
<p>There are two primary drives connected to the onboard controller and four connected to the controller card.  One of the primary drives on the onboard controller contains the operating system (Ubuntu, in this case), while the other drive is blank.</p>
<p>When the system booted, the sata_sil24 driver for the add-on card always loaded before the sata_nv drivers for the onboard storage controller:</p>
<pre>kernel: [    4.125598] sata_sil24 0000:03:00.0: version 1.1
kernel: [    4.126102] sata_sil24 0000:03:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16
kernel: [    4.126161] sata_sil24 0000:03:00.0: setting latency timer to 64
kernel: [    4.129472] scsi0 : sata_sil24
kernel: [    4.129635] scsi1 : sata_sil24
kernel: [    8.293762] sata_nv 0000:00:08.0: version 3.5
kernel: [    8.293779] sata_nv 0000:00:08.0: PCI INT A -> Link[APSI] -> GSI 20 (level, low) -> IRQ 20
kernel: [    8.293829] sata_nv 0000:00:08.0: setting latency timer to 64
kernel: [    8.296764] scsi2 : sata_nv
kernel: [    8.296905] scsi3 : sata_nv
kernel: [    9.285034] sata_nv 0000:00:08.1: PCI INT B -> Link[APSJ] -> GSI 21 (level, low) -> IRQ 21
kernel: [    9.285074] sata_nv 0000:00:08.1: setting latency timer to 64
kernel: [    9.285161] scsi4 : sata_nv
kernel: [    9.286015] scsi5 : sata_nv</pre>
<p>After specifying an explicit order in /etc/modules and /etc/modprobe.conf, I wasn&#8217;t able to see any changes.  The sata_sil24 driver still loaded before the onboard sata_nv driver.  Luckily, a <a href="http://twitter.com/Twirrim">very wise person</a> on <a href="http://twitter.com/">Twitter</a> <a href="http://twitter.com/Twirrim/status/1148330615">gave me a strategy</a> that <a href="http://tinyurl.com/d53f6e">worked just fine</a>.</p>
<p>I added sata_sil24 to the bottom of my /etc/modprobe.d/blacklist file first.  Then, in /etc/modules, I listed sata_nv first, followed by sata_sil24.  When the system booted, I got the result that I wanted:</p>
<pre>kernel: [    3.982909] sata_nv 0000:00:08.0: version 3.5
kernel: [    3.982931] sata_nv 0000:00:08.0: PCI INT A -> Link[APSI] -> GSI 20 (level, low) -> IRQ 20
kernel: [    3.982993] sata_nv 0000:00:08.0: setting latency timer to 64
kernel: [    3.984497] scsi0 : sata_nv
kernel: [    3.986013] scsi1 : sata_nv
kernel: [    4.971755] sata_nv 0000:00:08.1: PCI INT B -> Link[APSJ] -> GSI 21 (level, low) -> IRQ 21
kernel: [    4.971799] sata_nv 0000:00:08.1: setting latency timer to 64
kernel: [    4.973153] scsi2 : sata_nv
kernel: [    4.974031] scsi3 : sata_nv
kernel: [   15.988862] sata_sil24 0000:03:00.0: version 1.1
kernel: [   15.989454] sata_sil24 0000:03:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16
kernel: [   15.989511] sata_sil24 0000:03:00.0: setting latency timer to 64
kernel: [   15.990201] scsi6 : sata_sil24
kernel: [   15.991523] scsi7 : sata_sil24</pre>
<p>The sata_nv driver is loading first, and Ubuntu boots off of it without an issue.  The sata_sil24 driver loads next so that the drives connected to the card show up lower in the boot order.</p>
<p><i>Many thanks to <a href="http://twitter.com/Twirrim">@Twirrim</a> on Twitter for the suggestion!</i></p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Writing a Ruby on Rails application without using a database</title>
		<link>http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/</link>
		<comments>http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 17:00:44 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=687</guid>
		<description><![CDATA[Some of you may be wondering &#8220;why would you want to use Rails without a database?&#8221;  There are several situations why a database would not be needed, and I&#8217;ve run into quite a few of them.  One of the specific cases was when I wanted to write a web interface for an application [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you may be wondering &#8220;why would you want to use Rails without a database?&#8221;  There are several situations why a database would not be needed, and I&#8217;ve run into quite a few of them.  One of the specific cases was when I wanted to write a web interface for an application that only had a REST interface available to the public.</p>
<p>If you find yourself needing to write a Rails application without a database, just do the following:</p>
<p><strong>For Rails 1.0 and up:</strong><br />
<code>config/environment.rb</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">config.<span style="color:#9900CC;">frameworks</span> <span style="color:#006600; font-weight:bold;">-</span>= <span style="color:#006600; font-weight:bold;">&#91;</span> <span style="color:#ff3333; font-weight:bold;">:active_record</span> <span style="color:#006600; font-weight:bold;">&#93;</span></pre></div></div>

<p><code>test/test_helper.rb</code></p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#6666ff; font-weight:bold;">Test::Unit::TestCase</span>
  <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">use_transactional_fixtures</span> = <span style="color:#0000FF; font-weight:bold;">false</span>
  <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">use_instantiated_fixtures</span>  = <span style="color:#0000FF; font-weight:bold;">false</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> load_fixtures
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p><strong>For Rails 2.1 and up:</strong> Comment out both of the lines that begin with  <code>ActiveRecord::Base</code> in <code>config/initializers/new_rails_defaults.rb</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">defined</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>ActiveRecord<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#008000; font-style:italic;"># Include Active Record class name as root for JSON serialized output.</span>
  <span style="color:#008000; font-style:italic;"># ActiveRecord::Base.include_root_in_json = true</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Store the full class name (including module namespace) in STI type column.</span>
  <span style="color:#008000; font-style:italic;"># ActiveRecord::Base.store_full_sti_class = true</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>For more details, review the <a href="http://wiki.rubyonrails.org/rails/pages/HowToUseRailsWithoutADatabase">full article</a> on <a href="http://rubyonrails.org">rubyonrails.org</a>.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Slicehost and setting up a LAMP stack</title>
		<link>http://rackerhacker.com/2009/01/08/getting-started-with-slicehost-and-setting-up-a-lamp-stack/</link>
		<comments>http://rackerhacker.com/2009/01/08/getting-started-with-slicehost-and-setting-up-a-lamp-stack/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 23:33:46 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[slicehost]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=700</guid>
		<description><![CDATA[
I&#8217;ve received a lot of questions lately about Slicehost and how the service works.  If you want to know more, check out the &#8220;Getting started with Slicehost&#8221; screencast that I&#8217;ve created.  It goes over the following steps:

Signing up for a Slicehost account
Provisioning a new slice
Features and functions of the Slicemanager
Setting up a LAMP [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/screencasts.php?file=getting_started_with_slicehost_20090108.mov"><img alt="" src="http://rackerhacker.com/wp-content/screencasts.php?file=getting_started_with_slicehost_20090108.jpg" title="Getting started with Slicehost" class="alignright" width="280" height="211" /></a></p>
<p>I&#8217;ve received a lot of questions lately about <a href="http://slicehost.com/">Slicehost</a> and how the service works.  If you want to know more, check out the <a href="http://rackerhacker.com/wp-content/screencasts.php?file=getting_started_with_slicehost_20090108.mov">&#8220;Getting started with Slicehost&#8221;</a> screencast that I&#8217;ve created.  It goes over the following steps:</p>
<ul>
<li>Signing up for a Slicehost account</li>
<li>Provisioning a new slice</li>
<li>Features and functions of the Slicemanager</li>
<li>Setting up a LAMP stack on your new slice</li>
</ul>
<p>The video is 53.2MB in size, and the total running time is 11 minutes and 39 seconds.  It&#8217;s in Quicktime format (H264 video with AAC audio), but it should play through <a href="http://www.videolan.org/vlc/">VLC</a> if you don&#8217;t have Quicktime installed.  It&#8217;s being served through <a href="http://www.mosso.com/cloudfiles.jsp">Cloud Files</a> via the <a href="http://limelight.com">Limelight CDN</a>.</p>
<p><a href="http://rackerhacker.com/wp-content/screencasts.php?file=getting_started_with_slicehost_20090108.mov">Download the screencast here (53.2MB).</a> (Right click and save to your computer for viewing later.)</p>
<p><em>The screencast was recorded with <a href="http://www.telestream.net/screen-flow/overview.htm">ScreenFlow</a> and the post processing was done in <a href="http://www.apple.com/ilife/imovie/">iMovie</a>.</em></p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/01/08/getting-started-with-slicehost-and-setting-up-a-lamp-stack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://rackerhacker.com/wp-content/screencasts.php?file=getting_started_with_slicehost_20090108.mov" length="55840965" type="video/quicktime" />
		</item>
		<item>
		<title>CPAN: Automatically install dependencies without confirmation</title>
		<link>http://rackerhacker.com/2009/01/01/cpan-automatically-install-dependencies-without-confirmation/</link>
		<comments>http://rackerhacker.com/2009/01/01/cpan-automatically-install-dependencies-without-confirmation/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 01:44:51 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=661</guid>
		<description><![CDATA[I enjoy using CPAN because it installs Perl modules with a simple interface, fetches dependencies, and warns you when things are about to end badly.  However, one of my biggest complaints is when it constantly confirms installing dependencies.  While this is an annoyance if you have to install a module with many dependencies [...]]]></description>
			<content:encoded><![CDATA[<p>I enjoy using <a href="http://www.cpan.org/">CPAN</a> because it installs Perl modules with a simple interface, fetches dependencies, and warns you when things are about to end badly.  However, one of my biggest complaints is when it constantly confirms installing dependencies.  While this is an annoyance if you have to install a module with many dependencies (or if you&#8217;re working with CPAN on a new server), you can tell CPAN to automatically confirm the installation of dependencies.</p>
<p>To do this, simply bring up a CPAN shell:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">perl -MCPAN -e shell</pre></div></div>

<p>Run these two commands in the CPAN shell:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">o conf prerequisites_policy follow
o conf commit</pre></div></div>

<p>Now, exit the CPAN shell, start the CPAN shell, and try to install a module that you need.  All dependencies will be automatically confirmed, downloaded and installed.</p>
<p>The first line sets your dependency policy to <em>follow</em> rather than <em>ask</em> (the default).  The second line tells CPAN to write the changes to your user&#8217;s CPAN configuration file to make them permanent.</p>
<p>A big thanks goes out to <a href="http://lee.hambley.name/about">Lee Hambley</a> for the <a href="http://lee.hambley.name/2008/05/cpan-automatically-accept-dependencies">fix</a>.</p>
<p><strong>WARNING:</strong> <em>There are some occasions where you would not want to install dependencies from CPAN.  Examples of these situations are when your operating system&#8217;s package manager (yum, up2date, apt-get, aptitude, etc) has installed Perl modules in an alternative location or when you have manually installed modules in a non-standard way.  I&#8217;m a Red Hat guy, and these problems rarely arise on Red Hat/Fedora systems, but your mileage may vary.</em></p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/01/01/cpan-automatically-install-dependencies-without-confirmation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Moved static content to Cloud Files</title>
		<link>http://rackerhacker.com/2008/12/30/moved-static-content-to-cloud-files/</link>
		<comments>http://rackerhacker.com/2008/12/30/moved-static-content-to-cloud-files/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 05:53:08 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[cloud files]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=655</guid>
		<description><![CDATA[I&#8217;ve moved all of this blog&#8217;s CSS, javascript, and most of the images to Rackspace&#8217;s Cloud Files so they can be served via the Limelight CDN.  So far, this has cut the load times in half.
Most of the edits aren&#8217;t supported by Wordpress, so I ventured into the source code for my plugins as [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve moved all of this blog&#8217;s CSS, javascript, and most of the images to Rackspace&#8217;s <a href="http://www.mosso.com/cloudfiles.jsp">Cloud Files</a> so they can be served via the <a href="http://www.limelightnetworks.com/">Limelight CDN</a>.  So far, this has <a href="http://cdn.cloudfiles.mosso.com/c8031/rackerhacker_static_content_cdn_psinet_london.png">cut the load times in half</a>.</p>
<p>Most of the edits aren&#8217;t supported by Wordpress, so I ventured into the source code for my plugins as well as my theme and adjusted the links to point to the mirrored files on the Cloud Files service.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/12/30/moved-static-content-to-cloud-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Upgraded to Wordpress 2.7</title>
		<link>http://rackerhacker.com/2008/12/25/upgraded-to-wordpress-27/</link>
		<comments>http://rackerhacker.com/2008/12/25/upgraded-to-wordpress-27/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 03:45:39 +0000</pubDate>
		<dc:creator>major</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=647</guid>
		<description><![CDATA[I&#8217;ve upgraded the blog successfully to Wordpress 2.7 (with a bit of frustration).  When I attempted the upgrade, I received this error:
Call to undefined method wpdb::has_cap() in schema.php on line 22
Even though I followed the instructions on the Wordpress site, and I disabled all of my plugins, the error kept appearing.  The only [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve upgraded the blog successfully to <a href="http://wordpress.org/">Wordpress 2.7</a> (with a bit of frustration).  When I attempted the upgrade, I received this error:</p>
<p><code>Call to undefined method wpdb::has_cap() in schema.php on line 22</code></p>
<p>Even though I followed the instructions on the Wordpress site, and I disabled all of my plugins, the error kept appearing.  The only parts of the site that remained unchanged after the upgrade were the <code>wp-config.php</code> page and the <code>wp-content</code> directory.  I merged the changes in wp-config.php, but the error was still present.</p>
<p>In frustration, I renamed the wp-content directory to a temporary name and uploaded the <code>wp-content</code> provided from the Wordpress tarball.  The upgrade completed without a problem!  I deleted the new <code>wp-content</code> directory, put the old <code>wp-content</code> directory back in place, and Wordpress sprang to life!</p>
<p>It&#8217;s certainly possible that a Wordpress plugin blocked the upgrade process even though it was disabled in the database.</p>
<p>&copy;2009 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/12/25/upgraded-to-wordpress-27/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.300 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2009-07-03 20:09:03 -->
