Introduction


If you're reading this book, chances are good that you're a technical professional who makes a living from the Internet and its related industries. You've probably heard of the open-source software movementthe phenomenon of software developed by volunteers and distributed for free along with its source code so users can examine every feature's basic engineering and even modify or add to it. You're probably interested in making open-source software work for you.

The chances are not so good, however, that you've heard of FreeBSD. The brightest star of the open-source software world today is the free Linux operating system, which has achieved the financial backing of software giants such as IBM and consistently steals headlines across the technology industry; but Linux is not the only open-source, freely available UNIX-style operating system available. Gaining few headlines, yet continuing to boast technical and philosophical advantages that elude its flashier cousin, FreeBSD is an older and yet more robust operating system whose roots extend back to the very beginnings of UNIX.

The merits of FreeBSD include an implementation of the TCP/IP networking stack that is widely regarded as the best in the industry and the reference implementation to which other software developers look for guidance. It also boasts a rock-solid microkernel architecture that can be tuned for performance that often exceeds that of Linux in the same rigorous test and production environments. FreeBSD's packaging system for third-party application software is a model of efficiency and simplicity; and because all of FreeBSD is developed by the same core of dedicated developers, from the kernel to the smallest supporting programs, the same level of attention is paid to the entire system in a way that is seldom seen in the Linux world. Differences such as these between FreeBSD and Linux abound wherever you look, no matter how similar the two systems might appear on the surface. Where, however, do these differences originate?

A frequently overlooked fact is that Linux is not UNIX. It's more properly called "UNIXlike," in that it performs the same functions that most commercially sold UNIX variants do. However, it was developed entirely by its user community from original code, hence the recursive prefix of GNU ("GNU's Not UNIX"). The guiding principles of the project are embodied in the GPL (GNU General Public License), which states, in part, that any code developed under it must be made freely available to the public. This extends to commercial software development entities, which must rerelease any software that they develop from GPL-licensed materials as freely available source code.

If there is any single strong point of contention between the supporters of open-source and those of commercial software, it is this seemingly innocent license. The problem is that many companies are unwilling to abide by its terms because, to them, giving away the source code that they develop is tantamount to publishing trade secrets. GPL-based software embodies an ideal: the notion of software written by the people, for the people, owned by nobody, and leveraged by everybody. It is the antithesis of commercial, closed-source softwaresold in compiled, executable form from only one supplier. Linux adheres to that ideal in a number of important ways, but the unattractiveness of the spirit of the GPL to business has caused many companies to decide against basing software on it. It is here, where the open-source ideal meets the market forces that drive the technology industry, that FreeBSD's advantages become clear.

FreeBSD and the Commercial Software Tradition

FreeBSD comes from a different open-source tradition than Linux does. It is not based on software developed under the GPL, but instead favors the BSD (Berkeley Software Design) open-source license that allows code originally developed at the University of California at Berkeley (and later commercially) to be reused in software development, whether or not the source is published. This is part of the reason why Steve Jobs' company, NeXT, chose the BSD operating system to form the core of the NeXTSTEP platform that later evolved into Mac OS X. Similarly, when Microsoft made overtures to the academic community in 2002 by releasing a programming environment for its C# language, it made it available on two operating systems: Windows and FreeBSD. The BSD license, lacking the requirement for developers to publish the "keys to the kingdom," is friendlier to commercial software companies than the GPL. It strikes a balance that encourages grass-roots contributions from users, but does not place undue restrictions on companies. This makes the companies more likely to use their resources to develop BSD-licensed software into truly great products.

Linux's runaway popularity has meant that FreeBSD has had to fight for its share of the spotlight; and whereas it used to be mentioned nearly as often as Linux in the tech press, today most of that glory has gone in Linux's direction. This does not, however, mean that FreeBSD is any less attractive a platform, especially from a purely technical standpoint. FreeBSD is still the reference platform for new code and features that are eventually folded into commercial products like Mac OS X. The advantages of FreeBSD's whole-system modelwith only one "distribution" and an ever-more-streamlined installation and software packaging processremain as valid today as ever. FreeBSD's software releases continue on schedule, keeping pace with the proliferation of emerging technologies (Wi-Fi, FireWire, and multicore symmetric multiprocessing, among others) so that a FreeBSD user can wring out every bit as much power as a Linux user can (more, in some cases), and can accomplish tasks still all but impossible in Windows.

