All posts in SysAdmin

How To Resize a Xen Virtual Disk

One of the challenges that comes with managing Xen domU instances is dealing with virtual machines that run out of disk space. If the initial setup was not done carefully, you may find that resizing the virtual machine is a bit more involved than it sounds, especially if the domU is backed by a disk image or single physical partition.

In this post, I’ll demonstrate two different methods for adding more disk space to a Xen virtual machine. Unless otherwise indicated, all systems described here are running fully up-to-date versions of CentOS 5.6 (Final), and all Xen domU instances are using file based disk images.
Continue reading →

Installing Node.js on CentOS/RedHat

Node.js, if you are not yet familiar with it, facilitates building event-driven server-side javascript services. Services built with Node.js go to sleep after instructing the operating system to wake them if a connection is made (via epoll, kqueue, /dev/poll or select). Additionally, each connection is only a small heap allocation, as opposed to spawning a 2M thread/child for each connection like some other popular web services.

Continue reading →

Force Lower-Case URLs with mod_rewrite

You may find yourself in a situation at some point where you need to ensure that all access to your site is done using lower-case only. This may be because of SEO (avoiding duplicate content), or perhaps you want to ensure that you can seamlessly move between case-sensitive/insensitive operating systems. If you are running a standard LAMP stack, you’re in luck. Apache’s mod_rewrite can be used to 301-redirect all incoming requests to their lower-case counterparts with just a few configuration directives.

Continue reading →

Configuring mod_rewrite for the Front-Controller Pattern

When installing or creating a web application that implements the front controller pattern on an apache server, it is common to use mod_rewrite to redirect all traffic for non-existent resources to a the central dispatch file acting as the front controller.

Depending on where your decide to place your mod_rewrite rules, the required syntax can differ. Continue reading →

Migrating mail from Evolution on Linux

Migrating mail from one installation of Novel Evolution (formerly Ximian Evolution) to another is possible, but if not done carefully it is easy to lose messages and corrupt files. The simplest method, and the most error prone is probably just to copy the .evolution directory from one machine to another. The problem with doing that is that you will be carrying over all of the internal indices and data files created by Evolution, in addition to the actual mail files. If you are migrating to a different version of Evolution, or if the target installation is already set up with its own data directory, you are very likely going to cause problems.
Continue reading →