Thursday, March 24, 2011

FreeBSD : it's what your server want

FreeBSD is a Unix operating system that runs especially well on generic Intel-compatible hardware.

FreeBSD doesn't do anything special. In fact, anything I can do on my favorite OS, you can do on yours. So, what's so great about FreeBSD? It just works. In fact, it always works. It never stops working. After using FreeBSD on all my web servers for the past 6 years, I really appreciate how little time I spend in the server room, messing with system configurations, plugging security holes, running out of system resources, and buying new hardware just to serve up a bunch of web sites.

So here is my list of reasons why you, too, should switch your servers to FreeBSD.
  1. Stability (even on old hardware)
    FreeBSD never crashes. I run about 50 web sites, on two regular Pentium boxes (one is 700Mhz PIII).

    Each box runs a web server (Apache/PHP) and a database server (MySQL). These boxes handle about 200,000 hits/day, and are constantly serving up dynamic content.

    In the past 6 years I've restarted these web servers only a handful of times, to upgrade the OS or hardware - never because of an application or OS crash.

    Running the command 'top' usually tells me that the box is 92% - 99% idle. Memory management, and managing it's own system resources seems to be one of FreeBSD's best features.

    Proof is available on Netcraft's ongoing survey of sites with the longest average uptimes - notice the 'OS' column

  2. Ports
    The 'ports' tree is FreeBSD's software management system. Here's what I do if I hear about a cool new application that I'd like to install - in this case it's 'qmail' a UNIX mail server application similar to 'sendmail'. (The non-bold type preceded by the '$' prompt is what I would type. The bold text is the computer's response)
    $ whereis qmail qmail: /usr/ports/mail/qmail $ cd /usr/ports/mail/qmail $ make install
    The ports installer, goes out on the internet, finds the latest version of 'qmail', and any dependencies, downloads the sources, compiles and installs the application, and registers the new software in it's internal database. I can type pkg_info, and I'll see a list of all software I've installed with ports.

  3. Keeping up-to-date with CVSup
    Updating the version of FreeBSD is so easy. 'CVSup' is a software package that can be used to keep your server's OS in sync with the current version of FreeBSD. When a new STABLE version of FreeBSD is released, here's what I do:
    # Download the current source files $ cd /usr/share/examples/cvsup $ cvsup -g -L 2 stable-supfile $ rm -rf /usr/obj $ cd /usr/src $ make update $ make buildworld $ make buildkernel # Install new Kernel and reboot $ make installkernel $ reboot # Install new source $ cd /usr/src $ make installworld $ mergemaster $ reboot
    For mergemaster, I basically type 'i' for most of the files (which installs the newer configuration file). Type 'd' to keep your original config file...

    CVSup goes to the FreeBSD web site (or the nearest mirror), downloads all new source file (it's smart enough to only download source files that have changed), and then I'm ready to runa handful of commands and reboot. The only command that requires any brain cells to run is mergemaster, and possibly 'cvsup' (since you will edit the file /usr/share/examples/cvsup/stable-supfile to point to a mirror near you).

    FreeBSD, unlike some other OSs, is centralized, unified, and doesn't release a new version every two weeks, so you won't be upgrading every-other Friday afternoon. When you do upgrade, there are rarely drastic changes that require any intervention.

  4. Bonus Features:

No comments:

Post a Comment