Adventures in Serverland

Setting up my own web server is something I’ve wanted to do for a very long time. Of course, perhaps more even than with consumer technology, knowing what hardware to buy, what OS to run & what software to install is a minefield for the uneducated. I learned this the hard way a few years ago when I bought a Compaq ProLiant 1600 (£30 from eBay) which ended up sitting useless for a few months before being disposed of.

That system had a pair of 550MHz Pentium 3 CPUs, 512MB of ECC SDRAM, a DDS2 tape drive and four 9.1GB SCSI hard drives – two of which were DOA. Using the logic that ‘the world runs on Windows’ (flawed), I loaded up Windows Server 2000 and…well, that’s where the dream died. Determined to make use of it, I left it sharing Zappa bootlegs on the network for a while before canning it. I actually backed up a ton of rare Zappa material to DDS2, which I can’t read thanks to the fact that the drive used to create the tapes has been recycled into a washing machine or something.

I learned a few lessons from this episode:

You can’t buy a useful server from eBay for £30 (delivered)

Running Windows is most certainly not a ‘must’

Don’t back important data up to an obsolete tape format

You can’t treat a server like just another desktop PC

HARDWARE

Bearing this in mind, I immediately broke one of my rules and headed straight back for the ‘bay. My budget dictated this more than anything, but I actually found that in the nearly 5 years since purchasing my 1600, the selection of used servers had grown to be quite excellent, with ‘recycling’ companies up and down the company flooding the site with very cheap equipment pulled from corporate datacenters. I wanted a machine with multiple processors, 2GB RAM (with room for expansion) and two hard drives (again, with room for expansion). Oh, and I didn’t really want to pay more than £60.

I considered a Sun unit, but found them to be too expensive – the SPARC architecture limited the range of available software also. I decided instead to settle for an x86 machine, and found an abundance of HP DL360 1U servers within my budget, however the small size meant there was no room for more than 2 hard drives. After some more research I discovered its bigger brother, the 2U DL380, with space for 6 SCSI disks – a perfect candidate. For a tenner above my original budget, I got a dual 2.8GHz Xeon (512K L2/400MHz FSB) DL380 G3, with a pair of 72GB 10K SCSI hard drives (with room for 4 more) and 2GB ECC DDR RAM.

SOFTWARE

This was a little more tricky. It’s fantastic that the open source community provides so many variations of their software and makes them all freely available, but for a novice (like me) the selection was a little bewildering. I’m bad enough at choosing a movie on iTunes, let alone narrowing down the dozens of Linux distributions. I decided to choose a few and try them all – the software, after all, is free, so trying a few flavours cost me nothing but a stack of CD-Rs.

The OS choices I ended up with were:

Debian Linux

Oracle Enterprise Linux

Ubuntu 10.04 Server

Sun Solaris 10

OpenSolaris

Linux has a reputation in this field, so I wanted to try a few versions, including both Debian- and Red Hat-type distributions, but also wanted to test Solaris as well, for balance.

Although HP list support for Solaris 10 on their website, OpenSolaris wouldn’t boot properly, and while Solaris 10 installed, it forced itself to run in Maintenance Mode at each boot, effectively cutting those two options out. This left only the Linux distributions. I’m sure open source geeks debate over different distros like desktop geeks debate Mac OS versus Windows, but for me the choice was simple – zero bias, just whichever one I could get to work the easiest and the quickest with FTP, SSH and Apache.

I tried Oracle Enterprise first, which installed with zero hassle. It appealed to me because it came with a good selection of software and included the KDE desktop environment by default. And the picture of Tux in armour was also quite cool. I’m sure that Enterprise Linux is a good product, however its focus on security made it difficult to configure for a newbie like me – a good product, but much better suited to a larger application (I guess the name should have been a clue).

Next, I loaded up Debian. Interestingly, Debian either comes on about 20 CDs, or you can just download a single ISO and install from the internet, downloading only the packages you really need ‘on the fly’ during the installation process. This worked very smoothly, no need for extra configuration (drivers included and interface configured by DHCP) and actually didn’t take that much longer than a regular physical media install. Debian also came with a desktop environment, so I set up VNC which worked very nicely indeed. In fact, FTP and SSH both worked straight away, however I ran into a problem pretty rapidly when trying to set permissions…and doing anything else useful, for that matter. Whenever I invoked the ‘sudo’ command, I was informed that I was not on the sudoers list (and that the ‘incident’ would be reported). Whenever I logged into SSH as root, the same thing happened. Perhaps there was something wrong during the install, but it was pretty crippling not being able to access the superuser. You also couldn’t log in as root to the desktop environment over VNC or locally, which rendered the system fairly useless.

Lastly, Ubuntu 10.04. The installation was ugly, but very smooth. This version didn’t include a desktop environment, instead booted straight to the command line, forcing me to learn some terminal commands to operate the server. This turned out to be a real blessing – Ubuntu is very well supported, and being forced into the command line gives you instant access to the most powerful services. Everything worked great, actually. Aside from a few headaches with remote permissions for FTP (solved by switching to a different FTP server), Ubuntu has been very easy and trouble-free.

Anyway, now that the machine is configured and up & running, I can start to make it do useful things, starting with hosting this blog. Future modifications and additions will be documented here.