Archive for August 2nd, 2008

Go virtual to consolidate those servers

For several years I’ve been running Linux-based servers for hosting web sites and email, both for myself and several friends. These have worked remarkably well and served (pardon the pun) me well, but I felt it was time to change.

For my day job I’m writing a fairly large-scale ASP.Net application, and I thought it was time to get a Windows based server, and thanks to a decent offer from my web hosts, ThePlanet, I could get a dual-core Xeon server with a couple of gigs of ram for a reasonable price.

The new machine was considerably more powerful than either older server, which were long in the tooth by current standards, and I thought it was time to move all the sites and emails on the other two servers to the new one, both saving me money (important!) and keeping things nicely under one (virtual) roof.

Most of the existing sites are simple static html pages, which were obviously easy to move; other sites, however, and email were a more difficult proposition.

Firstly, most of the sites rely on PHP / MySQL extensively, the majority of those moved over to PHP on IIS6 without major hassle, with the Windows version of MySQL working happily with minimal changes (there were some hard-coded paths, for example). Ironically enough, this very blog is using WordPress, which can be made to run on IIS, however when I first set it up I created friendly URLs, which use the apache feature mod_rewrite. Unfortunately, IIS6 doesn’t have an equivalent feature, although there are several commercial replacements I didn’t feel like spending more money on a feature for this blog which I used to get for free.

That was problem number one.

Problem number two was the email system. I’ve been happily using postfix for years to handle email and as far as I’m concerned nothing on the Windows side touches it for flexibility and power. I did, briefly, consider trying to get it working using cygwin, but I dismissed that as a really bad idea.

So, I had web sites that wanted a LAMP environment, and an email system that is very much rooted in a unix-like O/S, and I was running windows. When the going gets tough, the tough go get VMWare Server and JeOS.

I’ve been using VMWare Worsktation for years for my day job, it allows me to test applications over multiple operating systems and in later versions easily debug apps in the virtual machines from Visual Studio, so I decided to use their free server virtualisation tech over Microsoft’s own Virtual Server. For the virtual server I chose to create a custom appliance from JeOS, installing Postfix, the LAMP stack, and Dovecot for POP / IMAP access; all installed using apt-get, also used for keeping the system up to date, very simple.

It was given its own IP address from the bank allocated to the server (important to make sure Windows isn’t also bound to that IP, this is effectively another server, remember), configured it to start when the host starts, and everything is ticking away nicely.

The final result is consolidating three servers into one physical and one virtual machine, giving me both ASP.Net development capability with the addition of the ability to continue to run my legacy LAMP based sites. Well worth the effort.

August 2nd, 2008


Calendar

August 2008
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

Posts by Month

Posts by Category