FreeBSD: The best server OS.

I've configured and maintained over 100 UNIX-based servers over the years starting with Slackware Linux 2.0 back in 1995.  Over all course of all the deployments I've become very biased about my operating systems.  Linux clearly has a solid lead with desktop applications, but for server deployments and maintainability, I believe firmly in FreeBSD.

When talking about operating systems, there are a lot of points to debate about.  The big deal used to be which one was more stable and which one supported the crazy file system configurations none of us normal people will ever use.  Well, they are all fairly stable now (yes, even Windows) and honestly who is going to set up 10 machines with a distributed ReiserFS?  People today seem to be obsessed with micro kernel details such as the process scheduler, something you may never understand and probably will never see a significant performance change from switching on.  This leaves me with the real issues, such as:

1) Upgrades
    How hard is it to upgrade software? 
    How seamless is it? 
    How much pain must you go through? 
    How much specialized knowledge is involved?

2) Software Compatibility
    Does software compile/run easily for this platform? 
    Where do I get it? 
    Does it integrate easily? 
    Do I need specialized knowledge to do this?

3) Configurability
    How hard is it to make the changes I want to? 
    How do I help myself learn the OS? 
    Is everything fairly standard? 
    Do I lose my changes when I upgrade?

Obviously different distributions of Linux have different scripts and standard locations so it's slightly difficult to compare apples to apples here but I'll do my best basing my experience off of Slackware, Debian, Redhat, Gentoo, Mandrake and Ubuntu.  I'd also like to note that Windows isn't included in this comparison simply because it follows a completely different paradigm.  One of my serious server OS requirements is that the OS allows for extensibility, that is, adding functionality easily where it didn't previously exist, which, through Windows, is virtually impossible without purchasing additional software.  UNIX-based operating systems are fundamentally extensible.  I'll write another article on that later.

FreeBSD has a very standard directory structure:

/boot -> kernel and any other bootable files
/root -> The user, "root", home directory
/bin -> System binary executables runnable by root and normal users
/sbin -> System binary executables runnable only by root
/lib -> System shared library files
/var -> Logs, runtime process locks
/etc -> System configuration
/tmp -> Temporary files
/usr -> Userland files (non-system)
/usr/home -> Users' homes
/usr/lib /usr/bin /usr/sbin -> Same as previous except non-system
/usr/local -> Userland files specific to the local installation
/usr/local/lib /usr/local/bin /usr/local/ec -> Same as previous except for locally installed applications

Given this, I could tell you where any configuration file may be depending on if it's system-level (such as a boot-up sequence) or if it's an installed application (like apache).  While Linux distributions also support this, they often times don't strictly adhere to it, as in, you will find many packages' binaries installed into /usr/bin where in FreeBSD they'd certainly be in /usr/local/bin.  Linux also tends to put all configuration for almost everything in /etc.  For this reason I feel that FreeBSD is more disciplined and easier to work with.

Here is the official FreeBSD directory structure description

Configuring and updating the operating system:

rc.conf.  /etc/rc.conf is the file read by all startup scripts to determine if they are allowed to start and if so, what the flags are for starting.  rc.conf is very human readable and you can easily turn on and configure any supported service in it.  If you need to know what flags or options are available, you just look at /etc/defaults/rc.conf.  I always find what I need for start up there.

FreeBSD can be fully updated and recompiled via CVS.  There is a utility called CVSUP which allows for you to update just one part of the operating system or the entire system.  I've known people to script a nightly update and build that downloads the latest source for their branch of FreeBSD, recompiles and reboots every single night.

Installing applications via the ports tree:

FreeBSD pioneered the ports tree and it still works well.  What is the ports tree?  It's a collection of software sources configured and patched for FreeBSD.  The way to install one is to go to the port and run "make install."  It's very simple.  It also installs all dependent applications as it goes.  Gentoo had a similar system in which you could emerge ports.  It was based on the same basic concept as this.  Ports tree too old?  Update it in one command with CVSUP (mentioned previously).

