Linux System Administration

Book description

If you're an experienced system administrator looking to acquire Linux skills, or a seasoned Linux user facing a new challenge, Linux System Administration offers practical knowledge for managing a complete range of Linux systems and servers. The book summarizes the steps you need to build everything from standalone SOHO hubs, web servers, and LAN servers to load-balanced clusters and servers consolidated through virtualization. Along the way, you'll learn about all of the tools you need to set up and maintain these working environments.

Linux is now a standard corporate platform with users numbering in the hundreds of millions, and there is a definite shortage of talented administrators. Linux System Administration is ideal as an introduction to Linux for Unix veterans, MCSEs, and mainframe administrators, and as an advanced (and refresher) guide for existing Linux administrators who will want to jump into the middle of the book. Inside, you'll learn how to:

  • Set up a stand-alone Linux server

  • Install, configure, maintain, and troubleshoot a DNS server using BIND

  • Build an Internet server to manage sites, perform email and file transfers, and more

  • Set up an email service for a small-to-medium-sized site, complete with authentication

  • Install and configure Apache, PHP, and MySQL on a web server built from scratch

  • Combine computers into a load-balanced Apache web server cluster based on the free Linux Virtual Server

  • Set up local network services from distributed file systems to DHCP services, gateway services, print services, user management and more

  • Use Linux virtualization with Xen or VMWare to run multiple kernels on one piece of hardware; manage each kernel's access to processor time, devices, and memory

  • Create shell scripts and adapt them for your own needs

  • Back up and restore data with rsync, tar, cdrecord, Amanda, and MySQL tools

Linux System Administration is not only knowledgeable and practical, but convenient. The ingredients for this book had been scattered throughout mailing lists, forums, and discussion groups, as well as books, periodicals, and the experiences of colleagues. Everything is now in one handy guide. In the course of their research, the authors also solved many problems whose solutions were completely undocumented. They now pass their lessons on to you.

