O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Absolute FreeBSD, 3rd Edition

Book Description

FreeBSD is the muscle behind companies like Netflix and EMC. Any place where someone does heavy lifting on the Internet, you’ll find FreeBSD. This newly revised edition of Absolute FreeBSD brings FreeBSD’s strengths to bear on your problems and covers FreeBSD's newest features, all in the inimitable style that has made author Michael W. Lucas' system administration books so popular.



Any computer system is only as good as the system administrator’s knowledge. Absolute FreeBSD teaches you everything you need to know about managing FreeBSD systems, from installation, configuration, and taking the system from “just working” to “working well.” A cohesive focus on service delivery and best practice means that you can apply much of the book to other operating systems.



Absolute FreeBSD dives deep into server management, taking you beyond just making things work and into understanding why they work.



You’ll learn:



• How to best install FreeBSD to meet your needs
• Which filesystem to use in your environment
• How to back up and restore critical data
• How to tweak the kernel, and when not to
• Network configuration, from activating interfaces to selecting congestion control algorithms
• How to manage UFS, ZFS, and other critical filesystems
• FreeBSD’s software packaging system, including how to build your own package repository
• How and when to upgrade
• Techniques to build your own FreeBSD
• Advanced security features like blacklistd and packet filtering
• How to monitor and adjust performance
• Container-style virtualization with jails
• Diskless systems
• Panic management and bug reporting



