You are previewing Practical Linux Infrastructure.
O'Reilly logo
Practical Linux Infrastructure

Book Description

Practical Linux Infrastructure teaches you how to use the best open source tools to build a new Linux infrastructure, or alter an existing infrastructure, to ensure it stands up to enterprise-level needs. Each chapter covers a key area of implementation, with clear examples and step-by-step instructions.

Using this book, you’ll understand why scale matters, and what considerations you need to make. You’ll see how to switch to using Google Cloud Platform for your hosted solution, how to use KVM for your virtualization, how to use Git, Postfix, and MySQL for your version control, email, and database, and how to use Puppet for your configuration management. For enterprise-level fault tolerance you’ll use Apache, and for load balancing and high availability, you'll use HAProxy and Keepalived. For trend analysis you’ll learn how to use Cacti, and for notification you’ll use Nagios. You’ll also learn how to utilize BIND to implement DNS, how to use DHCP (Dynamic Host Configuration Protocol), and how to setup remote access for your infrastructure using VPN and Iptables. You will finish by looking at the various tools you will need to troubleshoot issues that may occur with your hosted infrastructure. This includes how to use CPU, network, disk and memory management tools such as top, netstat, iostat and vmstat.

Author Syed Ali is a senior site reliability engineering manager, who has extensive experience with virtualization and Linux cloud based infrastructure. His previous experience as an entrepreneur in infrastructure computing offers him deep insight into how a business can leverage the power of Linux to their advantage. He brings his expert knowledge to this book to teach others how to perfect their Linux environments. Become a Linux infrastructure pro with Practical Linux Infrastructure today.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewer
  9. Acknowledgments
  10. Introduction
  11. Chapter 1: Managing Large-Scale Infrastructure
    1. Application Deployment
    2. Software Development Automation
      1. Build Automation
      2. Software Configuration Management
      3. Continuous Integration
      4. Continuous Delivery
      5. Change Management
      6. Release Management
    3. Waterfall Methodology
    4. Agile Methodology
      1. Scrum
    5. Web Architecture
    6. Single-Tier Architecture
    7. Two-Tier Architecture
    8. Three-Tier Architecture
    9. Four-Tier Architecture
    10. Five-Tier Architecture
    11. Six-Tier Architecture
    12. Global Architecture
    13. Autoscaling
    14. Rolling Deployments
    15. Licensing
    16. Support
      1. Support Model for Customers
      2. Network Operations Center
      3. Self-Service Support
    17. Bug Reporting
    18. Inventory Management
    19. Hardware
      1. Processors
      2. Memory
      3. Storage
    20. System Profiles
      1. Tuning TCP/IP
      2. CPU Scheduling
    21. Conclusion
  12. Chapter 2: Hosted Cloud Solutions Using Google Cloud Platform
    1. To Cloud or Not to Cloud
    2. Types of Clouds
      1. Private Cloud
      2. Public Cloud
      3. Hybrid Cloud
      4. Components of a Cloud
    3. Migrating to the Cloud
    4. DevOps
    5. Security in the Cloud
    6. Google Cloud Platform
      1. Projects
      2. Permissions
    7. Google Compute Engine
      1. Virtual Machines
      2. Networks
      3. Regions and Zones
      4. Quotas
      5. Firewalls
      6. Images
      7. Network Load Balancing
      8. Maintenance
    8. Google Cloud Storage
    9. Google App Engine
    10. Deployment Tools
      1. Google Cloud SDK
    11. GCP Support
    12. Change Management
    13. Conclusion
  13. Chapter 3: Virtualization with KVM
    1. What Is Virtualization?
      1. Virtualization Solutions
    2. Enterprise Architecture
    3. KVM Hypervisor Provisioning
      1. Automated KVM Installation
    4. VM Provisioning
    5. KVM Management Solutions
      1. Libvirt
      2. virsh
    6. Selecting Physical Servers
      1. Custom-Built Servers
      2. Name Brands
      3. Open Compute–Compatible Servers
      4. Rack and Blade Servers
      5. Making Your Choice
    7. Designing KVM Networks
      1. Network Address Translation
      2. Bridged Network
      3. Network Bonding
      4. Virtual Local Area Networks
      5. Open vSwitch
    8. Designing KVM Storage
    9. Image Selection
    10. File System Selection
    11. Virtual Image Optimization
    12. Security Considerations
    13. Reference Architecture
    14. Conclusion
  14. Chapter 4: MySQL, Git, and Postfix
    1. Database Categories
    2. Picking a Database
    3. Installing MySQL
    4. MySQL Failover
    5. MySQL Enterprise Design
    6. Managing MySQL
    7. Backing up MySQL
    8. Getting Help with MySQL
    9. Future of MySQL
    10. E-mail in an Enterprise
    11. E-mail Solution Strategy
    12. Enterprise Mail Transfer Agents
    13. Postfix Enterprise Design
    14. Installing Postfix
    15. Configuring Postfix
    16. E-mail Protocols
    17. Getting Help with Postfix
    18. Revision Control in an Enterprise
    19. Revision Control Management Choices
    20. Why Git?
    21. Installing Git
    22. Setting up a Git Server
    23. Git Enterprise Design
    24. Git Protocols
    25. Getting Help with Git
    26. Conclusion
  15. Chapter 5: Configuration Management with Puppet
    1. Legacy Solutions
    2. What Is Configuration Management?
    3. Configuration Management Requirements
    4. CMS Options
    5. Commercial Versus Open Source
    6. Understanding Puppet
      1. Puppet Facts
      2. Puppet Catalog
    7. Puppet Resources
    8. Puppet Manifests
      1. Relationships in Puppet Manifests
    9. Puppet Modules
    10. Hiera
    11. Puppet Style Guide
      1. Commonality
      2. Module Metadata
      3. General Formatting
    12. Puppet Config Files
    13. Reporting
    14. Certificate Management
    15. Puppet Hardware Requirements
    16. Puppet Software Requirements
    17. Installing Puppet
      1. Using EPEL
      2. Using Puppet Labs Repository
      3. Using YUM
      4. Installing via rubygems
    18. Modular Architecture
    19. Putting It All Together
    20. Where to Get Help
    21. Conclusion
  16. Chapter 6: Apache for Enterprise-Level Fault Tolerance
    1. Apache Software Foundation
    2. Understanding HTTP
    3. HTTP Headers
    4. HTTP Method
    5. HTTP Response
    6. Role of Apache HTTP Server
    7. Installing Apache HTTP Server
    8. Configuring Apache HTTP Server
    9. Apache Multiprocessing Modules
    10. Monitoring Apache HTTP Server
    11. Apache HTTP Benchmarking
    12. Tuning Apache HTTP
      1. Hardware
      2. Software
      3. Modules
      4. Modifying MPM Configuration
      5. Configuration
      6. Enabling keep-alive
    13. Apache Reverse Proxy
    14. Apache Forward Proxy
    15. Apache with Python
    16. HAProxy
    17. HAProxy Load-Balancing Algorithms
    18. HAProxy Management
    19. Keepalived
    20. Keepalived in Action
    21. Getting Help
    22. Conclusion
  17. Chapter 7: Monitoring with Nagios and Trend Analysis with Cacti
    1. What to Monitor
    2. How to Monitor
    3. SNMP
    4. Understanding SNMP
    5. Installing Net-SNMP
    6. Configuring Net-SNMP
    7. SNMP MIB
    8. Monitoring Software
    9. Cloud-Based Monitoring
    10. Understanding Nagios
    11. Commercial Versus Community Edition
    12. Installing the Nagios Server
    13. Starting the Nagios Server
    14. Nagios Check Types
    15. Configuring the Nagios Server
    16. Object Configuration
    17. Nagios Macros
    18. Nagios Server Plug-ins
    19. Installing the Nagios Client
    20. Adding Clients to Nagios
    21. Nagios Templates
    22. Nagios Add-ons
    23. Sample Nagios Checks
    24. Nagios Front Ends
    25. Getting Help
    26. Trend Analysis
    27. Trend Analysis Software
    28. Installing Cacti
    29. Configuring Cacti
    30. Web-Based Configuration
    31. Cacti Graphs
    32. Graph Trees
    33. Cacti Command Line Interface
    34. Cacti Support
    35. RRDtool
    36. Conclusion
  18. Chapter 8: DNS Using BIND and DHCP
    1. Role of DNS in an Enterprise
    2. DNS Solutions
    3. Domain Registrars
      1. Top-Level Domains
    4. Protecting Your Domain Registration
    5. DNS Record Types
    6. DNS Reverse Mapping
    7. Root Servers
    8. Installing BIND
    9. Tracking Changes
    10. Named Config File
    11. Types of DNS Servers
    12. Sender Policy Framework
    13. DNS Security Extensions
    14. BIND Zone Delegation
    15. Where to Get BIND Help
    16. BIND Enterprise Architecture
    17. Understanding DHCP
    18. DHCP Enterprise Architecture
    19. Primary DHCP Server
    20. DHCP Failover
    21. Conclusion
  19. Chapter 9: Log Collection, OpenVPN, and iptables
    1. Why Collect Logs?
    2. Logging Solutions
    3. rsyslog
    4. Logging Architecture
    5. rsyslog Configuration
    6. Log Retention
    7. Log Rotation
      1. Log Rotation Strategy
    8. Role of VPNs in an Enterprise
    9. Picking a VPN Technology
    10. How Does SSL Work?
    11. VPN Software
    12. VPN Design
    13. Split Tunnel
    14. OpenVPN Configuration File
    15. Routing or Bridging
    16. OpenVPN Certificates
      1. Creating Your Own Certificates
    17. OpenVPN Security
    18. OpenVPN with Dual Authentication
    19. OpenVPN Management Interface
      1. Graphical User Interface Management Interface
    20. OpenVPN Access Server Versus Community Edition
    21. OpenVPN Access Server
    22. iptables
    23. iptables in a Network
    24. Filter Table
    25. Popular iptables Rules
    26. Deleting iptables Rules
    27. Saving iptables
    28. Conclusion
  20. Chapter 10: Troubleshooting Tools
    1. TCP/IP
      1. tcpdump
    2. Network Services
    3. CPU
    4. Processes
      1. Understanding ps
    5. Disk
    6. File System
      1. Read Ahead
    7. RAID
    8. Memory
      1. Memory Types
    9. Domain Name System
      1. nslookup
    10. DHCP
    11. Conclusion
  21. Index