What this means is that FreeBSD is for you if you are any of the following:

  • An academic with a need for a stable testing platform in a laboratory

  • An adventurous enthusiast who wants to explore the open-source desktop world

  • An engineer running a high-performance networking test topology

  • A website operator with a need for stability and a well-organized operating system layout

  • A software developer looking for the opportunity to contribute to commercial efforts like Mac OS X

  • Just someone who wants to be free from the trammels of closed-source software

The Benefits of FreeBSD

I had my first exposure to FreeBSD in 1997, with release version 2.2.2. What attracted me was that even at this early point in its development, Yahoo! had given it the nod as the platform of choice rather than Linux, and Hotmail (before it was taken over by Microsoft) used it side-by-side with Solaris to handle its extraordinary load of web-based email users. I considered these to be strong testimonials, and the convenient floppy-disk-based "net install" feature sealed the deal.

Since that time, FreeBSD has undergone significant evolution. The layout of the system has become increasingly organized; the security model has been iteratively tightened and enhanced; and the revolutionary "ports collection" mechanism for installing third-party software has been so successful that it has been ported to NetBSD, OpenBSD, and Mac OS X. It has also become easier and easier to migrate to FreeBSD from other platforms than it was when I first encountered it. The many commercial and open-source UNIX variants each have their own filesystem hierarchies and configuration methods, and learning each one can be like learning another foreign language; but FreeBSD's model, incorporating centralized configuration files and a tightly controlled filesystem structure, lends to more predictability and easier administration than elsewhere in the UNIX world. This makes it especially easy to learn for veterans of other UNIX platforms. Lastly, a Linux binary compatibility kernel module allows software that is commercially developed for Linux, such as RealPlayer and Oracle, to run on FreeBSD. Although FreeBSD doesn't enjoy the notoriety of Linux (or suffer from the backlash against that notoriety), it does provide nearly all the meaningful benefits one can have by running Linux, and many that are uniquely its own.

When it comes to open-source operating systems, Linux has the spotlightand probably will continue to have it for the foreseeable future. However, FreeBSD continues to hold its stake in the market, simply by being there as an alternative for companies wanting out of the Microsoft hegemony, but concerned by the politics inherent in backing Linux, or the uncertainty of choosing an appropriate distribution. Other BSD-licensed operating systems keep a firm grasp on their respective corners of the market: OpenBSD is focused on being the most secure operating system available, and NetBSD has bragging rights for being able to run on a vast number of different hardware platforms, from Intel's x86 architecture to the Motorola PowerPC to the Sega Dreamcast. FreeBSD's appeal is more general; it excels in the role of a full-featured Internet server or workstation on modern, top-grade hardware. It does so without excessive specialization and without being so politically charged as to alienate all-important corporate finance managers. It holds to a course that runs squarely between the extremes, and in the coming years it's likely to remain a well-respected player and the choice of the most demanding computing professionals in the world.

Twenty, or ten, or even five years ago, the state of the computer industry could not have been accurately predicted. We can't hope to imagine what the next decade or two will bring, but if FreeBSD's successful history is any indication, it will be with us as long as the open-source movement is relevant. Someday, the compromise between open-source flexibility and commercial assurance that FreeBSD represents may be the only type of platform that anyone can imagine.

How This Book Is Organized

FreeBSD Unleashed is written with the computer-savvy, technologically-curious reader in mind. My goal is to provide a thorough education in how to leverage whatever level of computer knowledge you might already have (whether in Windows or in UNIX) to get the most possible benefit out of a move to FreeBSD. Whether your goal is to migrate a high-profile corporate server to a fast, stable FreeBSD installation, to deploy a demanding test environment, or to set up a hobbyist machine for casual tinkering, this book gives you the know-how you need.

