Tuesday, July 31, 2007

Little Tricks with Xen images from jailtime.org

Ive been busy setting up a CentOS server. After the successful installation of dspam on our FC5 Xen virtual machine, we have decided to move it from our development server (a frankenstein of a machine) to a proper host. Yes, Ive been testing it for over a year now!

Postfix with MySQL support in CentOS 5

So I downloaded a prebuilt CentOS image from jailtime and installed the necessary tools. A little trick I learnt was the inclusion of the extra repositories. dspam requires a postfix installation with MySQL support. To do this, you can either compile from source, but being the lazy git I am, I'd rather download the binaries.

To do this, you just need to enable the CentOSPlus repositories, which can be done via a command line switch:

# yum --enablerepo=centosplus upgrade postfix

Yum will then work out the requisites and download the stuff for you. Unfortunately it also brings down the postgresql binaries. So unless you are in dire need of hard disk space, don't do it this way.

We aren't in Kansas anymore, Toto

Another thing about the jailtime images is that the hwclock scripts are modified to return 0. This is because there is no hardware clock. It uses the host's (Dom0) time. So to get the correct time, make sure you change the zone information in /etc/localtime. For us users in Kuala Lumpur, I have to do this:

# ln -s /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime

Keeping it 32bits

My Xen host is a AMD 64 server. My Xen clients are i386 virtual machines. This is for "portability" reasons. My previous post about using yum to install i386 binaries can be improved. Now use setarch. To install:

# yum install setarch.i386

subsequently make sure you run it before yumming some more.

# setarch i386

If you forget and accidentally call yum, mixing i386 and x86_64 info, the downloaded headers will be "confused". You'd have to do a clean:

# yum clean all


0 lewsers: