You are previewing Automating Linux and Unix System Administration, Second Edition.
O'Reilly logo
Automating Linux and Unix System Administration, Second Edition

Book Description

Whether you need a network of ten Linux PCs and a server or a data center with a few thousand UNIX nodes, you need to know how to automate much of the installation, configuration, and standard system administration.

Build your network once using cfengine, and the network build will work, without user intervention, on any hardware you prefer. Automating Linux and Unix System Administration, Second Edition is unique in its focus on how to make the system administrator's job easier and more efficient: instead of just managing the system administrator's time, the book explains the technology to automate repetitive tasks and the methodology to automate successfully.

  • Both new and seasoned professionals will profit from industry–leading insights into the automation process.

  • System administrators will attain a thorough grasp of cfengine, kickstart, and shell scripting for automation.

  • After reading all chapters and following all exercises in this book, the reader will be able to set up anything from a Linux data center to a small office network.

What you'll learn

See how to make changes on many UNIX and Linux hosts at once in a reliable and repeatable manner.

  • Learn how to automate things correctly so you only have to do it once, by leveraging the authors' experience in setting up small, medium, and large networks.

  • Set up a Linux data center or a network correctly.

  • Explore handling real–world environments where not all hosts are configured alike via a case study of a fictional new data center build-out.

  • Examine real–world examples for core infrastructure services (DNS, mail, monitoring, log analysis, security, cfengine, imaging) to build on in your environment.

  • Understand core system administration best practices, which are a key part of how cfengine and automations deployments are outlined in the book.

  • Learn how to make changes reversible, repeatable, and correct the first time through interaction with product/application stakeholders (programmers, product managers, customers, etc.).

Who this book is for

This book is for Linux system administrators who want to learn about the software and methodology to automate repetitive tasks—regardless of network or data center size—in one place. System managers will also find it much easier to think about network technology and automation projects if they read this book. This book is also for anyone who is interested in repeatable and secure infrastructure.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Authors
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Introduction
    1. Who This Book Is For
    2. How This Book Is Structured
    3. Downloading the Code
    4. Contacting the Authors
  9. CHAPTER 1: Introducing the Basics of Automation
    1. Do You Need Automation?
    2. What Will You Gain?
    3. What Do System Administrators Do?
    4. Methodology: Get It Right from the Start!
    5. Dealing with Users and Administrators
    6. Who Owns the Systems?
    7. Defining Policy
  10. CHAPTER 2: Applying Practical Automation
    1. Seeing Everything As a File
    2. Understanding the Procedure Before Automating It
    3. Exploring an Example Automation
  11. CHAPTER 3: Using SSH to Automate System Administration Securely
    1. Learning the Basics of Using SSH
    2. Enhancing Security with SSH
    3. Using Public-Key Authentication
    4. Using ssh-agent
    5. Restricting RSA Authentication
    6. Using SSH for Common Accounts
  12. CHAPTER 4: Configuring Systems with cfengine
    1. Getting an Overview of cfengine
    2. Learning the Basic Setup
    3. Debugging cfengine
    4. Creating Sections in cfagent.conf
    5. Using cfrun
    6. Looking Forward to Cfengine 3
    7. Using cfengine in the Real World
  13. CHAPTER 5: Bootstrapping a New Infrastructure
    1. Installing the Central cfengine Host
    2. Setting Up the cfengine Master Repository
    3. Creating the cfengine Config Files
    4. Ready for Action
  14. CHAPTER 6: Setting Up Automated Installation
    1. Introducing the Example Environment
    2. The Proper Foundation
  15. CHAPTER 7: Automating a New System Infrastructure
    1. Implementing Time Synchronization
    2. Incorporating DNS
    3. Taking Control of User Account Files
    4. Routing Mail
    5. Looking Back
  16. CHAPTER 8: Deploying Your First Application
    1. Deploying and Configuring the Apache Web Server
    2. Sharing Data Between Systems
    3. NFS and rsync and cfengine, Oh My!
  17. CHAPTER 9: Generating Reports and Analyzing Logs
    1. Reporting on cfengine Status
    2. Doing General Syslog Log Analysis
    3. Seeing the Light
  18. CHAPTER 10: Monitoring
    1. Nagios
    2. Ganglia
    3. Now You Can Rest Easy
  19. CHAPTER 11: Infrastructure Enhancement
    1. Cfengine Version Control with Subversion
    2. Backups
    3. Enhancement Is an Understatement
  20. CHAPTER 12: Improving System Security
    1. Security Enhancement with cfengine
    2. Using the Lightweight Directory Access Protocol
    3. Security with Kerberos
    4. Implementing Host-Based Firewalls
    5. Enabling Sudo at Our Example Site
    6. Security Is a Journey, Not a Destination
  21. APPENDIX A: Introducing the Basic Tools
    1. The Bash Shell
    2. Perl
    3. Basic Regular Expressions
    4. grep
    5. The sed Stream Editor
    6. AWK
  22. APPENDIX B: Writing cfengine Modules
    1. Requirements for Using Modules
    2. Defining Custom Classes Without Modules
    3. Creating Your First cfengine Module
    4. Using Modules in Place of shellcommands
  23. Index