If you read this book from cover to cover, you will get a tour of FreeBSD, from initial installation procedures to high-level administration details and techniques. Depending on your experience with computers or FreeBSD, you might want to start at a chapter in the middle of the book that's pertinent to your needs. However, to get the fullest understanding of what makes FreeBSD a unique operating system and of the ideas behind its design, I encourage you to start at the beginning and with a fresh, guided installation of FreeBSD.

Whether you're reading FreeBSD Unleashed sequentially or searching for information on a specific task or topic, you'll appreciate the logical organization of this book's information:

  • Part I, "Introduction to FreeBSD," deals with installing FreeBSD for the first time. If this is your first FreeBSD installation, or if you need a refresher on how it's done, you should begin with this section.

  • Part II, "FreeBSD on the Desktop," provides an overview of the graphical user environments available on FreeBSD, with a focus on the well-developed KDE desktop system. This will be of use to you if you're unfamiliar with using the command-line interface of the shell, or if you're a more advanced user wanting to put FreeBSD to work as a desktop operating system. You can skip this part if you're an experienced shell user and are interested in FreeBSD more for its server capabilities than as a Windows replacement on your desk.

  • Part III, "FreeBSD on the Command Line," introduces you to the shell environment: the command-line interface central to FreeBSD and all UNIX-style operating systems. These chapters familiarize you with customizing the shell to fit your work style, automating your work with shell scripts, and the basics of programming in Perl.

  • Part IV, "System Administration," delves deeper into the details of customizing FreeBSD for your specific purposes. You learn how FreeBSD's filesystem is laid out, how users and permissions work, and how to configure and monitor the system's operation. This part of the book teaches you how to install and upgrade third-party software as well as FreeBSD itself, how to configure printing, and how to add more hard disk space configured exactly as you need it. Finally, you'll get a "FreeBSD Survival Guide"a quick reference chapter that gives you some of the most important tips and tricks necessary for successfully administering a FreeBSD system, including tips on how to tune your FreeBSD machine for maximum performance. Many of the tricks you learn here have taken UNIX gurus years of painful first-hand experience to learn.

  • Part V, "FreeBSD Networking," prepares you for the daunting task of turning your FreeBSD machine into a world-class Internet server platform. The tour begins with background information on TCP/IP networking and how to set it up in FreeBSD. Then it proceeds step-by-step through setting up email, web, database, FTP, and routing services, as well as DNS, Windows file sharing, and NFS. Network security is an extremely critical topic for anyone interested in running a network server, and one you should not miss.

  • Part VI, "Appendices," contains collections of information that are useful for reference regardless of your level of expertise. You'll find UNIX command definitions, listings of compatible hardware, troubleshooting guides, and a set of further sources for information that pick up where this book's usefulness leaves offat which point you'll presumably be an expert.

FreeBSD Unleashed, Third Edition covers FreeBSD 6.1, the most recent release as of mid-2006. The development of FreeBSD in prior years has proceeded deliberately, such that if you are working with a system running FreeBSD 5.x, most of what this book covers applies to you too. Significant differences between FreeBSD 6.x and the last few releases in the 5.x series will be discussed, though the primary focus will be on the usage and conventions of the 6.x series.

Conventions Used in This Book

Features in this book include the following:

Note

Notes give you comments and asides about the topic at hand, as well as full explanations of certain topics.


Tip

Tips provide great shortcuts and hints on how to work more effectively with FreeBSD.


Caution

Cautions warn you against making your life miserable by pointing out common pitfalls that snare the unwary.


In addition, you'll find the following typographic conventions throughout this book:

  • Commands, variables, directories, and files appear in a monospaced font.

  • Commands and text strings that you type appear in bold monospaced type.

  • Placeholders in syntax descriptions appear in italic monospaced type. This indicates that you should replace the italicized text with the actual filename, parameter, or other element that it represents.




FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net