Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

won't require you to do so.

Simplified Software Management

FreeBSD also simplifies software management through its ports collection. Traditionally, tuning software for a UNIX system has required considerable expertise. The ports collection simplifies this considerably by automating and documenting the install, uninstall, and configuration process for thousands of software packages. (Several other BSD operating systems have built their own packaging systems based on the ports collection.)

Optimized Upgrade Process

Unlike operating systems that require painful and risky upgrade procedures, such as Windows, FreeBSD's simple upgrade process builds an operating system that is optimized for your hardware and application. This lets FreeBSD use every feature your hardware supports, instead of just the lowest common denominator. If you change hardware, you can rebuild your system for that particular hardware. Vendors such as Sun and Apple do exactly this, since they create both the hardware and the operating system, but FreeBSD doesn't lock you in to a particular hardware platform.

Filesystem

A filesystem is how information is stored on the physical disk—it is what maps "My Web Page" to a series of zeros and ones on the metal disk in your hard drive. FreeBSD includes very sophisticated filesystems. It can support files up to a petabyte (one thousand thousand gigabytes) in size, it is highly damage−resistant, and it reads and writes files extremely quickly. The BSD filesystem is so advanced that it has been adopted by many commercial UNIX vendors, such as Sun and HP.

Who Should Use FreeBSD

While FreeBSD can be used as a very powerful desktop or development machine, its history shows a strong bias toward Web, mail, file, and support services. In fact, FreeBSD's main strength is on Internet servers, and it is an excellent choice for any Internet service.

If you're thinking of running FreeBSD (or any UNIX) on your desktop, you'll need to understand how your computer works. FreeBSD is not your best choice if you're looking for point−and−click simplicity. If that's your goal, get a Macintosh computer and use Mac OS X, which has a BSD core, so you can access the power of UNIX when you want it and not worry about it the rest of the time. Or, if you want to use the lowest common denominator, there's always the various iterations of Microsoft Windows. You won't have to understand your computer, but Windows is easy.

FreeBSD as Your Desktop

You can, of course, use FreeBSD as a powerful desktop OS.

There's a concept in computing called "eating your own dog food." If you ran a dog food company, you'd want to make a product that your own dog would eat. If your dog turns up his nose at your latest recipe, your company has a problem. The point here is that if you work with a product, you should actually use it.

11

This total immersion method provides the fastest possible training and is the approach I took to learn UNIX. By running FreeBSD exclusively on my desktop, I learned how to make a UNIX system do anything I needed, and I became a much more powerful server administrator as a result.

In fact, I even wrote this book on my FreeBSD laptop, using an open−source word processor (Emacs) and a business suite called StarOffice. I also use FreeBSD to watch MPEG video from unencrypted video CDs and DVDs, burn MP3s from my own CDs, and listen to the MP3s when I should be working. This is a fairly exhaustive sample of desktop tasks.

Desktop operating systems also allow you to do all sorts of silly things. At the moment, I have a small animated BSD daemon sleeping under my mouse pointer. When I move the mouse, the daemon awakens, chases down the pointer, and stabs it with his pitchfork. If this doesn't count as a Stupid Desktop Trick, I don't know what does.

Who Should Run Another BSD

NetBSD is FreeBSD's closest competitor. However, unlike competitors in the commercial world, this competition is mostly friendly. NetBSD and FreeBSD share code and developers freely; some people even maintain the same subsystem in both operating systems. For example, NetBSD and FreeBSD share their USB support. In fact, as I write this, work is actively underway to integrate the FTP server used in both operating systems.

NetBSD's main advantage is that it runs on anything. For example, I have an ancient Silicon Graphics workstation running NetBSD that I use as an NFS (Network File System) and DNS (Domain Name System) server. It does the job. If you have old or weird hardware, NetBSD is a good choice for you.

OpenBSD seems to stand apart from the rest of the BSD projects. While its code is available for general use, the developers appear to be more interested in security than in making their system approachable. OpenBSD has features that make it easy to do tasks such as bridging firewalls, however, so if you find you can't do some security work in FreeBSD, check out OpenBSD.

Who Should Run a Proprietary Operating System

Proprietary operating systems like Sun's Solaris, Microsoft's Windows NT, IBM's AIX, and their ilk are still quite popular despite the BSDs and Linux gnawing at their market share. Solaris, in particular, holds a great deal of the UNIX market.

High−end enterprises (the Fortune 500) are fairly closely shackled to Solaris and Windows NT. While this is slowly changing, it is true for now, and in such environments you're probably stuck with those operating systems. But slipping in an occasional FreeBSD machine to handle basic services such as DNS and file serving can make your life much easier at a much lower cost.

Of course, if your software will only run on a proprietary UNIX, your choice of operating system is probably clear. Still, always ask a vendor if a FreeBSD version is available; you may be pleasantly surprised.

12

How to Read This Book

Many computer books are thick enough to stun an ox, if you can lift them high enough without an athletic supporter and a back brace. Plus, they're either encyclopedic in scope or so painfully detailed that they're difficult to read. Do you really need a screenshot when you're told to "click OK" or "accept the license agreement"? And when was the last time you actually sat down and read the encyclopedia?

Absolute BSD is a little different. It's designed to be read once, from front to back. You can skip around if you want to, but each chapter builds on what comes before. It's also short enough to be digestible. After you've read it once, you can easily use it as a reference.

(If you're a frequent buyer of computer books, please feel free to insert all the usual stuff about "read a chapter at a time for best learning" and so on. I'm not going to coddle you—if you picked up a book on computing, you probably have two brain cells to rub together. Follow the examples, and you'll learn.)

What Must You Know?

This book is aimed at the new UNIX administrator. Several years ago the new UNIX administrator was already a skilled UNIX user with real programming skills and a degree in computer science, or at least most of one. Today, UNIX−like operating systems are freely available from the Internet and even 12−year−old children can run UNIX, read the source code, and learn enough to intimidate us older folks. As such, I don't expect you to know a huge amount about UNIX before firing it up.

To use this book to its full potential, you should be familiar with some of the basic UNIX commands, such as how to change directories (cd), list files in a directory (ls), and log in with a username and password. If you're not familiar with basic commands and running UNIX from the shell, I recommend you begin with a book like UNIX System Administration Handbook by Evi Nemeth, Garth Snyder, Scott Seebass, and Trent R. Hein (Prentice Hall PTR).

You'll also need to know something about PC hardware. (Not a huge amount, mind you, but some.) For example, it will help to know what an IRQ (interrupt request) is and how to differentiate between a SCSI and IDE hard drive. Your need for hardware knowledge will, of course, depend on the hardware you're using, but if you're interested enough to pick up this book and read this far, you probably have the hardware knowledge that you need. We'll make this a little easier by assuming you're dedicating a system to FreeBSD; very few network servers dual−boot Windows and FreeBSD, after all!

Note Absolute BSD is about how to administer FreeBSD, not about how to redirect output from a shell command. To make it easier for newer administrators, however, I include the exact shell commands needed to produce the desired results. If you learn best by example, you should find everything you need right here.

Many new system administrators these days come from a Windows background. They learn that "ls" is like "dir", and "cd" is the same on both platforms. You can learn the commands by rote, reading, and experience. What you cannot learn, coming from this background, is how a UNIX machine thinks. It will not adjust to you; you must accommodate it. With that in mind, we're going to spend a little time discussing how you must think about your FreeBSD system.

13