<?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>Death of a Gremmie &#187; postfix</title>
	<atom:link href="http://deathofagremmie.com/tag/postfix/feed/" rel="self" type="application/rss+xml" />
	<link>http://deathofagremmie.com</link>
	<description>by Brian Neal</description>
	<lastBuildDate>Wed, 14 Jul 2010 02:31:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Server Upgrade Status: Getting There</title>
		<link>http://deathofagremmie.com/2009/05/20/server-upgrade-status-getting-there/</link>
		<comments>http://deathofagremmie.com/2009/05/20/server-upgrade-status-getting-there/#comments</comments>
		<pubDate>Thu, 21 May 2009 03:22:04 +0000</pubDate>
		<dc:creator>gremmie</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://deathofagremmie.com/?p=260</guid>
		<description><![CDATA[Welcome, this is my first post from the new server! I&#8217;m really, really glad I went with renting a 2nd server and migrating to it instead of my original plan of just re-imaging. I would have been down for days while I figured out Ubuntu without Plesk. I got my new server and pressed the [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome, this is my first post from the new server!</p>
<p>I&#8217;m really, really glad I went with renting a 2nd server and migrating to it instead of my original plan of just re-imaging. I would have been down for days while I figured out Ubuntu without Plesk.</p>
<p>I got my new server and pressed the magic button to have it re-imaged to Ubuntu 8.04. It all seemed to work just fine. I spent last Saturday going to town on it, getting the version of Subversion I wanted to use built, getting mod_wsgi built, and other simple &#8220;new server&#8221; type tasks. But then I noticed that the following on Sunday:</p>
<pre>/dev/md6              4.7G  228M  4.5G   5% /var
/dev/md7              221G   83M  221G   1% /home</pre>
<p>The sizes of /var and /home were swapped compared to the old server. I had a huge /var and a small /home before. I became very worried because on the old server, all the databases, website data, and logs all go under /var. Was I going to run out of room very quickly?</p>
<p>I stewed on this for a day or so, and I even toyed with the idea of reimaging to CentOS 5 and getting Plesk back. After all, my main goal was to get Python 2.5, and I subsequently learned you can run different versions of Python side by side. So in theory I could install Python 2.5 on CentOS if I built from source. Then I could tell mod_wsgi to use Python 2.5, meanwhile the rest of the system would still use Python 2.4, and things like the yum package manager would keep working.</p>
<p>But ultimately I decided I liked Ubuntu better. I liked the way they setup Apache for easy multiple virtual hosts. I liked the aptitude program as a simple GUI for apt-get. And Ubuntu is my development environment on my laptop, so having them both match would be a good thing.</p>
<p>I did ask my host if they could either customize the image to make /var bigger or help me do it. They said no to both. This wasn&#8217;t totally surprising or unexpected.</p>
<p>I decided it didn&#8217;t matter how big /var was. I&#8217;ll just put everything on /home, under a directory of my own making. I configured MySQL to use the new directory on /home, and all my virtual host websites will use it as well. Now only system logs will use /var, and it should be big enough for them.</p>
<p>With that settled I set of to try to make it work. I began moving deathofagremmie.com to the new server. Moving the database and WordPress files was easy enough. I then hacked my way through the DNS configuration, using the old server as a guide. I really wasn&#8217;t sure I had done it right, but what the heck, I thought I&#8217;d give it a try. I then had my host transfer the domain to the new server. There wasn&#8217;t much to do except wait for the DNS to propogate. I did this late at night, so I went to bed. The next day at work I noticed that it had transferred, and the website even came up! A few things didn&#8217;t work, but nothing I couldn&#8217;t fix at home later. But when I came home from work, DNS was still pointing to the old server. I had to wait until almost 24 hours had elapsed before it finally updated for me at home.</p>
<p>Once DNS was correct, I could more easily fix the problems from the migration. It turns out they were minor. I had copy/pasted some Apache configuration from the default files, and I had the &#8220;AllowOverride&#8221; option set to &#8220;none&#8221; on my virtual host. This meant Apache would not look for .htaccess files, and thus the mod_rewrite rules that WordPress uses weren&#8217;t working, and the authorization I had setup on the admin login was busted. No problem, I&#8217;d actually rather not have Apache look for .htaccess files for efficiency reasons. I just moved those directives out of .htacess and put them into my configuration file for the virtual host. Why didn&#8217;t I think of that before? But that wasn&#8217;t quite the whole story. Mod_rewrite still didn&#8217;t work, but that was only because it wasn&#8217;t enabled by default in Ubuntu. The Ubuntu team did a really good job of paring down the Apache configuration, and making it very easy to enable and disable modules. A simple &#8220;a2enmod&#8221; command and a graceful restart fixed it. The <a href="https://help.ubuntu.com/8.04/serverguide/C/index.html">Ubuntu Server Guide</a> was a great help to me while I was doing all this.</p>
<p>And yesterday I received my copy of <a href="http://www.apress.com/book/view/1590594940">Pro DNS and Bind</a> by Ron Aitchison. By quickly reading the first few chapters the mystery around those DNS files was suddenly solved. I went back and redid those files with my new knowledge and I feel confident about them now. I highly recommend this book.</p>
<p>And, using my new copy of <a href="http://nostarch.com/postfix.htm">The Book of Postfix</a>, I was able to get my mail aliases for deathofagremmie.com to work. Postfix was much easier to setup than I thought it would be. The developers did a great job of &#8220;just making it work&#8221; out of the box with minimal configuration. I don&#8217;t have any plans to have any real mailboxes on the server, I just want aliases to forward to my Google mail account. This was easy to setup, and is described in Chapter 14 &#8220;A Mail Server For Multiple Domains.&#8221; I used the virtual alias technique to accomplish this. Edit a few files, run some commands on them, restart and it all worked.</p>
<p>The last wrinkle of the night was figuring out how to change the hostname under Ubuntu. This was solved by doing some quick Googling. You basically have to edit /etc/hostname, /etc/hosts, then stop and start the hostname service. With that fixed, email from my new server looks correct.</p>
<p>So, what&#8217;s left? I&#8217;m liking this new configuration, so I think I&#8217;ll go with it. Now I have to move the two remaining sites: one is a <a href="http://djangoproject.com">Django</a> powered site, and one is the current PHP based <a href="http://surfguitar101.com">SurfGuitar101.com</a>. After I get them moved and tested I can shut down the old server, and get back to working on the new Django powered version of SurfGuitar101.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://deathofagremmie.com/2009/05/20/server-upgrade-status-getting-there/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