Other Technologies:

Linux Compatibility:  Yes, FreeBSD offers Linux Compatibility.  You can natively run linux binaries with the support installed and enabled.  I've done this to run versions of Java that aren't able to be compiled natively for BSD.

Networking & Files:  FreeBSD's ipfw is a fantastic tool.  I use it for all my packet queuing, firewalls, logging and any other network gateway-related activity.  It can do almost anything.  FreeBSD also features a journaled filesystem and some recovery tools which have saved me from devastating data loss in the past.

Summary:

I'm not going to get into all of the other reasons I prefer using UNIX, because there are too many, but specifically for FreeBSD, these small things add up to big savings in administration time and less headaches.  I try not to get too focused on one specific technology when evaluating an operating system.  I try more to look specifically at where the savings are for me.  I simply want the operating system to support what I'm trying to do in the least amount of time feasible and I believe FreeBSD does that for me.  If you're pragmatic and functional and are willing to learn a little UNIX, I highly recommend giving FreeBSD a try as your server operating system.

15 Comments

Post a comment here or discuss this and other topics in the forums

re: FreeBSD: The best server OS.

One of my serious server OS requirements is that the OS allows for extensibility, that is, adding functionality easily where it didn't previously exist, which, through Windows, is virtually impossible without purchasing additional software. UNIX-based operating systems are fundamentally extensible.Although I agree that Unix makes a better server than Windows (although I much prefer Linux to FreeBSD myself), I have to disagree with this particular point. Most open source tools run on Windows too, these days, and most Unix systems have their own share of commercial proprietary applications.

re: FreeBSD: The best server OS.

Your comments on /usr/local/bin do not make a lot of sense. /usr/local/bin is for packages installed by the admin, that are not part of the distribution. So, If I compile some user land software, it's binaries go in /usr/local/bin. If I install user land software from the distribution repositories, it should be in /usr/bin.

re: FreeBSD: The best server OS.

Yes, however Windows itself does not use the same messaging paradigm (pipes) that UNIX uses which you will typically see broken down into small functions (grep, awk, sed, cut, sort, uniq, etc...) which allow for simple chaining of commands for complex data manipulation without adding any additional software. That's the UNIX way. You can always build cygwin and run unix utils in Windows but it's not quite the same.

re: FreeBSD: The best server OS.

I think you are confusing "Userland" with "User-Installed." Userland simply means 'not provided or required by the core system.' Both applications installed in /usr and /usr/home are userland, but ones in /usr are shared for all users to run (installed by the administrator) vs installed by a user and only intended for that user to run.

re: FreeBSD: The best server OS.

I found your comments to be nicely stated in terms of what FreeBSD can do and why you consider it to be the best server operating system for your specific needs. The one thing I did not see is any actual comparison to other servers and why FreeBSD met your needs better than the others.For completeness, I would be interested in seeing that information.Other than that, this still comes down to a matter of preference. For you, FreeBSD works better than the others. No doubt FreeBSD is an excellent server operating system. Other people may take issue and say they like some other server operating system.I do not think either is necessarily right or wrong. What I think is important is to discuss under what circumstances a particular system is especially appropriate for certain tasks.It would be nice if you could discuss that. If not, this was still interesting. Without further information, that's where this falls, in the category of "interesting". Any additional comparisons which highlight what FreeBSD does versus what other systems do would be helpful.Thanks again for your interesting article.Brian

re: FreeBSD: The best server OS.

So, If I compile some user land software, it's binaries go in /usr/local/bin. If I install user land software from the distribution repositories, it should be in /usr/bin.No. Ports are installed to /usr/local.Distribution repositories? This is FreeBSD, not Ubuntu.

re: FreeBSD: The best server OS.

The one thing I did not see is any actual comparison to other servers and why FreeBSD met your needs better than the others.FWIW, here is a short list of FBSD features that I find invaluable. Each is already available as part of a default installation.

  • FreeBSD Jails (easy to maintain/update many different servers on one box; low overhead). This feature alone keeps me with FBSD. I don't have to install virtualization software or heavily modify a kernel for this to work, either.
  • Ability to upgrade base system easily, remotely, from the command line. Tried, tested, and true.
  • Valuable facilities to secure various types of installations through securelevels (which allows you to truly make files immutable - even to root - among other things).
  • Fantastic documentation: the manpages are readable, up-to-date, and useful. The handbook is maintained and provides useful guidance for a large range of issues.
  • Flexible software management - ports. You set up options at compile time. When ports break, it's almost invariably a case of PEBKAC.

re: FreeBSD: The best server OS.

anomie: While I don't use jails, I forget to list these things because I tend to take some of these features for granted. Thank you for listing them.

re: FreeBSD: The best server OS.

I would like to mention here a great distro not because you forgot to mention it but because it deserves more credit. It's called Arch Linux http://www.archlinux.orgThank you

re: FreeBSD: The best server OS.

Dear Robert,I've found your arguments quite interesting. My experiences are with the management of Debian GNU/Linux and FreeBSD servers (home and small businesses).Pros for FreeBSD : excellent documentation, impressive stability, lean but complete inital setup, i LOVE rc.conf.Pros for Debian : packages choice, OS upgrades are so smooth with aptitude, OS virtualization with linux-vserver/open-vz is clearly easier to manage than BSD jails.Pros for both environments : gcc support, easy initial installation, robust default filesystem (UFS2 or EXT3), easy installation of packages, easy application of security updates (for default kernels).My conclusion : FreeBSD and Debian/Linux are really fine OS and, for my part, I found it more and more difficult to choose between them. We are blessed to have free access to these OS and their respective communities!

re: FreeBSD: The best server OS.

Excellent article! I too would like to hear more of the rest of your choices for using FreeBSD.For me, I find that the biggest drawback of FreeBSD is the monolithic distribution "core" (which is updated via "make world"). In all of the Linux (and UNIX) package-based distributions I know of, the entire system is wrapped in the packages. BSD is not so.This means that upgrading anything in the base system is a pain and may tend to get put off more than others. It also means that the base is untouched - unstripped - not slimmable. If its in the core and you don't want it, you get it anyway.If you "upgrade" to a newer version of whatever via ports, the base system is untouched. Now you have two versions - which is running?As much as I've gone into this, I love FreeBSD. It is unfortunate that companies like Oracle don't certify their products on FreeBSD.

re: FreeBSD: The best server OS.

I agree with a lot of the statements in the article, I've been using FreeBSD for quite a while now and it's fantastic.An important point noted is that FreeBSD is disciplined which keeps my sanity in tact.The drawback/headache I find with Linux distros is that there doesn't seem to be any discipline - files are located in different parts of the file system depending on which distro and even which release you're working on.Hop on almost any FreeBSD machine and you'll feel at home, know where the config files are and how to install/modify your apps.Not a lot of bells and whistles, but it gets the job done and is super stable.

re: FreeBSD: The best server OS.

FreeBSD has always been OS of my choice. At work I use Linux ( just because of requirement ) but at home I've two PCs running FreeBSD 7. Utilities like portsnap, portaudit and portupgrade works as magic :) . Very easy to update OS kernel and packages as well.Simply ..FreeBSD rocks !

re: FreeBSD: The best server OS.

may I have an url for tutorial installation and configuration FreeBSD for server ?thank you

re: FreeBSD: The best server OS.

Post new comment

The content of this field is kept private and will not be shown publicly.
Add image
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Image links with 'rel="lightshow"' in the <a> tag will appear in a Lightbox slideshow when clicked on.
  • Links to HTML content with 'rel="lightframe"' in the <a> tag will appear in a Lightbox when clicked on.
  • Links to video content with 'rel="lightvideo"' in the <a> tag will appear in a Lightbox when clicked on.
  • Links to inline or modal content with 'rel="lightmodal"' in the <a> tag will appear in a Lightbox when clicked on.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.