A home Linux server? $1200?

ExtremeTech has an article about building a home Linux server. They’re recommending high-end P4s for the task. And I say, get real.
If what you want is a simple file/print server, anything that’ll take a 100-megabit NIC and has room for some good-sized hard drives will do great. You want a machine that’s running its PCI bus at 33 MHz, so a Pentium-133 is a better server than a Pentium-120, or, believe it or not, a Pentium-150. If the machine is marginal, get something other than an $8 D-Link 10/100 card or another card with the RealTek 8139 chipset. A pricier 3Com or Intel card will conserve CPU cycles for you.

Remember, too, that Linux doesn’t use the BIOS, so if a machine refuses to recognize that 200-gig hard drive you just bought, set the drive type to “none” in the BIOS and keep another, smaller drive in the system to boot from. Linux will pick up the monster drive and use it.

SCSI is much better for servers than IDE, but when two or three people (or one person) will be using it, the only advantage SCSI really offers is being better-built.

And the video recommendations in the article are absolutely ridiculous. You don’t need a GeForce 4MX 420. Dig around in your parts closet and find that 1-meg PCI video card you bought back in 1995 and haven’t used in five years. We’re talking a system that’s going to be using text mode. Or buy the very cheapest OEM AGP video card you can find to save a PCI slot for something useful–last time I looked, Newegg.com had a cheap AGP card based on an old ATI chipset for 18 bucks.

So don’t listen to those guys. If you want to build a Linux server and all you’ve got to work with is a Pentium-100, go for it. It won’t perform like their aging 1.13 GHz P3 (the slower machine in their benchmarks) but for a home network, it’s plenty. Keep in mind this Website is running off a P2-450. I’ve watched it under heavy traffic. There are two bottlenecks when it’s serving files to someone on broadband: My DSL connection, and the Web browser on the other side. The only time I’ve ever seen CPU usage on this box top 50% for more than a few seconds is when someone loads that giant GPS thread (the post with more than 200 comments).

Just be aware that some Linux distros aren’t too wild about older BIOSes. I’ve got a P133 that won’t boot the Mandrake 7.2 CD (yeah, it’s old–that’s how long it’s been since I used Mandrake) or the Debian 3.0 CD, but Debian 2.2 works fine. So be aware that you might have to experiment a little.

A useful Debian tool

apt-sources downloads a current list of Debian mirrors and benchmarks them, then writes an /etc/apt/apt-sources file for you, thus giving you an up-to-date and fastest-possible source of downloads.
It takes a while to run but if you do a lot of apt-getting, it’s likely to be worthwhile.

Patch your Linux distros

There’s a nasty vulnerability in recent SSL libraries that an Apache-based worm is currently exploiting. The patch is obviously the most critical on machines that are running secure Apache sites. But if you don’t like vulnerabilities, and you shouldn’t, go get your distribution’s latest updates.
This is why I like Debian; a simple apt-get update && apt-get upgrade brings me right up to speed.

CERT pointed out that Apache installations that contain the ServerTokens ProductOnly directive in their httpd.conf file aren’t affected. (I added it under the ServerName directive in my file–it’s not present at all in Debian by default.) This will hurt Linux’s standings in Netcraft, but are you more interested in security or advocacy? Increasingly, I’m more interested in security. No point in bragging that you’re more secure than Windows. Someone might make you prove it. I’d rather let someone else prove it.

While you’re making Apache volunteer as little information as possible, you might as well make the rest of your OS as quiet as possible too. You can find some information on that in an earlier post here.

Replacing my IDE CD-ROM with a SCSI CD-ROM

