Mastering Linux Administration

Book description

Develop advanced skills for working with Linux systems on-premises and in the cloud

Key Features

  • Become proficient in everyday Linux administration tasks by mastering the Linux command line and using automation
  • Work with the Linux filesystem, packages, users, processes, and daemons
  • Deploy Linux to the cloud with AWS, Azure, and Kubernetes

Book Description

Linux plays a significant role in modern data center management and provides great versatility in deploying and managing your workloads on-premises and in the cloud. This book covers the important topics you need to know about for your everyday Linux administration tasks.

The book starts by helping you understand the Linux command line and how to work with files, packages, and filesystems. You'll then begin administering network services and hardening security, and learn about cloud computing, containers, and orchestration. Once you've learned how to work with the command line, you'll explore the essential Linux commands for managing users, processes, and daemons and discover how to secure your Linux environment using application security frameworks and firewall managers. As you advance through the chapters, you'll work with containers, hypervisors, virtual machines, Ansible, and Kubernetes. You'll also learn how to deploy Linux to the cloud using AWS and Azure.

By the end of this Linux book, you'll be well-versed with Linux and have mastered everyday administrative tasks using workflows spanning from on-premises to the cloud. If you also find yourself adopting DevOps practices in the process, we'll consider our mission accomplished.

What you will learn

  • Understand how Linux works and learn basic to advanced Linux administration skills
  • Explore the most widely used commands for managing the Linux filesystem, network, security, and more
  • Get to grips with different networking and messaging protocols
  • Find out how Linux security works and how to configure SELinux, AppArmor, and Linux iptables
  • Work with virtual machines and containers and understand container orchestration with Kubernetes
  • Work with containerized workflows using Docker and Kubernetes
  • Automate your configuration management workloads with Ansible

Who this book is for

If you are a Linux administrator who wants to understand the fundamentals and as well as modern concepts of Linux system administration, this book is for you. Windows System Administrators looking to extend their knowledge to the Linux OS will also benefit from this book.

