Book description
Over 100 recipes to get up and running with the modern Linux administration ecosystem
Key Features
- Understand and implement the core system administration tasks in Linux
- Discover tools and techniques to troubleshoot your Linux system
- Maintain a healthy system with good security and backup practices
Book Description
Linux is one of the most widely used operating systems among system administrators,and even modern application and server development is heavily reliant on the Linux platform.
The Linux Administration Cookbook is your go-to guide to get started on your Linux journey. It will help you understand what that strange little server is doing in the corner of your office, what the mysterious virtual machine languishing in Azure is crunching through, what that circuit-board-like thing is doing under your office TV, and why the LEDs on it are blinking rapidly.
This book will get you started with administering Linux, giving you the knowledge and tools you need to troubleshoot day-to-day problems, ranging from a Raspberry Pi to a server in Azure, while giving you a good understanding of the fundamentals of how GNU/Linux works.
Through the course of the book, you'll install and configure a system, while the author regales you with errors and anecdotes from his vast experience as a data center hardware engineer, systems administrator, and DevOps consultant.
By the end of the book, you will have gained practical knowledge of Linux, which will serve as a bedrock for learning Linux administration and aid you in your Linux journey.
What you will learn
- Install and manage a Linux server, both locally and in the cloud
- Understand how to perform administration across all Linux distros
- Work through evolving concepts such as IaaS versus PaaS, containers, and automation
- Explore security and configuration best practices
- Troubleshoot your system if something goes wrong
- Discover and mitigate hardware issues, such as faulty memory and failing drives
Who this book is for
If you are a system engineer or system administrator with basic experience of working with Linux, this book is for you.
Table of contents
- Title Page
- Copyright and Credits
- About Packt
- Contributors
- Preface
- Introduction and Environment Setup
-
Remote Administration with SSH
- Introduction
- Technical requirements
- Generating and using key pairs with ssh-keygen
- SSH client arguments and options
- Using a client-side SSH configuration file
- Modifying the server-side SSH configuration file
- Rotating host keys and updating known_hosts
- Technical requirements
- Using local forwarding
- Using remote forwarding
- ProxyJump and bastion hosts
- Using SSH to create a SOCKS Proxy
- Understanding and using SSH agents
- Running multiple SSH servers on one box
- Summary
-
Networking and Firewalls
- Introduction
- Technical requirements
- Determining our network configuration
- More examples of using the ip suite
- Adding and configuring network interfaces
- Modern domain name resolution on Linux
- Configuring NTP and the problems we face
- Listing firewall rules on the command line
- Adding and removing firewall rules on the command line
- Determining the running services and ports in use
- Debugging with iftop
- Summary
-
Services and Daemons
- Introduction
- Technical requirements
- Determining running services
- Listing installed services
- Starting and stopping services
- Changing which services start and stop at boot
- Common services you might expect to see
- Understanding service unit files
- Customizing systemd unit files
- Testing running services
- Writing a basic unit file
- Working with systemd timers (and cron)
- Other init systems
- Round-up - services and daemons
-
Hardware and Disks
- Introduction
- Technical requirements
- Determining hardware
- Testing hardware
- The role of the kernel
- Disk configuration on Linux
- The filesystem hierarchy
- Configuring a blank disk and mounting it
- Re-configuring a disk using LVM
- Using systemd-mount and fstab
- Disk encryption and working with encryption at rest
- Current filesystem formats
- Upcoming filesystem formats
- Round-up - hardware and disks
-
Security, Updating, and Package Management
- Introduction
- Technical requirements
- Checking package versions
- Checking the OS version
- Checking for updates
- Automating updates
- Checking mailing lists and errata pages
- Using snaps
- Using Flatpak
- Using Pip, RubyGems, and other package managers
- Dependency hell (a quick word)
- Compiling from source
- Technical requirements
- Adding additional repositories
- Roundup - security, updating, and package management
- Monitoring and Logging
-
Permissions, SELinux, and AppArmor
- Introduction
- Technical requirements
- Linux file permissions
- Modifying file permissions
- Technical requirements
- Users and groups
- AppArmor and modification
- SELinux and modification
- Checking SELinux is running, and the importance of keeping it running
- Resetting SELinux permissions
- Roundup - permissions, SELinux, and AppArmor
-
Containers and Virtualization
- Introduction
- Technical requirements
- What is a container?
- Installing Docker
- Running your first Docker container
- Debugging a container
- Searching for containers (and security)
- What is virtualization?
- Starting a QEMU machine with our VM
- Using virsh and virt-install
- Comparing the benefits of local installs, containers, and VMs
- Brief comparison of virtualization options (VMware, proxmox, and more)
- Roundup - containers and virtualization
-
Git, Configuration Management, and Infrastructure as Code
- Introduction
- Technical requirements
- What is Git?
- Setting up a Git server
- Committing to our Git repository
- Branching our Git repository and committing changes
- Installing Ansible
- Using Ansible to install Java from a role
- Storing our Ansible configuration in Git
- Exploring options for IaC
- Roundup - Git, Configuration Management, and Infrastructure as Code
-
Web Servers, Databases, and Mail Servers
- Introduction
- Technical requirements
- Installing and understanding a web server
- Basic Apache configuration
- Basic Nginx configuration
- SSL, TLS, and LetsEncrypt
- Basic MySQL or MariaDB Installation
- Basic PostgreSQL installation
- Local MTA usage and configuration (Postfix)
- Local MTA usage and configuration (Exim)
- NoSQL documents (MongoDB example)
- NoSQL KV (Redis example)
- Messaging brokers and queues (RabbitMQ example)
- Roundup - web servers, databases, and mail servers
-
Troubleshooting and Workplace Diplomacy
- Introduction
- Technical requirements
- What is troubleshooting?
- Isolating the real issue
- Giving estimates and deciding on next steps
- Using ss, iftop, tcpdump, and others for network issues
- Using cURL, wget, and OpenSSL for remote web issues
- Using iotop, top, and vmstat for local resource issues
- Using ps, lsof, Strace, and /proc for service issues
- Making a copy of problems for later debugging
- Temporary solutions and when to invoke them
- Handling irate developers
- Handling irate managers
- Handling irate business owners
- Roundup - Troubleshooting and workplace diplomacy
-
BSDs, Solaris, Windows, IaaS and PaaS, and DevOps
- Introduction
- Determining the type of system you're on
- Understanding how the BSDs differ
- Understanding how Solaris and illumos differ
- Understanding how Windows differs
- IaaS (Infrastructure as a Service)
- PaaS (Platform as a Service)
- The Ops versus DevOps Wars
- Roundup - BSDs, Solaris, Windows, IaaS and PaaS, DevOps
- Other Books You May Enjoy
Product information
- Title: Linux Administration Cookbook
- Author(s):
- Release date: December 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789342529
You might also like
book
Linux Cookbook, 2nd Edition
This handy cookbook teaches new-to-intermediate Linux users the essential skills necessary to manage a Linux system, …
book
Practical Linux System Administration
This essential guide covers all aspects of Linux system administration, from user maintenance, backups, filesystem housekeeping, …
book
Mastering Linux Administration
Develop advanced skills for working with Linux systems on-premises and in the cloud Key Features Become …
video
Linux Troubleshooting: Red Hat EX342
12+ Hours of Video Instruction 13 hours of video instruction providing hands-on labs to teach and …