You are previewing FreeBSD® Unleashed.
O'Reilly logo
FreeBSD® Unleashed

Book Description

This book teaches the reader everything he/she needs to know in order to use FreeBSD to its full potential. It will show individuals how to use the same FreeBSD power that Yahoo!, the Internet Movie Database, and many other high profile internet sites depend on. Whether someone needs an enterprise class server, a small business server, or a dependable workstation, this book can be a very economical and powerful solution to your needs.

Table of Contents

  1. Copyright
  2. About the Authors
  3. About the Tech Editor
  4. Acknowledgments
  5. Tell Us What You Think!
  6. Introduction
  7. Introduction to FreeBSD
    1. What Is FreeBSD?
      1. Why Use FreeBSD?
      2. What Can You Do with FreeBSD?
      3. A Brief History of FreeBSD and UNIX
      4. The Design Philosophy of UNIX
      5. FreeBSD Compared to Other Operating Systems
      6. FreeBSD Mascot
    2. Installing FreeBSD
      1. Checking Your Hardware
      2. Creating Boot Disks
      3. Booting in to the Install Program
      4. Introduction to the FreeBSD Sysinstall Program
      5. Navigating the Sysinstall Program
      6. Creating Partitions and Assigning Mount Points
      7. Selecting a Canned Distribution Set
      8. Choose the Installation Media
      9. Post-Installation
      10. Exiting the Install and Rebooting the System
      11. Booting FreeBSD for the First Time
      12. Shutting Down FreeBSD
    3. Advanced Installation Issues
      1. Backing Up Existing Filesystems
      2. Nondestructive Hard Disk Partitioning with FIPS
      3. Working with FIPS
      4. Potential Problems with and Limitations of Dual Boot Systems
      5. The FreeBSD Boot Manager
      6. Booting FreeBSD from LILO
      7. Alternate Installation Methods
  8. Using FreeBSD
    1. Your First Session with FreeBSD
      1. FreeBSD Startup Process
      2. The BIOS
      3. The Bootstrap
      4. The Kernel
      5. init
      6. Logging In to FreeBSD
      7. Starting the X-Windows System
      8. Introduction to the Gnome Desktop Environment
      9. Stopping the X-Windows System
      10. Logging Out of FreeBSD
      11. Shutting Down the FreeBSD System
    2. Working with the Gnome Desktop Environment
      1. Window Managers
      2. The Gnome Desktop Environment
      3. Navigating the Desktop
      4. The Gnome Panel
      5. Working with Windows
      6. Exploring the Gnome and X-Windows Applets
      7. Managing Files and Directories with the Gnome File Manager
      8. Getting Help in Gnome
    3. Customizing the Gnome Desktop Environment
      1. Adding New Icons to the Desktop
      2. Customizing the Gnome Panel
      3. Adding and Removing Panels
      4. Customizing the Gnome File Manager
      5. Working with the Gnome Control Center
      6. Customizing Sawfish Window Manager Options
    4. Working with Applications
      1. Working with Text
      2. Graphics and Images
      3. StarOffice Office Suite
      4. Multimedia
      5. Networking Applications
    5. Working with the Shell
      1. Introducing the Shell
      2. Types of Shells Available
      3. Changing Your Shell
      4. Getting Help in the Shell
      5. Basic Shell File Manipulation
      6. Text-Related Commands
      7. Pipes and Input/Output Redirection
      8. Command Completion and History Editing
  9. Administering FreeBSD
    1. The FreeBSD Filesystem
      1. The FreeBSD Directory Structure
      2. Monitoring Filesystem Usage
      3. Mounting and Unmounting FreeBSD Filesystems
      4. Mounting and Unmounting Filesystems from Other Operating Systems
      5. Mounting and Unmounting CD-ROM and Floppy-Based Filesystems
      6. Understanding the /etc/fstab File
      7. Checking and Repairing Filesystems with fsck
      8. Setting and Enforcing User Filesystem Quotas
    2. Users, Groups, and Permissions
      1. Introduction to Users and Groups
      2. Why Use Groups?
      3. File Ownership
      4. File and Directory Permissions
      5. Access Control Lists (ACL)
      6. Adding and Removing Users
    3. System Configuration and Startup Scripts
      1. Understanding the FreeBSD Startup Process
      2. Resource Configuration Scripts
      3. The inetd Daemon and the inetd.conf Configuration File
      4. The System Logger (syslogd) and the syslog.conf File
      5. Notes on the /etc/rc.local File
    4. Customizing the Shell
      1. What Is a Shell?
      2. Adding Shells to the System and Making Them Available
      3. Using Alternate Shells
      4. Shell Initialization Files
      5. Customizing Your Shell Environment
      6. Shell and Environment Variables
    5. Shell Programming
      1. A Simple Shell Program
      2. Variables
      3. Interacting with the User
      4. Arithmetic in Shell Programs
      5. Loops
      6. Conditional Statements
      7. Exit Status
      8. Functions
      9. File Descriptors
      10. Debugging Shell Scripts
      11. Advanced Features of Korn Shell Scripting
    6. Performance Monitoring, Process Control, and Job Automation
      1. Performance Monitoring with top
      2. top Output Explained
      3. Process Monitoring with ps
      4. ps Output Explained
      5. Terminating Misbehaving Processes
      6. Making Processes “Nice”
      7. Introduction to Job Automation
      8. The cron Daemon
      9. Creating Jobs to Run One Time with the at Command
      10. Controlling Access to the cron and at Commands
    7. Installing Additional Software
      1. Introduction to Packages
      2. Installing Packages
      3. Removing Packages
      4. Updating Packages
      5. Introduction to Ports
      6. The FreeBSD Ports Tree
      7. Installing Ports
      8. Removing Installed Ports
      9. Upgrading a Port
      10. Making Sure that Your Ports Tree Is Up to Date
      11. Fresh Ports
    8. Printing
      1. lpd and the Print Spooler
      2. Kernel, Device, and Communications Mode Configuration
      3. Creating the Spool Directory
      4. Filters
      5. Conversion Filters
      6. Configuring /etc/printcap
      7. Enabling lpd
      8. Basic Command Line Printing
      9. Printing from X-Windows
      10. Printing in StarOffice
      11. Checking Status of Print Jobs
      12. Removing Jobs from the Queue
      13. Controlling Printers
      14. Basic Network Printing
      15. Troubleshooting
    9. Kernel Configuration
      1. The Role of the Kernel
      2. Why Configure a Custom Kernel?
      3. The Kernel Configuration Files
      4. Creating a Custom Kernel Configuration File
      5. Compiling and Installing the Custom Kernel
      6. Adding Device Nodes to the /dev Directory (if Necessary)
      7. Recovering if Something Goes Wrong
    10. Keeping Up to Date with FreeBSD
      1. Tracking the FreeBSD Sources
      2. What Is make world?
      3. Things to Consider Before Making the World
      4. Pre-make world Tasks
      5. Rebuilding Your System from Sources
      6. Using mergemaster to Check for Changed Configuration Files
      7. Rebooting After the Upgrade
    11. Understanding Hard Disks and Filesystems
      1. IDE/ATA Access Modes
      2. SCSI Disks
      3. Understanding Hard Disk Geometry
      4. Partitioning a Hard Disk
      5. Creating the Disk Labels
      6. Making the Filesystem Available for Use
    12. FreeBSD Survival Guide
      1. Migrating to FreeBSD
      2. “Do's” and “Don'ts” (Common Gotchas)
      3. Performance Tuning
      4. Preparing for the Worst: Backups and Mirrors
    13. Introduction to Perl Programming
      1. What Is Perl?
      2. Perl in FreeBSD
      3. Fundamentals of Perl Scripting
      4. A Simple Perl Script
      5. Advanced Perl Techniques
      6. Useful Perl Resources
  10. FreeBSD Networking
    1. Introduction to Networking
      1. Introduction to Networking
      2. Network Topologies
      3. Network Components
      4. Network Protocols
      5. TCP/IP
      6. IP Addresses
      7. Subnets and the Network Mask
      8. Routing
      9. Host Names and Domain Names
      10. DHCP
    2. Configuring Basic Networking Services
      1. Configuring the Network Card
      2. Configuring Network Settings with sysinstall
      3. Configuring Network Settings without sysinstall
      4. Creating IP Aliases
      5. Mapping Names to IP Addresses with the /etc/hosts File
      6. Testing Network Connectivity with Ping
      7. Configuring DNS with the /etc/resolv.conf File
      8. A Look at Various Other Network Configuration Files
    3. Connecting to the Internet with PPP
      1. Choosing an ISP
      2. Gathering Needed Information
      3. User PPP versus Kernel PPP
      4. Configuring Kernel PPP
      5. User PPP
      6. Troubleshooting PPP
      7. Final Thoughts
    4. Configuring E-mail Services
      1. Introduction to SMTP
      2. Mail Transfer Agents (MTAs) and Mail User Agents (MUAs)
      3. Configuring Basic E-mail Services with Sendmail
      4. Notes on Relaying
      5. Introduction to POP3
      6. Configuring a POP3 Server with qpopper
      7. Configuring an IMAP Server with IMAP-UW
      8. E-mail for Standalone Workstations
      9. A Look at Some Sendmail Replacements
    5. Configuring a Web Server
      1. Introduction to the HTTP Protocol
      2. Obtaining and Installing Apache
      3. Configuring Apache
      4. Starting and Stopping the HTTP Daemon
      5. Basic Access Control with Apache
      6. Virtual Hosting
      7. Introduction to Apache Modules
      8. Server-Side Includes
      9. Introduction to CGI
    6. Configuring an FTP Server
      1. Introduction to the FTP Protocol
      2. Overview of the FTP Directory Structure
      3. Configuring the FTP Server
      4. Controlling FTP Access
      5. Allowing Anonymous FTP Access
      6. Virtual Hosting
      7. Using Alternate FTP Servers
    7. Configuring an Internet Gateway
      1. What Is a Router?
      2. Configuring a NAT Gateway in FreeBSD
      3. Enabling NAT
      4. Configuring Clients to Use the New Gateway
      5. Configuring Wireless Internet Access
      6. Routing Between Three or More Networks
      7. Dynamic Routing
    8. Network Security
      1. Security Models
      2. Password Policies
      3. Problems with Cleartext Services
      4. Securing Terminal Traffic (OpenSSH)
      5. Securing E-mail Services (POP3 and IMAP)
      6. Securing FTP
      7. Securing Apache
      8. System Security Profiles and Kernel Security (securelevel)
      9. Using a Firewall
      10. Preventing Intrusions and Compromises
      11. Denial of Service (DOS) Attacks
      12. Physical Security
      13. Other Security Resources
    9. The Domain Name Server
      1. Introduction to BIND
      2. Enabling the Name Server Daemon
      3. BIND Configuration File (named.conf)
      4. Creating a Zone File
      5. Configuring a Caching Name Server
    10. The Network Filesystem (NFS)
      1. Introduction to NFS
      2. Configuring an NFS Server
      3. Configuring an NFS Client
      4. Auto-Mount Daemon (amd)
    11. File and Print Sharing with Microsoft Windows
      1. Introduction to Samba
      2. SMB/CIFS Explained
      3. Installing and Configuring Samba
      4. Other Samba Components
      5. Future Samba Development
      6. smbfs Filesystem
    12. DHCP
      1. How DHCP Works
      2. Advantages of DHCP Over Static IP Addresses
      3. Kernel Configuration for DHCP
      4. Enabling DHCP
      5. dhclient Program
      6. DHCP Server Daemon
      7. dhcpd Configuration File
  11. X-Windows
    1. Advanced X-Windows Configuration
      1. Upgrading from 3.3.6 to 4.x
      2. Using SuperProbe
      3. Configuring X-Windows with the xf86config Script
      4. Understanding the XF86Config File
      5. Testing the X-Windows Setup
      6. Your Personal .xinitrc File
      7. Working with Fonts
      8. Using Remote X-Windows Clients
      9. xdm
  12. Appendixes
    1. Command Reference and Configuration File Reference
    2. Hardware Compatibility Lists
      1. System Requirements
      2. Supported Hardware
      3. Video Cards Supported by X-Windows
    3. Troubleshooting Installation and Boot Problems
      1. Installation Problems
      2. Boot Problems and Other Non-Installation Problems
    4. Sources for More Information
      1. FreeBSD-Specific Resources
      2. Other BSD-Related Resources
      3. Other Internet Resources
  13. Index