All in the <head>

– Ponderings & code by Drew McLellan –

– Live from The Internets since 2003 –

About

About Drew McLellan

Photo of Drew McLellan

Drew McLellan has been hacking on the web since around 1996 following an unfortunate incident with a margarine tub. Since then he’s spread himself between both front- and back-end development projects, and now is Director and Senior Web Developer at edgeofmyseat.com in Maidenhead, UK (GEO: 51.5217, -0.7177). Prior to this, Drew was a Web Developer for Yahoo!, and before that primarily worked as a technical lead within design and branding agencies for clients such as Nissan, Goodyear Dunlop, Siemens/Bosch, Caburys, ICI Dulux and Virgin.net. Somewhere along the way, Drew managed to get himself embroiled with Dreamweaver and was made an early Macromedia Evangelist for that product. This lead to book deals, public appearances, fame, glory, and his eventual downfall.

Picking himself up again, Drew is now a strong advocate for best practises, and is currently Group Lead for The Web Standards Project. He has had articles published by A List Apart, Adobe, and O’Reilly Media’s XML.com, mostly due to mistaken identity. Drew is a proponent of the lower-case semantic web, and is currently expending energies in the direction of the microformats movement, with particular interests in making parsers an off-the-shelf commodity and developing simple UI conventions. He writes here at all in the head and, with a little help from his friends, at 24 ways.

Running a Development Server

4 May 2004

I’ve mentioned a few times how I run a Linux-based server for our PHP development projects at work. I find this works well for us, as the projects we work on are generally deployed on Linux web servers, so the commonality helps keeps deployments simple. Prior to this, PHP development was being carried out on a Windows server. The big advantage of this was that it was very quick and easy to set up and to integrate with the Windows-based development environment. The big downside was that it repeatedly stung the team in the bum when it came to deploying to Linux servers.

So what’s involved in running a Linux server for development? To be honest – not a lot. There’s a few new things to learn if you’ve not used Linux and Apache before, but they’re not that tricky. If you run a Mac with OS X, chances are a lot of it won’t be too different anyway.

People will often say that if you’re running a Linux server you really need to know what you’re doing and shouldn’t attempt it without a strong stomach a four-year spell researching network security issues. However, if you’re just talking about running a small web server with trusted users and within a secured LAN (i.e. separated from the internet by some sort of proper firewalling device), then you’re fine to give it a go. Linux is inherently security aware – and that’s why you see so many people harping on about how important it is. Security is a core issue with Linux – it’s on the top of the important features list. So as long as you’re not directly connected to the net, you can be fairly relaxed about it.

If your team isn’t too big (here we tend to have three developers and a project manager working on a project at one time), then you’re not going to need ‘server grade’ hardware. My server is a run-of-the-mill Dell Dimension desktop machine. It’s a Pentium III 800Mhz, which is pretty snappy for this sort of work. At home I have an old AMD K6 400Mhz machine performing the same sort of task, but for fewer users. The bottom line: you don’t need amazing hardware. A workstation that’s falling off the bottom of the upgrade tree is good enough. As a baseline, try to aim for at least 400Mhz and 256Mb RAM.

Of course, it’ll need a network card, a video card, a CD drive, and a hard disc big enough for a few hundred MB of operating system and then all your project files. Keyboard and monitor are essential for installation, but won’t be used much after that.

One of issues it pays to be aware of when selecting hardware for Linux, is that Linux doesn’t have as wide a range of device drivers as other operating systems. This only tends to be an issue if you hardware is either extremely new (like some new fancy pants graphics card), very obscure (like an unbranded network card found at the bottom of a dusty box at the back of a cupboard), or very old (like The Ark). However, it pays to know exactly what hardware you have. Before I start an installation, I usually take each card out of the machine and make a note off all the markings and numbers on it. You’d be amazed at what you can Google for :)

When it comes to choosing an Linux distribution (RedHat, Fedora, SuSE, Mandrake etc) it’s very much a matter of personal preference. That said, I’ve tried a lot of different distros over the years and my favorite for this sort of task is Debian. Although it can be a little trickier to install than some of the more graphical distros, it’s extremely easy to work with once it’s up and running – and for me, that’s way more important. That said, installation is still pretty simple – if you can cope with coding in something like PHP, then installing Debian should be an issue. If you’ve heard anything about Debian before, you may have heard about it’s package-management tool, APT. It’s APT that makes running Debian so simple. For example, if you decide you’d like to use phpMyAdmin on your server, all you need to do is type:

apt-get install phpmyadmin

Agree to any prompts, and that’s it, it’s installed. It’s that level of convenience which makes it worth braving a trickier installer. Beside which, in the next release of Debian (due this summer some time), the installer has been improved and is much more straightforward.

My server has been running now for 95 days without a reboot – and the only reason it was rebooted 95 days ago was because I took out some spare hardware. It’s so useful and so reliable that I’d encourage anyone who’s still limping along without a proper development server to go ahead and give it a go. It’s not scary, it won’t bite, and it’s worth every ounce of the effort.

- Drew McLellan

Comments

  1. § Thomas: While I share your opinion about a running Debian my experiences with the installer weren’t that happy. It took me about 2 hours to answer a lot of questions and although I’m quite confident that I gave the right answers I got nothing but a system that couldn’t even start a proper X server.

    Fortunately I discovered a nice “work around”. Knoppix is actually meant to be a debian based cd live system with hardware auto detection. Never the less it comes with an excellent install script that creates a fully featured hard disk installation in a couple of minutes. And the only question I can remember was which partition to use and whether to install a boot manager.
  2. § Jesse Rodgers: Use Fedora ;) apt-get works there too… A lot of Debian faithful around here are moving to Fedora.
  3. § Chris Peden: Linux is kewl, but how about some real UNIX.

    www.freebsd.org

Photographs

Work With Me

edgeofmyseat.com logo

At edgeofmyseat.com we build custom content management systems, ecommerce solutions and develop web apps.

Recent Links

Affiliation

  • Web Standards Project
  • Britpack
  • 24 ways