Table of contents

  1. Table of Contents
  2. Preface
    1. How This Book Is Organized
    2. Conventions Used in This Book
    3. Using Code Examples
    4. Safari® Enabled
    5. How to Contact Us
    6. Acknowledgments
  3. Requirements for a Linux System Administrator
    1. About This Book
    2. How Can We Help?
    3. Where Do You Start?
    4. Do You Need a Book?
    5. Who Needs You?
      1. Help Wanted
      2. Analyzing Skill Sets
    6. What System Managers Should Know About Linux
    7. What’s Next
  4. Setting Up a Linux Multifunction Server
    1. Server Requirements
    2. Installing Debian
    3. Logging in Remotely
    4. Configuring the Network
    5. Changing the Default Debian Packages
    6. Setting Up Quotas
    7. Providing Domain Name Services
    8. Adding a Relational Database: MySQL
    9. Configuring Mail Securely with Postfix, POP3, and IMAP (1/3)
    10. Configuring Mail Securely with Postfix, POP3, and IMAP (2/3)
    11. Configuring Mail Securely with Postfix, POP3, and IMAP (3/3)
    12. Putting Apache to Work
    13. Adding FTP Services with ProFTPD
    14. Summarizing Your Web Statistics with Webalizer
    15. Synchronizing the System Clock
    16. Installing Perl Modules Needed by SpamAssassin
    17. What’s Next
  5. The Domain Name System
    1. DNS Basics
      1. Advantages of Localized DNS Administration
    2. Getting into the BIND
      1. Components of BIND
    3. Setting Up a DNS Server
      1. Using a chroot Environment for Security
    4. Configuring an Authoritative DNS Server
      1. Your Responsibility in DNS
      2. The Distributed Method of Resolving Domain Names
      3. Finding a Domain
      4. Answering Queries
      5. Primary and Secondary DNS Servers
      6. Caching-Only Servers
    5. Editing the Configuration Files
      1. named.conf
      2. The Primary Zone File (1/2)
      3. The Primary Zone File (2/2)
        1. Enhancements and advanced features
        2. Putting it all together
      4. The Reverse Zone File
        1. PTR records
      5. Testing Lookups
      6. Configuring the Secondary Nameserver
    6. BIND Tools
      1. nslookup
      2. rndc
    7. Troubleshooting BIND
      1. Cannot Connect Using rndc
      2. named Starts but Does Not Resolve Names
      3. Hosts Aren’t Recognized
    8. What’s Next
  6. An Initial Internet-Ready Environment
    1. Installing ISPConfig
      1. Requirements
      2. Getting Started (1/2)
      3. Getting Started (2/2)
      4. ISPConfig Directory Structure
    2. Setting Up a Server and Users with ISPConfig
      1. Adding Clients and Web Sites
      2. Managing Users and Email
        1. User, email, home, and public web directories
      3. Email Client Configuration
    3. Safeguarding a Linux Web Server
      1. The Role of a Daemon-Monitoring Daemon
      2. Installing and Configuring monit
    4. What’s Next
  7. Mail
    1. Key Mail Service Terms
    2. Postfix, Sendmail, and Other MTAs
    3. The Postfix SMTP Mail Server on Debian
      1. Debian Postfix-Related Packages
      2. Installing Postfix on Debian
      3. Basic Postfix Configuration
      4. Testing Mail
    4. Adding Authentication and Encryption
      1. SASL Authentication
        1. Configuring Postfix with SASL to authenticate users with accounts
        2. The saslauthd daemon
        3. Configuring Postfix with SASL to authenticate users without accounts
      2. TLS Encryption
    5. Configuring POP3 and IMAP Mail Delivery Agents
    6. Email Client Configuration
    7. What’s Next
  8. Administering Apache
    1. Static and Dynamic Files
    2. A Simple LAMP Setup
    3. Installation
      1. Apache
      2. PHP
      3. MySQL
    4. Apache Configuration Files
      1. Configuration File Directives
        1. User and Group directives
        2. Listen directive
        3. DocumentRoot directive
      2. Authentication and Authorization
        1. User files
        2. Group files
      3. Containers and Aliases
        1. Absolute pathnames: Directory
        2. Relative pathnames: Location
        3. Pattern matching: Files and FilesMatch
        4. Aliases
      4. Limits
      5. Server-Side Includes
      6. CGI
        1. Location
        2. File suffix
      7. PHP Module-Specific Directives
      8. Virtual Hosts
        1. IP-based virtual hosts
        2. Name-based virtual hosts
        3. mod_vhost_alias
    5. Logfiles
      1. Log Splitting and Rotation
      2. Splitting Logs with vlogger
      3. Analyzing Logs with Webalizer
    6. SSL/TLS Encryption
    7. suEXEC Support
    8. Benchmarking
    9. Installing and Administering Drupal
      1. Installing Drupal with apt-get
      2. Installing Drupal from Source
      3. Configuring Drupal
    10. Troubleshooting
      1. Web Page Doesn’t Appear in Browser
      2. Virtual Hosts Don’t Work
      3. SSI Doesn’t Work
      4. CGI Program Doesn’t Run
      5. SSL Doesn’t Work
    11. Further Reading
  9. Load-Balanced Clusters
    1. Load Balancing and High Availability
      1. Load-Balancing Software
      2. IPVS on the Load Balancer
      3. ldirectord
      4. Configuring the Realservers (Apache Nodes)
      5. Configuring the Load Balancer
      6. Testing the System
      7. Adding HA to LB
      8. Adding Other LB Services
    2. Scaling Without LB and HA
    3. Further Reading
  10. Local Network Services
    1. Distributed Filesystems
    2. Introduction to Samba
    3. Configuring the Network
    4. DHCP
      1. Installing DHCP
      2. Starting Your DHCP Service
      3. Providing Static IP Addresses
      4. Assigning IPv6 Addresses with radvd
    5. Gateway Services
      1. Another Approach to Gateway Services
    6. Print Services
      1. Printing Software Considerations
      2. Cross-Platform Printing
      3. Controlling Print Queues from the Command Line
    7. User Management
      1. Removing a User
      2. Sealing the Home Directory
      3. Graphical User Managers
  11. Virtualization in the Modern Enterprise
    1. Why Virtualization Is Popular
    2. High-Performance Computing
      1. Business Continuity and Workload Management
      2. Rapid Provisioning
      3. How Virtualization Helps
    3. Installing Xen on Fedora 5
      1. Installing a Xen Guest OS
        1. Fedora Core 5
        2. Other guests
    4. Installing VMware
      1. Installing a VMware Guest OS
    5. Virtualization: A Passing Fad?
  12. Scripting
    1. bash Beginnings
      1. Pathnames and Permissions
      2. The Default Path
      3. I/O Redirection
      4. Variables
    2. Useful Elements for bash Scripts
      1. Expressions
      2. Arithmetic
      3. If...
      4. Troubleshooting a Simple Script
      5. Loops
      6. cron Jobs
    3. Scripting Language Shootout
      1. Data Format: The /etc/passwd File
      2. Script Versions (1/2)
      3. Script Versions (2/2)
        1. The bash script
        2. The Perl script
        3. The PHP script
        4. The Python script
      4. Choosing a Scripting Language
    4. Further Reading
  13. Backing Up Data
    1. Backing Up User Data to a Server with rsync
      1. rsync Basics
      2. Making a User Backup Script
      3. Listing Files on the Backup Server
      4. Restoring Lost or Damaged Files
      5. Automated Backups
    2. tar Archives
      1. Creating a New Archive
      2. Extracting from an Archive
      3. A Complete Example of Packing and Unpacking with tar
      4. Summary
    3. Saving Files on Optical Media
      1. Accessing Your CD-R Drive
      2. Setting Defaults
      3. Preparing Files to Record on a CD-R
      4. Recording the CD-R
      5. Verifying the Recording
    4. Backing Up and Archiving to Tape with Amanda
      1. Installing Amanda
      2. Configuring Amanda
      3. Restoring Files Backed Up by Amanda
    5. Backing Up MySQL Data
  14. bash Script Samples
    1. Adding Users
    2. Random Password Generator
    3. Authoritative DNS Lookup
      1. Sending Files Between Shell Sessions (1/2)
      2. Sending Files Between Shell Sessions (2/2)
    4. Integrating ssh and screen
  15. Index (1/2)
  16. Index (2/2)

Product information

  • Title: Linux System Administration
  • Author(s): Tom Adelstein, Bill Lubanovic
  • Release date: March 2007
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596009526