I pulled the IDE CD-ROM drive out of my main Linux box today and replaced it with a SCSI model, mostly because I like to keep a spare IDE CD-ROM drive loose and I had a couple of Toshiba 4X CD-ROM drives in my closet. I don’t use the CD-ROM drive in my Linux box very much, so a 4X is fine. Plus, making my Linux box into an all-SCSI system means I can compile out all the IDE support in my kernel if I ever feel ambitious.
I can never remember how to tell Linux I’ve swapped drives though. I’ve had to do this a number of times because not all my SCSI cards support bootable CDs, but all of my systems can boot off an IDE CD-ROM drive, so all too often I do my Linux install with an IDE drive.

The trick is to remember that SCSI CD-ROM devices are named srx, where x is a number. So when I installed a single SCSI CD-ROM, it became sr0.

So I went into /etc/fstab and found a line that looked like this:

/dev/cdrom /cdrom iso9660 defaults,ro,user,noauto 0 0

As far as I can tell, /dev/cdrom is a special device Debian creates during installation. I changed it to this:

/dev/sr0 /cdrom iso9660 defaults,ro,user,noauto 0 0

Now I can mount a cdrom from a command line with this command:

mount /cdrom

The unauthorized biography of rms

I’ve been reading an unauthorized biography of rms. Interesting. The guy’s so idealistic he still really, really annoys me, but he’s a typical, old-fashioned activist. Blaming an activist for being idealistic and unrealistic (and unreasonable) is like blaming a dog for barking. Yeah, it’s annoying, but it’s what dogs and activists do.
I’ve read the first two chapters earlier this week, but so far it seems to be pretty well done. I’ll be back later to read more, definitely.

An interesting type of cluster computing

Now here’s something that seems interesting and useful. The two times I want to cluster are when I’m rendering video (ick) or compiling something massive like KDE or Mozilla (quadruple ick).
Enter distcc, which lets you spread your C/C++ compiling out over a network.

The most obvious use for this would be source-based Linux distros like Gentoo, since those compiles take forever and most people who are interested in compiling Gentoo already have an army of existing Linux boxes.

If they succeed in getting distcc and Gentoo working together, I’ll give Gentoo a serious look. None of my machines are quick enough to build everything I’d want in a reasonable length of time, especially considering GCC 3.1’s slower speed. And what’s the point of using Gentoo if you’re not the first on the block with the compiler that generates the fastest code? But if I can distribute the load across my Duron-700, my dual Celeron-500, and whatever else I can scrounge up (which ranges from my work-owned P3-700 laptop down to a 66 MHz 486–I’ll probably keep the 486 on the bench), I’m willing to look at it.

The best Linux distro meets the best file system

So what’s so special about this server? It’s running Debian 3.0 on XFS, which is SGI’s industrial-strength journaling file system. It’s faster than ext3, more feature-complete than ReiserFS, and it’s been reliably shuffling bits as part of SGI’s IRIX operating system for the better part of a decade. You know you want it.
Read more

So you think Linux is unproven?

I’ve had arguments at work with one of the managers as to whether Linux is up to the task of running an enterprise-class Web server. When I mention my record with Linux running this site, the manager dismisses it, never mind that this site gets more traffic than a lot of the sites we run at work. So I went looking this afternoon for some sites that run on Linux, Apache, and PHP, like this one does.
I found a bunch of small-timers. Read more

Update your BIND servers

A buffer overflow vulnerability exists in a large number of versions of BIND. CERT released an advisory over the weekend. I haven’t seen this on most news sites yet. Read more

An easy way to get Debian 3.0 before you can buy it

Debian 3.0 hasn’t officially been released yet, but that hasn’t stopped people from making unofficial installation floppies and CDs.
I just built a Debian 3.0 system that will be hosting this site and another (I’m not going to talk yet about the other site, but it won’t be hosted by R. Collins Farquhar IV–do I hear cheers?–and it won’t be fiction). I used this 185 MB CD image to do the install. The system used up a whopping 88 megs when I finished initial installation. After I installed Apache, MySQL and PHP4 to make a usable web server, disk usage rocketed to 118 megs. Not shabby at all in this era of multi-gigabyte installs. Read more