Mastering Linux Administration: Take your sysadmin skills to the next level by configuring and maintaining Linux systems

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Key benefits

    • Learn how to deploy Linux to the cloud with AWS and Azure
    • Familiarize yourself with Docker and Ansible for automation and Kubernetes for container management
    • Become proficient in everyday Linux administration tasks by mastering the Linux command line and automation techniques
    • Purchase of the print or Kindle book includes a free PDF eBook

Book description

Harness the power of Linux in modern data center management, leveraging its unparalleled versatility for efficiently managing your workloads in on-premises and cloud environments. In this second edition, you’ll find updates on the latest advancements in Linux administration. Starting with Linux installation on on-premises systems, this book helps you master the Linux command line, files, packages, and filesystems. You'll explore essential Linux commands and techniques to secure your Linux environment. New to this edition is a chapter on shell scripting, providing structured guidance on using shell programming for basic Linux automation. This book also delves into the world of containers, with two new chapters dedicated to Docker containers and hypervisors, including KVM virtual machines. Once adept with Linux containers, you’ll learn about modern cloud technologies, managing and provisioning container workloads using Kubernetes, and automating system tasks using Ansible. Finally, you’ll get to grips with deploying Linux to the cloud using AWS and Azure-specific tools. By the end of this Linux book, you’ll have mastered everyday administrative tasks, seamlessly navigating workflows spanning from on-premises to the cloud.

Who is this book for?

Whether you’re a new or seasoned Linux administrator seeking to understand modern concepts of Linux system administration, this book is a valuable resource packed with new and updated Linux insights. Windows System Administrators looking to extend their knowledge to the Linux OS will also benefit from this book’s latest edition. No prior knowledge is needed, all you need is a willingness to learn.

What you will learn

Discover how to create and use bash scripts to automate tasks Navigate containerized workflows efficiently using Docker and Kubernetes Deploy Linux to the cloud using AWS and Azure Automate your configuration management workloads with Ansible 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 Explore the most widely used commands for managing the Linux filesystem, network, security, and more

Author(s): Alexandru Calcatinge, Julian Balog
Edition: 2
Publisher: Packt Publishing
Year: 2024

Language: English
Commentary: Publisher EPUB | Published: Mar 22, 2024
Pages: 764
City: Birmingham
Tags: System Administration; Linux; GNU/Linux; Cloud; Networking