With Absolute FreeBSD readers will get the solid introduction they need while fans of the earlier editions will expand their skills even further.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. About the Author
  5. About the Technical Reviewers
  6. BRIEF CONTENTS
  7. CONTENTS IN DETAIL
  8. FOREWORD by Marshall Kirk McKusick
  9. ACKNOWLEDGMENTS
  10. INTRODUCTION
    1. What Is FreeBSD?
    2. FreeBSD Development
    3. Other BSDs
    4. Other Unixes
    5. FreeBSD’s Strengths
    6. Who Should Use FreeBSD?
    7. Who Should Run Another BSD?
    8. Who Should Run a Proprietary Operating System?
    9. How to Read This Book
    10. What Must You Know?
    11. For the New System Administrator
    12. Notes on the Third Edition
    13. Contents of This Book
  11. 1 GETTING MORE HELP
    1. Why Not Beg for Help?
    2. Man Pages
    3. FreeBSD.org
    4. Other Websites
    5. Using FreeBSD Problem-Solving Resources
    6. Asking for Help
  12. 2 BEFORE YOU INSTALL
    1. Default Files
    2. Configuration with UCL
    3. FreeBSD Hardware
    4. Disks and Filesystems
    5. Getting FreeBSD
    6. Network Installs
  13. 3 INSTALLING
    1. Core Settings
    2. Distribution Selection
    3. Disk Partitioning
    4. Network and Service Configuration
    5. Finishing the Install
  14. 4 START ME UP! THE BOOT PROCESS
    1. Power-On
    2. The Loader
    3. Single-User Mode
    4. The Loader Prompt
    5. Loader Configuration
    6. Boot Options
    7. Startup Messages
    8. Multiuser Startup
    9. The rc.d Startup System
    10. Serial Consoles
  15. 5 READ THIS BEFORE YOU BREAK SOMETHING ELSE! (BACKUP AND RECOVERY)
    1. System Backups
    2. Backup Tapes
    3. BSD tar(1)
    4. Recording What Happened
    5. Repairing a Broken System
  16. 6 KERNEL GAMES
    1. What Is the Kernel?
    2. Kernel State: sysctl
    3. The Kernel Environment
    4. Kernel Modules
    5. Build Your Own Kernel
    6. Building a Kernel
    7. Custom Kernel Configuration
    8. Inclusions, Exclusions, and Expanding the Kernel
  17. 7 THE NETWORK
    1. Network Layers
    2. The Network in Practice
    3. Getting Bits and Hexes
    4. Network Stacks
    5. IPv4 Addresses and Netmasks
    6. IPv6 Addresses and Subnets
    7. TCP/IP Basics
    8. Understanding Ethernet
  18. 8 CONFIGURING NETWORKING
    1. Network Prerequisites
    2. The Domain Name Service
    3. Network Activity
    4. Optimizing Network Performance
    5. Network Adapter Teaming
    6. Virtual LANs
  19. 9 SECURING YOUR SYSTEM
    1. Who Is the Enemy?
    2. FreeBSD Security Announcements
    3. User Security
    4. Shells and /etc/shells
    5. root, Groups, and Management
    6. Tweaking User Security
    7. File Flags
    8. Securelevels
    9. Network Targets
    10. Putting It All Together
  20. 10 DISKS, PARTITIONING, AND GEOM
    1. Disks Lie
    2. Device Nodes
    3. The Common Access Method
    4. The GEOM Storage Architecture
    5. Hard Disks, Partitions, and Schemes
    6. The Filesystem Table: /etc/fstab
    7. What’s Mounted Now?
    8. Disk Labeling
    9. GEOM Withering
    10. The gpart(8) Command
    11. Scheming Disks
    12. The GPT Partitioning Scheme
    13. The MBR Partitioning Scheme
    14. BSD Labels
  21. 11 THE UNIX FILE SYSTEM
    1. UFS Components
    2. Mounting and Unmounting Filesystems
    3. UFS Resiliency
    4. Creating and Tuning UFS Filesystems
    5. UFS Snapshots
    6. UFS Recovery and Repair
    7. UFS Space Reservations
    8. How Full Is a Partition?
    9. Adding New UFS storage
  22. 12 THE Z FILE SYSTEM
    1. Datasets
    2. ZFS Pools
    3. Virtual Devices
    4. Managing Pools
    5. Copy-On-Write
    6. Snapshots
    7. Compression
    8. Pool Integrity and Repair
    9. Boot Environments
  23. 13 FOREIGN FILESYSTEMS
    1. FreeBSD Mount Commands
    2. Using Removable Media
    3. Memory Filesystems
    4. devfs
    5. Miscellaneous Filesystems
    6. The Network File System
    7. The Common Internet File System
    8. Serving CIFS Shares
  24. 14 EXPLORING /ETC
    1. /etc Across Unix Species
    2. /etc/adduser.conf
    3. /etc/aliases
    4. /etc/amd.map
    5. /etc/auto_master
    6. /etc/blacklistd.conf
    7. /etc/bluetooth, /etc/bluetooth.device.conf, and /etc/defaults/bluetooth.device.conf
    8. /etc/casper
    9. /etc/crontab and /etc/cron.d
    10. /etc/csh.*
    11. /etc/ddb.conf
    12. /etc/devd.conf
    13. /etc/devfs.conf, /etc/devfs.rules, and /etc/defaults/devfs.rules
    14. /etc/dhclient.conf
    15. /etc/disktab
    16. /etc/dma/
    17. /etc/freebsd-update.conf
    18. /etc/fstab
    19. /etc/ftp.*
    20. /etc/group
    21. /etc/hostid
    22. /etc/hosts
    23. /etc/hosts.allow
    24. /etc/hosts.equiv
    25. /etc/hosts.lpd
    26. /etc/inetd.conf
    27. /etc/libmap.conf
    28. /etc/localtime
    29. /etc/locate.rc
    30. /etc/login.*
    31. /etc/mail
    32. /etc/mail.rc
    33. /etc/mail/mailer.conf
    34. /etc/make.conf
    35. /etc/master.passwd
    36. /etc/motd
    37. /etc/mtree
    38. /etc/netconfig
    39. /etc/netstart
    40. /etc/network.subr
    41. /etc/newsyslog.conf
    42. /etc/nscd.conf
    43. /etc/nsmb.conf
    44. /etc/nsswitch.conf
    45. /etc/ntp/, /etc/ntp.conf
    46. /etc/opie*
    47. /etc/pam.d/*
    48. /etc/passwd
    49. /etc/pccard_ether
    50. /etc/periodic.conf and /etc/defaults/periodic.conf
    51. /etc/pf.conf, /etc/pf.os
    52. /etc/phones
    53. /etc/portsnap.conf
    54. /etc/ppp/
    55. /etc/printcap
    56. /etc/profile
    57. /etc/protocols
    58. /etc/pwd.db
    59. /etc/rc*
    60. /et/regdomain.xml
    61. /etc/remote
    62. /etc/resolv.conf
    63. /etc/rpc
    64. /etc/security/
    65. /etc/services
    66. /etc/shells
    67. /etc/skel/
    68. /etc/snmpd.config
    69. /etc/spwd.db
    70. /etc/src.conf
    71. /etc/ssh/
    72. /etc/ssl/
    73. /etc/sysctl.conf
    74. /etc/syslog.conf, /etc/syslog.conf.d/
    75. /etc/termcap, /etc/termcap.small
    76. /etc/ttys
    77. /etc/unbound/
    78. /etc/wall_cmos_clock
    79. /etc/zfs/
  25. 15 MAKING YOUR SYSTEM USEFUL
    1. Ports and Packages
    2. Packages
    3. Package Repositories
    4. Package Branches
    5. Upgrading Packages
  26. 16 CUSTOMIZING SOFTWARE WITH PORTS
    1. Making Software
    2. Source Code and Software
    3. The Ports Collection
    4. The Ports Index
    5. What’s In a Port?
    6. Private Package Repositories
    7. All Poudrieres, Large and Small
    8. Updating Poudriere
    9. More Poudriere
  27. 17 ADVANCED SOFTWARE MANAGEMENT
    1. Using Multiple Processors: SMP
    2. Threads, Threads, and More Threads
    3. Startup and Shutdown Scripts
    4. Managing Shared Libraries
    5. Remapping Shared Libraries
    6. Running Software from the Wrong OS
    7. Using Linux Mode
    8. Running Software from the Wrong Architecture or Release
  28. 18 UPGRADING FREEBSD
    1. FreeBSD Versions
    2. Upgrade Methods
    3. Binary Updates
    4. Upgrading via Source
    5. Building FreeBSD from Source
    6. Shrinking FreeBSD
    7. Packages and System Upgrades
    8. Updating Installed Ports
  29. 19 ADVANCED SECURITY FEATURES
    1. Unprivileged Users
    2. Network Traffic Control
    3. Default Accept vs. Default Deny
    4. TCP Wrappers
    5. Packet Filtering
    6. Blacklistd(8)
    7. Public-Key Encryption
    8. Global Security Settings
    9. Preparing for Intrusions with mtree(1)
    10. Monitoring System Security
    11. Package Security
    12. If You’re Hacked
  30. 20 SMALL SYSTEM SERVICES
    1. Secure Shell
    2. Email
    3. Network Time
    4. Name Service Switching
    5. inetd
    6. DHCP
    7. Printing and Print Servers
    8. TFTP
    9. Scheduling Tasks
  31. 21 SYSTEM PERFORMANCE AND MONITORING
    1. Computer Resources
    2. Checking the Network
    3. General Bottleneck Analysis with vmstat(8)
    4. Disk I/O
    5. CPU, Memory, and I/O with top(1)
    6. Following Processes
    7. Paging and Swapping
    8. Performance Tuning
    9. Status Mail
    10. Logging with syslogd
    11. Log File Management
    12. FreeBSD and SNMP
  32. 22 JAILS
    1. Jail Basics
    2. Jail Host Server Setup
    3. Jail Setup
    4. Managing Jails
    5. More Jail Options
    6. Jailing Ancient FreeBSD
    7. Last Jail Notes
  33. 23 THE FRINGE OF FREEBSD
    1. Terminals
    2. Managing Cloudy FreeBSD
    3. Diskless FreeBSD
    4. Diskless Farm Configuration
    5. Finalizing Setup
    6. Storage Encryption
  34. 24 PROBLEM REPORTS AND PANICS
    1. Bug Reports
    2. System Panics
    3. Recognizing Panics
    4. Responding to a Panic
  35. AFTERWORD
    1. The FreeBSD Community
    2. Why Do We Do It?
    3. What Can You Do?
    4. If Nothing Else
    5. Getting Things Done
  36. BIBLIOGRAPHY
    1. References
    2. Books I've Written
  37. INDEX