<?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"
	>

<channel>
	<title>sudo make me a sandwich</title>
	<atom:link href="http://little.bluethings.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://little.bluethings.net</link>
	<description>Just another geek blog.</description>
	<pubDate>Mon, 21 Jul 2008 20:22:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Making your own iPhone ringtones in under 10 steps</title>
		<link>http://little.bluethings.net/2008/07/14/making-your-own-iphone-ringtones/</link>
		<comments>http://little.bluethings.net/2008/07/14/making-your-own-iphone-ringtones/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 16:59:24 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Software]]></category>

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

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

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

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

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

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

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

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

		<guid isPermaLink="false">http://little.bluethings.net/?p=34</guid>
		<description><![CDATA[Story so far: I went and stood in line on the morning of July 12th at 0850. There were some 30 and odd people ahead of me. I was able to get into the store at 1231 and I walked out with my very own 8gb black iPhone at 1252. I love this thing. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Story so far: I went and stood in line on the morning of July 12th at 0850. There were some 30 and odd people ahead of me. I was able to get into the store at 1231 and I walked out with my very own 8gb black iPhone at 1252. I love this thing. It&#8217;s super nice, but Steve Jobs requires that I purchase ring tones for 99 cents off of iTunes to be able to use them with my phone.</p>
<p>I have several problems with this business model:<br />
1. I own my music, I own my iPhone, and I&#8217;m not paying anyone anything to give me a 30 second clip of my music.<br />
2. Especially considering *I* don&#8217;t get to choose which 30 seconds of the song I want as my ring tone.<br />
3. See 1 and 2 above.<span id="more-34"></span></p>
<p>So here&#8217;s how you beat the system.</p>
<p>1. Find the song you want.<br />
2. Right-click song, click <strong>Get Info</strong><br />
3. Switch to the <strong>Options</strong> tab<br />
4. Set a <strong>Start Time</strong> and <strong>Stop Time</strong>. This must be <u>no greater than 30 seconds</u>. For the purpose of this example, let&#8217;s pretend you want the first 30 seconds of the song. So you&#8217;d set the start time to <u>0:00</u> and the stop time to <u>0:30</u>. Click OK to get back to the main window.<br />
5. Right-click the song again and click <strong>Convert Selection to AAC</strong>.<br />
6. iTunes thinks about it a little and then suddenly you&#8217;ll see two copies of your song. The original one, and then one that&#8217;s only 30 seconds long. Right click the 30 second AAC version and click <strong>Show in Windows Explorer</strong>. (I expect what you&#8217;ll see here will be different in Mac OS, but I don&#8217;t think it changes much, if anything.)<br />
7. In the Windows Explorer window that popped up, rename the file extension to m4r. In my example, I renamed <em>01 Whole Lotta Love.m4a</em> to <em>01 Whole Lotta Love.m4r</em>. It&#8217;d help if you have told Windows to actually display file extensions like on my machine.<br />
8. Drag and drop your new ringtone to the <strong>Ringtones</strong> folder under your iTunes library.<br />
9. Depending on your settings, you may need to manually copy this over to your iPhone or iTunes will do it next time your ringtones are synced. Profit.</p>
<p>I think I&#8217;ll convert a bunch of Nintendo game music into ringtones now.</p>
<p>Update: I&#8217;ve been informed that this is an &#8220;old trick&#8221; from the iPhone 1.0 days. Huh, okay. Hopefully it&#8217;s still useful to someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/07/14/making-your-own-iphone-ringtones/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On taxation: McCain versus Obama</title>
		<link>http://little.bluethings.net/2008/07/08/on-taxation-mccain-versus-obama/</link>
		<comments>http://little.bluethings.net/2008/07/08/on-taxation-mccain-versus-obama/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 02:02:09 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Politics]]></category>

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

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

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

		<guid isPermaLink="false">http://little.bluethings.net/?p=33</guid>
		<description><![CDATA[I have several friends that have been made fools of by the crap talk express. Some frequently heard quotes are:
&#8220;I&#8217;m a liberal but I&#8217;m going to vote republican because I want to keep my money&#8221;
&#8220;The democrats will raise my taxes&#8221;
&#8220;Obama wants to tax me more to pay for the war&#8221; (wtf?)
Anyone who keeps up on [...]]]></description>
			<content:encoded><![CDATA[<p>I have several friends that have been made fools of by the crap talk express. Some frequently heard quotes are:</p>
<p>&#8220;I&#8217;m a liberal but I&#8217;m going to vote republican because I want to keep my money&#8221;<br />
&#8220;The democrats will raise my taxes&#8221;<br />
&#8220;Obama wants to tax me more to pay for the war&#8221; (wtf?)</p>
<p>Anyone who keeps up on reality would know that all of the above are false. Especially considering that none of my friends (to my knowledge) are millionaires, these statements are baseless and just means that they aren&#8217;t fact checking anything.<span id="more-33"></span> Maybe they&#8217;ll find it easier to read this seeing as this blog gets imported by Facebook and appears on frontpage mini feeds.</p>
<p>Here are the facts:<br />
1. The McCain campaign claims that Obama voted to raise income taxes on individuals who earn as little as $32,000 per year. That&#8217;s wrong. <sup>[1]</sup><br />
2. The McCains — who report an annual income of over $6 million — would receive well over $300,000 from John McCain’s tax plan. <sup>[2]</sup><br />
3. McCain favors making the Bush tax laws permanent, and also plans to repeal the Alternative Minimum Tax, double the dependent exemption and offer tax breaks on business income. Senator Obama looks to reverse provisions benefiting the best-off tax payers (such as himself and Senator McCain), and retain the parts that reduced taxes for middle and lower income tax payers–offering an additional tax credit for these wage earners amounting to $500 per worker. <sup>[3]</sup><br />
4. <strong>McCain:</strong> The average taxpayer in every income group would see a lower tax bill, but high-income taxpayers would benefit more than everyone else. <strong>Obama:</strong> High-income taxpayers would pay more in taxes, while everyone else&#8217;s tax bill would be reduced. Those who benefit the most - in terms of reducing their taxes as a percentage of after-tax income - are in the lowest income groups. <sup>[4]</sup><br />
5. Obama&#8217;s plan would keep the 2001 and 2003 tax cuts in place for everyone except those making more than roughly $250,000, and he would increase the capital gains tax. <sup>[4]</sup><br />
6. &#8220;Middle-class families get tax cuts that are three times larger from Obama than from McCain,&#8221; Furman said. &#8220;And the McCain plan gives nearly one-quarter of its benefits to households making more than $2.8 million annually - the top 0.1%.&#8221; <sup>[4]</sup></p>
<p>And so on and so forth. Read the articles. Of course both candidates would be increasing the national deficit with their tax cuts, McCain by 1.2 trillion dollars more over the next 10 years than Obama. As for whether we will ever get over our deficit, that depends entirely on if we make any cuts to government spending.</p>
<p>Hopefully this enlightens <em>someone</em>. Or start a flame war. Either&#8217;s fine.</p>
<p>[1] <a href="http://www.factcheck.org/elections-2008/the_32000_question.html">http://www.factcheck.org/elections-2008/the_32000_question.html</a><br />
[2] <a href="http://thinkprogress.org/2008/06/19/mccain-tax-plan-for-rich/">http://thinkprogress.org/2008/06/19/mccain-tax-plan-for-rich/</a><br />
[3] <a href="http://thinkprogress.org/wonkroom/2008/06/19/analyzing-the-candidates/">http://thinkprogress.org/wonkroom/2008/06/19/analyzing-the-candidates/</a><br />
[4] <A href="http://money.cnn.com/2008/06/11/news/economy/candidates_taxproposals_tpc/index.htm?postversion=2008061115">http://money.cnn.com/2008/06/11/news/economy/candidates_taxproposals_tpc/index.htm?postversion=2008061115</a></p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/07/08/on-taxation-mccain-versus-obama/feed/</wfw:commentRss>
		</item>
		<item>
		<title>When geeks get bored</title>
		<link>http://little.bluethings.net/2008/06/15/when-geeks-get-bored/</link>
		<comments>http://little.bluethings.net/2008/06/15/when-geeks-get-bored/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 07:52:05 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Ruby]]></category>

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

		<guid isPermaLink="false">http://little.bluethings.net/?p=31</guid>
		<description><![CDATA[It&#8217;s 3:49 AM. We came back from Sammy&#8217;s tap and grill at 2 something after watching 21 at the dollar fiddy theater. At that point, Holly went to the bedroom to hang out with the puppies for a bit and never came back. I played chess online for a bit against the computer. I was [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s 3:49 AM. We came back from Sammy&#8217;s tap and grill at 2 something after watching 21 at the dollar fiddy theater. At that point, Holly went to the bedroom to hang out with the puppies for a bit and never came back. I played chess online for a bit against the computer. I was playing the Queen&#8217;s gambit and the zarking thing was using the Indian defense and I simply couldn&#8217;t beat it. So that was frustrating. After I got pissed off doing that, I thought to myself &#8220;hmm, I&#8217;m going to learn a programming language&#8221;.</p>
<p>So I learned Ruby. And now I also now why it&#8217;s called that. Makes me want to smack myself on the head. I should probably go to bed soon. Hol and I are supposed to go down to the Smithfield outlet mall tomorrow and I said I&#8217;d make breakfast.</p>
<p>I should also figure out a small pet project so I can test my new Ruby skillz.</p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/06/15/when-geeks-get-bored/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Automating document conversion in Linux using JODConverter/OOo</title>
		<link>http://little.bluethings.net/2008/05/30/automating-document-conversion-in-linux-using-jodconverterooo/</link>
		<comments>http://little.bluethings.net/2008/05/30/automating-document-conversion-in-linux-using-jodconverterooo/#comments</comments>
		<pubDate>Fri, 30 May 2008 06:12:02 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Linux]]></category>

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

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

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

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

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

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

		<category><![CDATA[open office]]></category>

		<category><![CDATA[openoffice.org]]></category>

		<guid isPermaLink="false">http://little.bluethings.net/2008/05/30/automating-document-conversion-in-linux-using-jodconverterooo/</guid>
		<description><![CDATA[Problem: Need to automatically convert an existing Microsoft Word document to a PDF on the fly.
My solution to this is using OpenOffice.org and JODConverter and call the JODConverter webservice from PHP. I tried searching for a quite a while for other ways to do this, and they were either hardly as easy, or didn&#8217;t look [...]]]></description>
			<content:encoded><![CDATA[<p>Problem: Need to automatically convert an existing Microsoft Word document to a PDF on the fly.</p>
<p>My solution to this is using <a href="http://openoffice.org">OpenOffice.org</a> and <a href="http://artofsolving.com">JODConverter</a> and call the JODConverter webservice from PHP. I tried searching for a quite a while for other ways to do this, and they were either hardly as easy, or didn&#8217;t look half as good when they came out as PDFs. Of course you can convert a lot more than just DOC -> PDF.<span id="more-30"></span> At latest glance the JODConverter homepage lists the following possible conversions:</p>
<p>* DOC to PDF, DOC to ODT, DOC to RTF<br />
* XLS to PDF, XLS to ODS, XLS to CSV<br />
* PPT to PDF, PPT to ODP, PPT to SWF<br />
* ODT to PDF, ODT to DOC, ODT to RTF<br />
* ODS to PDF, ODS to XLS, ODS to CSV<br />
* ODP to PDF, ODP to PPT, ODP to SWF</p>
<p>In any case, let&#8217;s see how to do this in 5 steps:</p>
<p>1. Remove all traces of whatever OpenOffice.org installations you may already have on your system. In my case, this was as simple as</p>
<pre>[vic@ares:~$] sudo yum remove openoffice.org*</pre>
<p>2. Download and install the newest version of OOo from http://openoffice.org</p>
<pre>[vic@ares:~$] wget http://spout.ussg.indiana.edu/openoffice/stable/2.4.0/OOo_2.4.0_LinuxIntel_install_wJRE_en-US.tar.gz
[...]
[vic@ares:~$] tar zxf OOo_2.4.0_LinuxIntel_install_wJRE_en-US.tar.gz
[vic@ares:~$] ls
[...]
[vic@ares:~$] cd OOH680_m12_native_packed-1_en-US.9286/
[vic@ares:~/OOH680_m12_native_packed-1_en-US.9286$] sudo ./setup
Checksumming&#8230;
Extracting &#8230;
93128 blocks
Done.
Using /var/tmp/install_21191/usr/java/jre1.6.0_04/bin/java
java version &#8220;1.6.0_04&#8243;
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)

Running installer
/var/tmp/install_21191/usr/java/jre1.6.0_04/bin/java -DHOME=/home/vic -DJRE_FILE=jre-6u4-linux-i586.rpm -jar JavaSetup.jar
System locale: en_US
Root privileges
OS: Linux
Mode: installation</pre>
<p>If you have a way to display an X-server, at this point, the installation will open up some fancy windows and allow you to install stuff. Make sure that &#8216;Headless application support&#8217; is enabled if you do a custom installation.</p>
<p>3. Write a short chkconfig script so the headless server can automatically start at boot time.</p>
<pre>#!/bin/bash
# openoffice.org  headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice

OOo_HOME=/opt/openoffice.org2.4
SOFFICE_PATH=$OOo_HOME/program/soffice
PIDFILE=$OOo_HOME/openoffice-server.pid

case "$1" in
    start)
    if [ -f $PIDFILE ]; then
      echo &#8220;OpenOffice headless server has already started.&#8221;
      exit
    fi
      echo &#8220;Starting OpenOffice headless server&#8221;
      $SOFFICE_PATH -headless -accept=&#8221;socket,host=127.0.0.1,port=81000;urp;&#8221; -nofirststartwizard &#038; > /dev/null 2>&#038;1
      touch $PIDFILE
    ;;
    stop)
    if [ -f $PIDFILE ]; then
      echo &#8220;Stopping OpenOffice headless server.&#8221;
      killall -9 soffice &#038;&#038; killall -9 soffice.bin
      rm -f $PIDFILE
      exit
    fi
      echo &#8220;Openoffice headless server is not running, foo.&#8221;
      exit
    ;;
    *)
    echo &#8220;Usage: $0 {start|stop}&#8221;
    exit 1
esac
exit 0</pre>
<p>Save it as /etc/init.d/openoffice. Now we need to add it to chkconfig.</p>
<pre>[vic@ares:/etc/init.d$] sudo chkconfig &#8211;add openoffice
[vic@ares:/etc/init.d$] sudo chkconfig &#8211;list openoffice
openoffice      0:off   1:off   2:on    3:on    4:on    5:on    6:off
[vic@ares:/etc/init.d$] sudo service openoffice start
Starting OpenOffice headless server
[vic@ares:/etc/init.d$]</pre>
<p>Feel free to grep through ps aux to confirm that the soffice process did indeed start.</p>
<p>4. Read <a href="http://www.artofsolving.com/node/14">Usage as a Web Application</a> on Art of Solving and download <a href="http://downloads.sourceforge.net/jodconverter/jodconverter-tomcat-2.2.1.zip?modtime=1198094692&#038;big_mirror=0">jodconverter-tomcat-2.2.1.zip</a> and extract it somewhere. Make sure that either JAVA_HOME or JRE_HOME are set and then start jodconverter/bin/startup.sh. If you realllllly feel like it, you can create another chkconfig script for this. Since I&#8217;m lazy, I just added it to my previous openoffice headless server script like so:</p>
<pre>#!/bin/bash
# openoffice.org  headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice

OOo_HOME=/opt/openoffice.org2.4
SOFFICE_PATH=$OOo_HOME/program/soffice
PIDFILE=$OOo_HOME/openoffice-server.pid
JOD_HOME=/wwwroot/apps/jodconverter

case "$1" in
    start)
    if [ -f $PIDFILE ]; then
      echo &#8220;OpenOffice headless server has already started.&#8221;
      exit
    fi
      echo &#8220;Starting OpenOffice headless server&#8221;
      $SOFFICE_PATH -headless -accept=&#8221;socket,host=127.0.0.1,port=8100;urp;&#8221; -nofirststartwizard &#038; > /dev/null 2>&#038;1
      $JOD_HOME/bin/startup.sh &#038; > /dev/null 2>&#038;1
      touch $PIDFILE
    ;;
    stop)
    if [ -f $PIDFILE ]; then
      echo &#8220;Stopping OpenOffice headless server.&#8221;
      killall -9 soffice &#038;&#038; killall -9 soffice.bin
      $JOD_HOME/bin/catalina.sh stop > /dev/null 2>&#038;1
      rm -f $PIDFILE
      exit
    fi
      echo &#8220;Openoffice headless server is not running, foo.&#8221;
      exit
    ;;
    *)
    echo &#8220;Usage: $0 {start|stop}&#8221;
    exit 1
esac
exit 0</pre>
<p>5. Time to write the code to connect to the jodconverter service and convert our documents for us. Here&#8217;s my code:</p>
<pre>&lt;?php
// prepare the file download (in my case, these actually come from a database record)
$file = '/path/to/input/file';

// instantiate the document converter class.
require_once 'HTTP/Request.php';
class Converter{
  var $url = 'http://localhost:8080/converter/service';
  function convert($input, $input_file_type, $output_file_type){
    $request = new HTTP_Request($this->url);
    $request->setMethod("POST");
    $request->addHeader("Content-Type", $input_file_type);
    $request->addHeader("Accept", $output_file_type);
    $request->setBody($input);
    $request->sendRequest();
    return $request->getResponseBody();
  }
}

// do whatever else we need to do to make the magic happen
$converter = new Converter();
$input_file_type = 'application/vnd.oasis.opendocument.text';
$output_file_type = 'application/pdf';
$output_file = '/path/to/' . basename($file, get_extension($file)) . 'pdf';

$output = $converter->convert(file_get_contents($file), $input_file_type, $output_file_type);
file_put_contents($output_file, $output);

// and now replace the file variable with what we just created
$file = $output_file;
$download_filename = basename($file);

// required for IE, otherwise Content-Disposition is ignored
if(ini_get('zlib.output_compression')) ini_set('zlib.output_compression', 'Off');

// and now pipe the file out to the customer
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // some day in the past
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
header('Content-Description: File Transfer');
header("Content-Type: application/octet-stream");
header("Content-Transfer-Encoding: Binary");
header("Content-Length: " . filesize($file));
header('Content-Disposition: attachment; filename="' . $download_filename . '"');
set_time_limit(0);
readfile($file);
exit;
?&gt;</pre>
<p>Modify as you need, of course.</p>
<p>Reference: <a href="http://www.artofsolving.com/opensource/jodconverter/guide">JODConverter Online Guide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/05/30/automating-document-conversion-in-linux-using-jodconverterooo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>High-Availability with Fedora, DRBD, Heartbeat and Mon [and Xen]</title>
		<link>http://little.bluethings.net/2008/04/17/high-availability-with-fedora-drbd-heartbeat-and-mon/</link>
		<comments>http://little.bluethings.net/2008/04/17/high-availability-with-fedora-drbd-heartbeat-and-mon/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 23:37:17 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Linux]]></category>

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

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

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

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

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

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

		<category><![CDATA[High availability]]></category>

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

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

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

		<guid isPermaLink="false">http://little.bluethings.net/2008/04/17/high-availability-with-fedora-drbd-heartbeat-and-mon/</guid>
		<description><![CDATA[Prerequisites: You must not be an idiot. make, gcc, the glibc development libraries, and the flex scanner generator must be installed on your target systems.
Now that we&#8217;ve gotten that out of the way, let&#8217;s get started. Remember to perform each step on BOTH your machines.
Do everything as your own user, not as root, unless otherwise [...]]]></description>
			<content:encoded><![CDATA[<p>Prerequisites: You must not be an idiot. make, gcc, the glibc development libraries, and the flex scanner generator must be installed on your target systems.</p>
<p>Now that we&#8217;ve gotten that out of the way, let&#8217;s get started. <strong>Remember to perform each step on BOTH your machines.</strong><br />
Do everything as your own user, not as root, unless otherwise noted.</p>
<p>DRBD:<br />
This was a pain in the ass. I followed <a href="http://www.drbd.org/users-guide/ch-build-install-from-source.html" target="_blank">Chapter 4</a> of the DRBD User Guide, somewhat.<span id="more-23"></span></p>
<p>First, we need the kernel headers:</p>
<pre>sudo yum install kernel-devel</pre>
<p>Next, we need to obtain the kernel sources:</p>
<pre>sudo yum install yum-utils
cd /tmp
yumdownloader --source kernel</pre>
<p>Install the kernel source:</p>
<pre>sudo rpm -ivh kernel-2.6.24.3-50.fc8.src.rpm</pre>
<p>Ignore any warnings about non-existent user/group.</p>
<p>Prepare the kernel source to be usable:</p>
<pre>sudo rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel.spec</pre>
<p>Download and extract the DRBD sources in, let&#8217;s pick an arbitrary directory, /tmp:</p>
<pre>cd /tmp
wget http://oss.linbit.com/drbd/drbd-8.2.5.tar.gz
tar -xzf drbd-8.2.5.tar.gz</pre>
<p>Build DRBD for the currently running kernel:</p>
<pre>[vic@ares:~$] cd /tmp
[vic@ares:/tmp$] cd drbd-8.2.5
[vic@ares:/tmp/drbd-8.2.5$] cd drbd
[vic@ares:/tmp/drbd-8.2.5/drbd$] make clean all</pre>
<p>You will now find a file called <stron>drbd.ko</strong> in this directory. You can interrogate it to make sure everything&#8217;s okay:</p>
<pre>[vic@ares:/tmp/drbd-8.2.5/drbd$] /sbin/modinfo drbd.ko
filename:       drbd.ko
alias:          block-major-147-*
license:        GPL
description:    drbd - Distributed Replicated Block Device v8.2.5
author:         Philipp Reisner
<phil@linbit.com>, Lars Ellenberg <lars@linbit.com>
srcversion:     BC9E03E6896BF68FDE41F44
depends:
vermagic:       2.6.24.3-50.fc8 SMP mod_unload
parm:           minor_count:Maximum number of drbd devices (1-255) (int)
parm:           allow_oos:DONT USE! (bool)
parm:           enable_faults:int
parm:           fault_rate:int
parm:           fault_count:int
parm:           fault_devs:int
parm:           trace_level:int
parm:           trace_type:int
parm:           trace_devs:int
parm:           usermode_helper:string</pre>
<p>What I did next was build RPMs to install, instead of doing just a make install from /tmp/drbd-8.2.5 since that didn&#8217;t work out for me.</p>
<pre>[vic@ares:/tmp/drbd-8.2.5$] make rpm
[vic@ares:/tmp/drbd-8.2.5$] cd dist/RPMS/x86_64/
[vic@ares:/tmp/drbd-8.2.5/dist/RPMS/x86_64$] ll
total 1.2M
-rw-r&#8211;r&#8211; 1 vic vic 213K 2008-04-01 12:28 drbd-8.2.5-3.x86_64.rpm
-rw-r&#8211;r&#8211; 1 vic vic 122K 2008-04-01 12:28 drbd-debuginfo-8.2.5-3.x86_64.rpm
-rw-r&#8211;r&#8211; 1 vic vic 834K 2008-04-01 12:28 drbd-km-2.6.24.3_50.fc8-8.2.5-3.x86_64.rpm</pre>
<p>Sweet sunshine. Install them.</p>
<pre>[vic@ares:/tmp/drbd-8.2.5/dist/RPMS/x86_64$] sudo rpm -ivh *.rpm</pre>
<p>Now we need to configure DRBD. See <a href="http://www.drbd.org/users-guide/ch-configure.html" target="blank">Chapter 5</a> of the DRBD user guide. This is what my /etc/drbd.conf looks like, dependent on the fact that my two machines are hooked up in the back to a gigabit network. <abbr="Your mileage may vary.">YMMV</abbr>:</p>
<pre>global {
    usage-count yes;
}

common {
    syncer { rate 40M; }
    protocol C;
}

resource r0 {
  handlers {
    pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt -f";
    pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt -f";
    local-io-error "echo o > /proc/sysrq-trigger ; halt -f"
    outdate-peer "/usr/lib/heartbeat/drbd-peer-outdater -t 5";
  }

  startup {
    degr-wfc-timeout 120;
  }

  disk {
    on-io-error   detach;
  }

  net {
    cram-hmac-alg "sha1";
    shared-secret "FooFunFactory";
    after-sb-0pri disconnect;
    after-sb-1pri disconnect;
    after-sb-2pri disconnect;
    rr-conflict disconnect;
  }

  syncer {
    rate 100M;
    al-extents 257;
  }

  on ares.bluethings.net {
    device     /dev/drbd0;
    disk       /dev/sda5;
    address    172.16.6.2:7788;
    flexible-meta-disk  internal;
  }

  on mars.bluethings.net {
    device    /dev/drbd0;
    disk      /dev/sda5;
    address   172.16.6.3:7788;
    meta-disk internal;
  }
}</pre>
<p>Now we need to prepare and enable our resources:</p>
<pre>[vic@ares:/tmp/drbd-8.2.5/drbd$] sudo su
[root@ares:~#] drbdadm create-md r0
md_offset 107372765184
al_offset 107372732416
bm_offset 107369455616

Found ext3 filesystem which uses 104852984 kB
current configuration leaves usable 104852984 kB

 ==> This might destroy existing data! <==

Do you want to proceed?
[need to type 'yes' to confirm] yes
<snip>
New drbd meta data block sucessfully created.
[root@ares:~#] drbdadm attach r0
[root@ares:~#] drbdadm connect r0
[root@ares:~#] cat /proc/drbd
version: 8.2.5 (api:88/proto:86-88)
GIT-hash: 9faf052fdae5ef0c61b4d03890e2d2eab550610c build by vic@ares.bluethings.net, 2008-04-01 01:35:36
 0: cs:Connected st:Secondary/Secondary ds:Inconsistent/Inconsistent C r&#8212;
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0</pre>
<p>Okay, everything is working so far.</p>
<p>Now, we need to perform the INITIAL FULL SYNCHRONIZATION. <strong>Type this only on your primary node.</strong></p>
<pre>[root@ares:~#] drbdadm &#8212; &#8211;overwrite-data-of-peer primary r0
[root@ares:~#] service drbd start
Starting DRBD resources:    [ s(r0) ].</pre>
<p>You can monitor the progress of this syncing using cat /proc/drbd</p>
<p>Okay, let&#8217;s create the filesystem on our primary node.</p>
<pre>[root@ares:~#] mkfs.ext3 /dev/drbd0
<snip>
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@ares:~#] tune2fs -c -1 -i 0 /dev/drbd0
tune2fs 1.40.4 (31-Dec-2007)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds</pre>
<p>That won&#8217;t work on the secondary node. If you feel like trying anyway:</p>
<pre>[root@mars:~#] mkfs.ext3 /dev/drbd0
mke2fs 1.40.4 (31-Dec-2007)
mkfs.ext3: Wrong medium type while trying to determine filesystem size</pre>
<p>Now, we create the mount points and mount the filesystem on our primary node:</p>
<pre>[root@ares:/#] mkdir /data
[root@ares:/#] mount -o rw /dev/drbd0 /data</pre>
<p>And create the mount point on the secondary node:</p>
<pre>[root@mars:/#] mkdir /data</pre>
<p>At this point, you kinda need to take my word for it that DRBD is working. But how do we know if it&#8217;ll really do its job when the time comes? Well, you could test it manually by creating a file in /data, then umounting /data and making ares a secondary node and then promoting mars to a primary node. Oh hell, I&#8217;ll show you.</p>
<pre>[root@ares:/#] echo &#8220;I&#8217;m a genie in a bottle baby.&#8221; >> /data/test_file
[root@ares:/#] cat /data/test_file
I&#8217;m a genie in a bottle baby.
[root@ares:/#] service drbd status
drbd driver loaded OK; device status:
version: 8.2.5 (api:88/proto:86-88)
GIT-hash: 9faf052fdae5ef0c61b4d03890e2d2eab550610c build by vic@ares.bluethings.net, 2008-04-01 01:35:36
m:res  cs         st                 ds                 p  mounted  fstype
0:r0   Connected  Primary/Secondary  UpToDate/UpToDate  C  /xen     ext3
[root@ares:/#] umount /xen
[root@ares:/#] drbdadm secondary r0
[root@ares:/#] service drbd status
drbd driver loaded OK; device status:
version: 8.2.5 (api:88/proto:86-88)
GIT-hash: 9faf052fdae5ef0c61b4d03890e2d2eab550610c build by vic@ares.bluethings.net, 2008-04-01 01:35:36
m:res  cs         st                   ds                 p  mounted  fstype
0:r0   Connected  Secondary/Secondary  UpToDate/UpToDate  C</pre>
<p>And on mars:</p>
<pre>[root@mars:/data#] drbdadm primary r0
[root@mars:/data#] mount -o rw /dev/drbd0 /data
[root@mars:/data#] service drbd status
drbd driver loaded OK; device status:
version: 8.2.5 (api:88/proto:86-88)
GIT-hash: 9faf052fdae5ef0c61b4d03890e2d2eab550610c build by vic@mars.bluethings.net, 2008-04-01 01:37:37
m:res  cs         st                 ds                 p  mounted  fstype
0:r0   Connected  Primary/Secondary  UpToDate/UpToDate  C  /xen     ext3
[root@mars:/#] cat /data/test_file
I&#8217;m a genie in a bottle baby.</pre>
<p>There we go. Now to install and configure heartbeat. Lucky for us, the documentation for this infinitely better than that for DRBD. See <a href="http://www.linux-ha.org/GettingStarted">Getting Started</a> at linux-ha.org.</p>
<p>Heartbeat:</p>
<pre>[vic@ares:~$] sudo yum install heartbeat
[vic@ares:~$] sudo su
[root@ares:/home/vic#] cd /etc/ha.d
[root@ares:/etc/ha.d#] ll
total 24K
-rwxr-xr-x 1 root root  745 2008-03-05 20:20 harc
drwxr-xr-x 2 root root 4.0K 2008-04-01 00:32 rc.d
-rw-r&#8211;r&#8211; 1 root root  692 2008-03-05 20:20 README.config
drwxr-xr-x 2 root root 4.0K 2008-04-01 01:37 resource.d
-rw-r&#8211;r&#8211; 1 root root 7.1K 2008-03-05 20:20 shellfuncs
</pre>
<p>Now where the hell is ha.cf? Looking inside README.config shows:</p>
<pre>The good news is that sample versions of these files may be found in
the documentation directory (providing you installed the documentation).

If you installed heartbeat using rpm packages then
this command will show you where they are on your system:
        rpm -q heartbeat -d</pre>
<p>Alternatively, we can use locate to find the files and copy them to /etc/ha.d:</p>
<pre>[root@ares:/etc/ha.d#] updatedb
[root@ares:/etc/ha.d#] locate ha.cf
/usr/share/doc/heartbeat-2.1.3/ha.cf
[root@ares:/etc/ha.d#] cp /usr/share/doc/heartbeat-2.1.3/ha.cf .
[root@ares:/etc/ha.d#] cp /usr/share/doc/heartbeat-2.1.3/haresources .
[root@ares:/etc/ha.d#] cp /usr/share/doc/heartbeat-2.1.3/authkeys .</pre>
<p>And then pretty much configure ha.cf like the Linux HA <a href="http://www.linux-ha.org/GettingStarted#gettingstarted" target="_blank">Configuring ha.cf</a> tells you to do. You can also checkout <a href="http://www.howtoforge.com/high_availability_heartbeat_centos" target="_blank">howtoforge</a>. I didn&#8217;t bother with the watchdog or the softdog stuff, and I set my bcast to eth1, since that&#8217;s what my internal network runs on.</p>
<p>When you are done configuring haresources, ha.cf and authkeys like Linux HA and howtoforge tell you, copy all three files over to the other node so that they are exactly the same. To test failover, kill heartbeat on your primary machine and your secondary machine will take over the requests. An easy way to test this would be to set up httpd to listen on a certain IP and have it print out the results of uname -a. Obviously the results will be different depending on which machine is serving the requests.</p>
<p>For your reference, this is my /etc/ha.d/haresources on both machines:</p>
<pre>ares.bluethings.net \
IPaddr::xx.yy.zz.w4/30/eth0/xx.yy.zz.w9 \
IPaddr::xx.yy.zz.w5/30/eth0/xx.yy.zz.w9 \
IPaddr::xx.yy.zz.w6/30/eth0/xx.yy.zz.w9 \
IPaddr::xx.yy.zz.w7/30/eth0/xx.yy.zz.w9 \
IPaddr::xx.yy.zz.w8/30/eth0/xx.yy.zz.w9 \
drbddisk::wwwroot Filesystem::/dev/drbd0::/wwwroot::ext3::rw \
drbddisk::sqlroot Filesystem::/dev/drbd1::/sqlroot::ext3::rw \
drbddisk::mailroot Filesystem::/dev/drbd2::/mailroot::ext3::rw \
mysqld httpd dkimproxy cyrus-imapd saslauthd postfix mon</pre>
<p>And finally, I set up <a href="http://mon.wiki.kernel.org/index.php/Main_Page" target="_blank">mon</a>. The thing about heartbeat is that it&#8217;ll do a failover if your machine dies, but heartbeat has no way of knowing when mysqld or httpd or postfix or one of your other crucial services die. This is where mon comes in. If my httpd service dies, mon will shoot me a couple alert emails and kill heartbeat, thus causing the failover to happen. It&#8217;s beautiful, really. Installing and configuring mon is prettty easy from the README and INSTALL files so I won&#8217;t go into much detail. Make sure mon is the last thing you start in your haresources file (or at least make sure it comes AFTER all your monitored services) or otherwise you&#8217;re going to encounter a race condition where mon starts up before say mysqld, sees that mysqld is not running, and shuts down heartbeat.</p>
<p>Any questions? No? Great. Have a happy high-availability cluster.</p>
<p><strong>Late addition:</strong><br />
If you decide to use Xen, then all you need to do is do all of the above on one machine, use the DRBD partition to store the Xen images in, and then it&#8217;d be possible to do a live migration of sorts when heartbeat switches over to the other machine.</p>
<p>References:<br />
<a href="http://www.mjmwired.net/resources/mjm-fedora-f8.html#kernelheaders">http://www.mjmwired.net/resources/mjm-fedora-f8.html#kernelheaders</a><br />
<a href="http://www.drbd.org/users-guide">http://www.drbd.org/users-guide</a><br />
<a href="https://services.ibb.gatech.edu/wiki/index.php/Howto:Software:DRBD">https://services.ibb.gatech.edu/wiki/index.php/Howto:Software:DRBD</a><br />
<a href="http://www.linux-ha.org">http://www.linux-ha.org</a><br />
<a href="http://www.howtoforge.com/high_availability_heartbeat_centos">http://www.howtoforge.com/high_availability_heartbeat_centos</a><br />
<a href="http://mon.wiki.kernel.org/index.php/Main_Page">http://mon.wiki.kernel.org/index.php/Main_Page</a><br />
<a href="http://kjalleda.googlepages.com/mysqlfailover">http://kjalleda.googlepages.com/mysqlfailover</a></p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/04/17/high-availability-with-fedora-drbd-heartbeat-and-mon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ben Stein&#8217;s Expelled: No Integrity Displayed</title>
		<link>http://little.bluethings.net/2008/04/12/15-answers-to-creationist-nonsense/</link>
		<comments>http://little.bluethings.net/2008/04/12/15-answers-to-creationist-nonsense/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 16:57:58 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://little.bluethings.net/2008/04/12/15-answers-to-creationist-nonsense/</guid>
		<description><![CDATA[And any respect I had for Ben Stein is now gone. What a fscking moron. SciAm has a beautiful review of the movie over on the Scientific American website.
]]></description>
			<content:encoded><![CDATA[<p>And any respect I had for Ben Stein is now gone. What a fscking moron. SciAm has a beautiful review of the movie over on the <a href="http://www.sciam.com/article.cfm?id=ben-steins-expelled-review-john-rennie" target=_blank">Scientific American</a> website.</p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/04/12/15-answers-to-creationist-nonsense/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Obama didn&#8217;t want my money [and Hillary keeps stealing my wife's]</title>
		<link>http://little.bluethings.net/2008/04/08/obama-didnt-want-my-money-and-hillary-keeps-stealing-my-wifes/</link>
		<comments>http://little.bluethings.net/2008/04/08/obama-didnt-want-my-money-and-hillary-keeps-stealing-my-wifes/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 18:33:06 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Asides]]></category>

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

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

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

		<guid isPermaLink="false">http://little.bluethings.net/2008/04/08/obama-didnt-want-my-money-and-hillary-keeps-stealing-my-wifes/</guid>
		<description><![CDATA[This is a story I came upon at the Daily Kos: Obama Didn&#8217;t Want My Money.
]]></description>
			<content:encoded><![CDATA[<p>This is a story I came upon at the Daily Kos: <a href="http://www.dailykos.com/storyonly/2008/4/7/124812/3285/604/491642" target="_blank">Obama Didn&#8217;t Want My Money</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/04/08/obama-didnt-want-my-money-and-hillary-keeps-stealing-my-wifes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ordering individual results in a UNION statement, or &#8220;Oh UNION/ORDER BY, how do I hate thee? Let me count the ways.&#8221;</title>
		<link>http://little.bluethings.net/2008/04/08/ordering-individual-results-in-a-union-statement-or-oh-unionorder-by-how-do-i-hate-thee-let-me-count-the-ways/</link>
		<comments>http://little.bluethings.net/2008/04/08/ordering-individual-results-in-a-union-statement-or-oh-unionorder-by-how-do-i-hate-thee-let-me-count-the-ways/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 16:02:29 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[SQL]]></category>

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

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

		<category><![CDATA[ORDER BY]]></category>

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

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

		<guid isPermaLink="false">http://little.bluethings.net/2008/04/08/ordering-individual-results-in-a-union-statement-or-oh-unionorder-by-how-do-i-hate-thee-let-me-count-the-ways/</guid>
		<description><![CDATA[Suppose we have the following columns in a table:
+-----+-----------------+
&#124; id  &#124; name            &#124;
+-----+-----------------+
&#124;  85 &#124; Medicine        &#124;
&#124; 156 &#124; Social Sciences &#124;
&#124; 166 &#124; Other Fields    &#124;
&#124; 184 &#124; Business   [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose we have the following columns in a table:</p>
<pre>+-----+-----------------+
| id  | name            |
+-----+-----------------+
|  85 | Medicine        |
| 156 | Social Sciences |
| 166 | Other Fields    |
| 184 | Business        |
+-----+-----------------+
4 rows in set (0.00 sec)</pre>
<p><span id="more-25"></span></p>
<p>Suppose as well that we want &#8220;Other Fields&#8221; to be the last column displayed. That is easy enough. We just need to write a UNION statement like so:</p>
<pre>mysql> (SELECT id, name FROM table WHERE name != 'Other Fields') UNION (SELECT id, name FROM table WHERE name = 'Other Fields');
+-----+-----------------+
| id  | name            |
+-----+-----------------+
|  85 | Medicine        |
| 156 | Social Sciences |
| 184 | Business        |
| 166 | Other Fields    |
+-----+-----------------+
4 rows in set (0.00 sec)</pre>
<p>Now suppose that you want the results to be alpha sorted otherwise. Meaning you want the results to be Business, Medicine, Social Sciences, Other Fields. That too is easy, you think to yourself. I&#8217;ll just add an ORDER BY clause inside the first SELECT statement and everything will be kosher. Well, let&#8217;s try your solution, mister smarty-pants.</p>
<pre>mysql> (SELECT id, name FROM table WHERE name != 'Other Fields' ORDER BY name ASC) UNION (SELECT id, name FROM table WHERE name = 'Other Fields');
+-----+-----------------+
| id  | name            |
+-----+-----------------+
|  85 | Medicine        |
| 156 | Social Sciences |
| 184 | Business        |
| 166 | Other Fields    |
+-----+-----------------+
4 rows in set (0.00 sec)</pre>
<p>Oh snap, that didn&#8217;t work. How about if you give it a global ORDER BY outside of all the parentheses? Well, that would be a GLOBAL order by like you just said. It would alpha sort everything. Meaning your &#8216;Other Fields&#8217; won&#8217;t be at the very end anymore. So what is the solution? I&#8217;ll tell you. The solution is to use an independent sort column. Like this:</p>
<pre>mysql> (SELECT id, name, 1 AS order_by FROM table WHERE name != 'Other Fields') UNION (SELECT id, name, 2 AS order_by FROM table WHERE name = 'Other Fields') ORDER BY order_by, name ASC;
+-----+-----------------+----------+
| id  | name            | order_by |
+-----+-----------------+----------+
| 184 | Business        |        1 |
|  85 | Medicine        |        1 |
| 156 | Social Sciences |        1 |
| 166 | Other Fields    |        2 |
+-----+-----------------+----------+
4 rows in set (0.00 sec)</pre>
<p>Bam. After I struggled for a couple minutes to figure out this damn query, I found the <a href="http://dev.mysql.com/doc/refman/5.0/en/union.html" target="_blank">UNION reference for MySQL 5.0</a> that shares this little tidbit:</p>
<blockquote><p>To use an ORDER BY or LIMIT clause to sort or limit the entire UNION result, parenthesize the individual SELECT statements and place the ORDER BY or LIMIT after the last one.<br />
[...]<br />
To apply ORDER BY or LIMIT to an individual SELECT, place the clause inside the parentheses that enclose the SELECT.<br />
[...]<br />
However, use of ORDER BY for individual SELECT statements implies nothing about the order in which the rows appear in the final result because UNION by default produces an unordered set of rows. Therefore, the use of ORDER BY in this context is typically in conjunction with LIMIT, so that it is used to determine the subset of the selected rows to retrieve for the SELECT, even though it does not necessarily affect the order of those rows in the final UNION result. If ORDER BY appears without LIMIT in a SELECT, it is optimized away because it will have no effect anyway.<br />
[...]<br />
To cause rows in a UNION result to consist of the sets of rows retrieved by each SELECT one after the other, select an additional column in each SELECT to use as a sort column and add an ORDER BY following the last SELECT. [...] To additionally maintain sort order within individual SELECT results, add a secondary column to the ORDER BY clause.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/04/08/ordering-individual-results-in-a-union-statement-or-oh-unionorder-by-how-do-i-hate-thee-let-me-count-the-ways/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Postfix + MySQL + PCRE + Berkeley DB + Cyrus SASL + STARTTLS</title>
		<link>http://little.bluethings.net/2008/04/03/postfix-mysql-pcre-berkeley-db-cyrus-sasl-starttls/</link>
		<comments>http://little.bluethings.net/2008/04/03/postfix-mysql-pcre-berkeley-db-cyrus-sasl-starttls/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 06:33:12 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Linux]]></category>

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

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

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

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

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

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

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

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

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

		<guid isPermaLink="false">http://little.bluethings.net/2008/04/03/postfix-mysql-pcre-berkeley-db-cyrus-sasl-starttls/</guid>
		<description><![CDATA[In my opinion, this is a match made in mail server heaven. Also, it is a total bitch to set up. Therefore, here it goes to be archived because I know I&#8217;ll forget how I did it otherwise and spend 5 hours banging my head on my desk come next year. Note: this all of [...]]]></description>
			<content:encoded><![CDATA[<p>In my opinion, this is a match made in mail server heaven. Also, it is a total bitch to set up. Therefore, here it goes to be archived because I know I&#8217;ll forget how I did it otherwise and spend 5 hours banging my head on my desk come next year. <strong>Note:</strong> this all of course depends on where these files are on YOUR system. I installed this on a Redhat / Fedore Core 8 x86_64 machine.</p>
<p>Prerequisites:<br />
1. Read <a href="http://www.postfix.org/INSTALL.html" target="_blank">http://www.postfix.org/INSTALL.html</a><br />
2. From above, you need to create a user/group for postfix BEFORE you try to install postfix.<br />
3. Create a group for postdrop<span id="more-24"></span><br />
4. My /var/log/yum.log shows that I installed all of these packages today before I got Postfix to compile. You may or may not need all of them: db4 db4-utils cyrus-imapd mysql-libs pam_mysql zlib zlib-devel openssl-devel db4-devel pcre cyrus-sasl-devel pcre-devel cyrus-sasl-sql</p>
<p>And now, to compile Postfix:</p>
<pre>[vic@ares:/tmp$] wget ftp://postfix.cloud9.net/official/postfix-2.5.2-RC1.tar.gz
&#8211;02:13:44&#8211;  ftp://postfix.cloud9.net/official/postfix-2.5.2-RC1.tar.gz
           => `postfix-2.5.2-RC1.tar.gz&#8217;
Resolving postfix.cloud9.net&#8230; 168.100.10.85
Connecting to postfix.cloud9.net|168.100.10.85|:21&#8230; connected.
Logging in as anonymous &#8230; Logged in!
==> SYST &#8230; done.    ==> PWD &#8230; done.
==> TYPE I &#8230; done.  ==> CWD /official &#8230; done.
==> PASV &#8230; done.    ==> RETR postfix-2.5.2-RC1.tar.gz &#8230; done.
Length: 3,157,250 (3.0M) (unauthoritative)

100%[=================================================>] 3,157,250      7.27M/s

02:13:46 (7.27 MB/s) - `postfix-2.5.2-RC1.tar.gz&#8217; saved [3157250]

[vic@ares:/tmp$] tar zxf postfix-2.5.2-RC1.tar.gz
[vic@ares:/tmp$] cd postfix-2.5.2-RC1
[vic@ares:/tmp/postfix-2.5.2-RC1$] make tidy
&lt;snip&gt;
[vic@ares:/tmp/postfix-2.5.2-RC1$] make -f Makefile.init makefiles \
&#8216;CCARGS=-DHAS_MYSQL -I/usr/include/mysql \
-DHAS_PCRE -I/usr/include -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl \
-DUSE_TLS -I/usr/include/openssl -DHAS_DB -I/usr/include/db4&#8242; \
&#8216;AUXLIBS=-L/usr/lib64/mysql -lmysqlclient -lz -lm -L/usr/lib64 -lpcre \
-L/usr/lib/sasl2 -lsasl2 -L/usr/lib64/openssl -lssl -lcrypto -L/usr/lib64 -ldb&#8217;
&lt;snip&gt;
[vic@ares:/tmp/postfix-2.5.2-RC1$] make
&lt;snip&gt;
[vic@ares:/tmp/postfix-2.5.2-RC1$] sudo su
[root@ares:/tmp/postfix-2.5.2-RC1#] make install</pre>
<p>And follow the instructions. I just stuck with all the default options. Tits on a cracker.</p>
<p>References:<br />
http://www.postfix.org/INSTALL.html</p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/04/03/postfix-mysql-pcre-berkeley-db-cyrus-sasl-starttls/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Time is but an illusion. Lunchtime doubly so.</title>
		<link>http://little.bluethings.net/2008/04/01/time-is-but-an-illusion-lunchtime-doubly-so/</link>
		<comments>http://little.bluethings.net/2008/04/01/time-is-but-an-illusion-lunchtime-doubly-so/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 15:47:46 +0000</pubDate>
		<dc:creator>vic</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://little.bluethings.net/2008/04/01/time-is-but-an-illusion-lunchtime-doubly-so/</guid>
		<description><![CDATA[That was a nice two and a half month break. In that period of time, I:
- went to Omaha to hang out with Holly&#8217;s parents for Christmas and got lots of presents
- had a blast on New Year&#8217;s eve back in Chapel Hill (this involved a lot of chopping off champagne bottle heads with a [...]]]></description>
			<content:encoded><![CDATA[<p>That was a nice two and a half month break. In that period of time, I:</p>
<p>- went to Omaha to hang out with Holly&#8217;s parents for Christmas and got lots of presents<br />
- had a blast on New Year&#8217;s eve back in Chapel Hill (this involved a lot of chopping off champagne bottle heads with a battleaxe)<br />
- had my 1997 Dodge Stratus (132K miles) die of a broken timing belt<br />
- bought a new 2008 Subaru Impreza 2.5i 5-door hatchback<br />
- turned 25 (last week) (cheap car insurance ahoy!)</p>
<p>Pretty uneventful, I&#8217;d say.</p>
]]></content:encoded>
			<wfw:commentRss>http://little.bluethings.net/2008/04/01/time-is-but-an-illusion-lunchtime-doubly-so/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