Mastering Linux Administration
Contributors
About the author
About the reviewers
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Share Your Thoughts
Download a free PDF copy of this book
Part 1:Basic Linux Administration
1
Installing Linux
Technical requirements
Introducing the Linux operating system
Exploring Linux distributions
Choosing a Linux distribution
Installing Linux – the basics
How to install Linux on bare metal
Linux in a VM
VM provisioning using Hyper-V
VM provisioning using Oracle’s VirtualBox
Enabling Windows Subsystem for Linux
Installing Linux – the advanced stages
The Linux boot process
PXE network boot explained
Linux distributions – a practical guide
Case study – development workstation
Case study – secure web server
Use case – personal blog
Use case – media server
Summary
Questions
Further reading
2
The Linux Shell and Filesystem
Technical requirements
Introducing the Linux shell
Establishing the shell connection
The command-line prompt
Shell command types
Explaining the command structure
Consulting the manual
The Linux filesystem
Directory structure
Working with files and directories
Understanding file paths
Basic file operations
Commands for file viewing
Commands for file properties
Using text editors to create and edit files
Using Vim to edit text files
The nano text editor
Summary
Questions
Further reading
3
Linux Software Management
Technical requirements
Linux software package types
The DEB and RPM package types
The snap and flatpak package types
Managing software packages
Managing DEB packages
Managing RPM packages
Using the snap and flatpak packages
Installing new desktop environments in Linux
Installing KDE Plasma on Fedora Linux
Summary
Questions
Further reading
4
Managing Users and Groups
Technical requirements
Managing users
Understanding sudo
Creating, modifying, and deleting users
Managing groups
Creating, modifying, and deleting groups
Managing permissions
File and directory permissions
Summary
Questions
Further reading
5
Working with Processes, Daemons, and Signals
Technical requirements
Introducing processes
Understanding process types
The anatomy of a process
Working with processes
Using the ps command
Using the pstree command
Using the top command
Using the kill and killall commands
Using the pgrep and pkill commands
Working with daemons
Working with systemd daemons
Explaining inter-process communication
Working with signals
Summary
Questions
Further reading
Part 2:Advanced Linux Administration
6
Working with Disks and Filesystems
Technical requirements
Understanding devices in Linux
Linux abstraction layers
Device files and naming conventions
Understanding filesystem types in Linux
Understanding disks and partitions
Common disk types
Partitioning disks
Introducing LVM in Linux
LVM snapshots
Summary
Questions
Further reading
7
Networking with Linux
Technical requirements
Exploring basic networking
Computer networks
The OSI model
The TCP/IP network stack model
TCP/IP protocols
IP addresses
Sockets and ports
Linux network configuration
Working with network services
DHCP servers
DNS servers
Authentication servers
File sharing
Printer servers
File transfer
Mail servers
NTP servers
Remote access
Understanding network security
Summary
Questions
Further reading
8
Linux Shell Scripting
Technical requirements
Exploring the Linux shell
Bash shell features
Bash shell variables
Basics of shell scripting
Creating a shell script file
Variables in shell scripts
Using mathematical expressions in shell scripts
Using programming structures
Using arrays in Bash
Reading input data
Formatting output data
Understanding exit statuses and testing structures
Using conditional if statements
Using looping statements
Working with functions
Using sed and (g)awk commands
Using scripts to showcase interprocess communication
Shared storage
Unnamed pipes
Named pipes
Sockets
Scripting for administrative tasks
Creating scripts for system administrative tasks
Packaging scripts
Summary
Questions
Further reading
9
Securing Linux
Technical requirements
Understanding Linux security
Introducing SELinux
Working with SELinux
Introducing AppArmor
Working with AppArmor
Final considerations
Working with firewalls
Understanding the firewall chain
Introducing Netfilter
Working with iptables
Introducing nftables
Using firewall managers
Summary
Exercises
Further reading
10
Disaster Recovery, Diagnostics, and Troubleshooting
Technical requirements
Planning for disaster recovery
A brief introduction to risk management
Risk calculation
Designing a DRP
Backing up and restoring the system
Disk cloning solutions
Introducing common Linux diagnostic tools for troubleshooting
Tools for troubleshooting boot issues
Tools for troubleshooting general system issues
Tools for troubleshooting network issues
Tools for troubleshooting hardware issues
Summary
Questions
Further reading
Part 3:Server Administration
11
Working with Virtual Machines
Technical requirements
Introduction to virtualization on Linux
Efficiency in resource usage
Introduction to hypervisors
Understanding Linux KVMs
Choosing the hypervisor
Using the KVM hypervisor
Working with basic KVM commands
Creating a VM using the command line
Basic VM management
Advanced KVM management
Connecting to a VM
Cloning VMs
Creating VM templates
Obtaining VM and host resource information
Managing VM resource usage
Provisioning VMs using cloud-init
Understanding how cloud-init works
Installing and configuring cloud-init
Public key authentication with SSH
Summary
Exercises
Further reading
12
Managing Containers with Docker
Technical requirements
Understanding Linux containers
Comparing containers and VMs
Understanding the underlying container technology
Understanding Docker
Working with Docker
Which Docker version to choose?
Installing Docker
Using some Docker commands
Managing Docker containers
Working with Dockerfiles
Building container images from Dockerfiles
Deploying a containerized application with Docker
Deploying a website using Docker
Summary
Questions
Further reading
13
Configuring Linux Servers
Technical requirements
Introducing Linux services
Setting up SSH
Installing and configuring OpenSSH on Ubuntu
Setting up a DNS server
Caching a DNS service
Creating a primary DNS server
Setting up a secondary DNS server
Setting up a DHCP server
Setting up an NFS server
Installing and configuring the NFS server
Configuring the NFS client
Testing the NFS setup
Setting up a Samba file server
Installing and configuring Samba
Creating Samba users
Accessing the Samba shares
Summary
Questions
Further reading
Part 4:Cloud Administration
14
Short Introduction to Cloud Computing
Technical requirements
Introduction to cloud technologies
Exploring the cloud computing standards
Understanding the architecture of the cloud
Knowing the key features of cloud computing
Introducing IaaS solutions
Amazon EC2
Microsoft Azure Virtual Machines
Other strong IaaS offerings
Introducing PaaS solutions
Amazon Elastic Beanstalk
Google App Engine
DigitalOcean App Platform
Open source PaaS solutions
Introducing CaaS solutions
Introducing the Kubernetes container orchestration solution
Deploying containers in the cloud
Introducing microservices
Introducing DevOps
Exploring cloud management tools
Ansible
Puppet
Chef Infra
Summary
Further reading
15
Deploying to the Cloud with AWS and Azure
Technical requirements
Working with AWS EC2
Introducing and creating AWS EC2 instances
Introducing AWS EC2 placement groups
Using AWS EC2 instances
Working with the AWS CLI
Working with Microsoft Azure
Creating and deploying a virtual machine
Connecting with SSH to a virtual machine
Managing virtual machines
Working with the Azure CLI
Summary
Questions
Further reading
16
Deploying Applications with Kubernetes
Technical requirements
Introducing Kubernetes
Understanding the Kubernetes architecture
Introducing the Kubernetes object model
The anatomy of a Kubernetes cluster
Installing and configuring Kubernetes
Installing Kubernetes on a desktop
Installing Kubernetes on VMs
Working with Kubernetes
Using kubectl
Deploying applications
Running Kubernetes in the cloud
Summary
Questions
Further reading
17
Infrastructure and Automation with Ansible
Technical requirements
Introducing Ansible architecture and configuration management
Understanding the Ansible architecture
Introducing configuration management
Installing Ansible
Installing Ansible on Ubuntu
Installing Ansible using pip
Working with Ansible
Setting up the lab environment
Configuring Ansible
Using Ansible ad hoc commands
Exploring Ansible modules
Using Ansible playbooks
Using templates with Jinja2
Creating Ansible roles
Summary
Questions
Further reading
Index
Why subscribe?
Other Books You May Enjoy
Packt is searching for authors like you
Share Your Thoughts
Download a free PDF copy of this book