Table of contents

  1. Mastering Linux Administration
  2. Contributors
  3. About the authors
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Reviews
  6. Section 1: Linux Basic Administration
  7. Chapter 1: Installing Linux
    1. Technical requirements
    2. The Linux operating system
    3. Linux distributions
    4. Choosing the right Linux distribution
      1. Common Linux distributions
      2. Linux distributions – a practical guide
    5. Installing Linux – the basics
      1. How to install Linux
      2. Installing Ubuntu
      3. Installing CentOS
    6. The Windows Subsystem for Linux (WSL)
    7. Installing Linux graphical user interfaces
      1. GNOME
      2. KDE
    8. Setting up and using the Linux workstation
      1. Installing Ubuntu Desktop
      2. Default software packages
      3. Additional software packages
      4. Managing software packages with APT
    9. Summary
    10. Questions
  8. Chapter 2: The Linux Filesystem
    1. Technical requirements
    2. Introducing the Linux shell
      1. Bash shell features
      2. The shell connection
      3. The command-line prompt
      4. Shell command types
      5. Command structure
      6. Help from the manual
    3. The Linux filesystem
      1. Directory structure
    4. Working with files and directories
      1. Understanding file paths
      2. Basic file operations
      3. Commands for file viewing
      4. Commands for file properties
      5. Using text editors to create and edit files
    5. Summary
    6. Questions
    7. Further reading
  9. Chapter 3: Linux Software Management
    1. Technical requirements
    2. Linux software package types
      1. The DEB and RPM package types
      2. The snap and flatpak package types
    3. Managing software packages
      1. Managing DEB packages
      2. Managing RPM packages
      3. Using snap and flatpak packages
      4. Application streams in CentOS 8
    4. Building a package from source
      1. The source code file
      2. Preparing the source code
      3. Setting up the environment
    5. Summary
    6. Questions
    7. Further reading
  10. Chapter 4: Managing Users and Groups
    1. Technical requirements
    2. Managing users
      1. Understanding sudo
      2. Creating, modifying, and deleting users
    3. Managing groups
      1. Creating, modifying, and deleting groups
    4. Managing permissions
      1. File and directory permissions
    5. Summary
    6. Questions
  11. Chapter 5: Working with Processes, Daemons, and Signals
    1. Technical requirements
    2. Introducing processes
      1. Understanding process types
      2. The anatomy of a process
    3. Working with processes
      1. The ps command
      2. The pstree command
      3. The top command
      4. The kill and killall commands
      5. The pgrep and pkill commands
    4. Working with daemons
      1. Working with SysV daemons
      2. Working with systemd daemons
    5. Exploring interprocess communication
      1. Shared storage
      2. Shared memory
      3. Unnamed pipes
      4. Named pipes
      5. Message queues
      6. Sockets
      7. Working with signals
    6. Summary
    7. Questions
  12. Section 2: Advanced Linux Server Administration
  13. Chapter 6: Working with Disks and Filesystems
    1. Technical requirements
    2. Understanding devices in Linux
      1. Linux abstraction layers
      2. Device files and naming conventions
    3. Understanding filesystem types in Linux
      1. The Ext4 filesystem features
      2. The XFS filesystem features
      3. The btrfs filesystem features
    4. Understanding disks and partitions
      1. Common disk types used
      2. Partitioning disks
    5. Logical Volume Management in Linux
      1. LVM snapshots
    6. Summary
  14. Chapter 7: Networking with Linux
    1. Technical requirements
    2. Exploring basic networking
      1. Computer networks
      2. The OSI model
      3. The TCP/IP model
      4. TCP/IP protocols
      5. IP addresses
      6. Sockets and ports
      7. Linux network configuration
    3. Working with networking services
      1. DHCP servers
      2. DNS servers
      3. Authentication servers
      4. File sharing
      5. Printer servers
      6. File transfer
      7. Mail servers
      8. NTP servers
      9. Remote access
    4. Understanding network security
      1. VPNs
      2. Working with VPNs
      3. Setting up OpenVPN
    5. Summary
    6. Questions
  15. Chapter 8: Configuring Linux Servers
    1. Technical requirements
    2. GitHub
    3. Questions
    4. Further reading
  16. Chapter 9: Securing Linux
    1. Technical requirements
    2. Understanding Linux security
    3. Introducing SELinux
      1. Working with SELinux
    4. Introducing AppArmor
      1. Working with AppArmor
      2. Final considerations
    5. Working with firewalls
      1. Introducing netfilter
      2. Working with iptables
      3. Introducing nftables
      4. Using firewall managers
    6. Summary
    7. Questions
    8. Further reading
  17. Chapter 10: Disaster Recovery, Diagnostics, and Troubleshooting
    1. Planning for disaster recovery
      1. A very short introduction to risk management
      2. Risk calculation
      3. Designing a disaster recovery plan
    2. Backing up and restoring the system
      1. Disk cloning solutions
    3. Introducing common Linux diagnostic tools for troubleshooting
      1. Tools for troubleshooting boot issues
      2. Tools for troubleshooting general system issues
      3. Tools for troubleshooting network issues
      4. Tools for troubleshooting hardware issues
    4. Summary
    5. Exercises
    6. Further reading
  18. Section 3: Cloud Administration
  19. Chapter 11: Working with Containers and Virtual Machines
    1. Technical requirements
    2. Introduction to virtualization on Linux
      1. Efficiency in resource usage
      2. Introduction to hypervisor
      3. Understanding VMs
      4. Choosing the hypervisor
    3. Understanding Linux containers
      1. Containers versus VMs
      2. Understanding the underlying container technology
      3. Understanding Docker
    4. Working with Docker
      1. Which Docker version to choose?
      2. Installing Docker CE
      3. Using the Docker commands
      4. Managing Docker containers
      5. Deploying a containerized application with Docker
    5. Summary
    6. Further reading
  20. Chapter 12: Cloud Computing Essentials
    1. Technical requirements
    2. Introduction to cloud technologies
      1. Understanding the need for cloud computing standards
      2. Knowing the architecture of the cloud
      3. Knowing the key features of cloud computing
    3. Short introduction to OpenStack
    4. Introducing IaaS solutions
      1. Amazon EC2
      2. Microsoft Azure Virtual Machines
      3. Other strong IaaS offerings
    5. Introducing PaaS solutions
      1. Amazon Elastic Beanstalk
      2. Google App Engine
      3. DigitalOcean App Platform
      4. Red Hat OpenShift
      5. Cloud Foundry
      6. The Heroku platform
    6. Introducing CaaS solutions
      1. Introducing the Kubernetes container orchestration solution
      2. Deploying containers in the cloud
      3. The rise of micro operating systems
      4. Introducing microservices
    7. Introducing DevOps
    8. Introducing cloud management tools
    9. Summary
    10. Further reading
  21. Chapter 13: Deploying to the Cloud with AWS and Azure
    1. Technical requirements
    2. Working with AWS EC2
      1. Creating AWS EC2 instances
      2. Using AWS EC2 instances
      3. Working with the AWS CLI
    3. Working with Microsoft Azure
      1. Creating a virtual machine
      2. Managing virtual machines
      3. Working with the Azure CLI
    4. Summary
    5. Questions
    6. Further reading
  22. Chapter 14: Deploying Applications with Kubernetes
    1. Technical requirements
    2. Introducing Kubernetes
      1. Understanding the Kubernetes architecture
      2. Introducing the Kubernetes object model
      3. The anatomy of a Kubernetes cluster
    3. Installing and configuring Kubernetes
      1. Installing Kubernetes on desktop
      2. Installing Kubernetes on virtual machines
      3. Running Kubernetes in the cloud
    4. Working with Kubernetes
      1. Using kubectl
      2. Deploying applications
    5. Summary
    6. Questions
    7. Further reading
  23. Chapter 15: Automating Workflows with Ansible
    1. Technical requirements
    2. Introducing Ansible
      1. Understanding the Ansible architecture
      2. Introducing configuration management
    3. Installing Ansible
      1. Installing Ansible on Ubuntu
      2. Installing Ansible on RHEL/CentOS
      3. Installing Ansible using pip
    4. Working with Ansible
      1. Setting up the lab environment
      2. Configuring Ansible
      3. Using Ansible ad hoc commands
      4. Using Ansible playbooks
      5. Using templates with Jinja2
      6. Using roles with Ansible Galaxy
    5. Summary
    6. Questions
    7. Further reading
    8. Why subscribe?
  24. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Leave a review - let other readers know what you think

Product information

  • Title: Mastering Linux Administration
  • Author(s): Alexandru Calcatinge, Julian Balog
  • Release date: June 2021
  • Publisher(s): Packt Publishing
  • ISBN: 9781789954272