Book Image

Red Hat Enterprise Linux 8 Administration

By : Miguel Pérez Colino, Pablo Iranzo Gómez, Scott McCarty
Book Image

Red Hat Enterprise Linux 8 Administration

By: Miguel Pérez Colino, Pablo Iranzo Gómez, Scott McCarty

Overview of this book

Whether in infrastructure or development, as a DevOps or site reliability engineer, Linux skills are now more relevant than ever for any IT job, forming the foundation of understanding the most basic layer of your architecture. With Red Hat Enterprise Linux (RHEL) becoming the most popular choice for enterprises worldwide, achieving the Red Hat Certified System Administrator (RHCSA) certification will validate your Linux skills to install, configure, and troubleshoot applications and services on RHEL systems. Complete with easy-to-follow tutorial-style content, self-assessment questions, tips, best practices, and practical exercises with detailed solutions, this book covers essential RHEL commands, user and group management, software management, networking fundamentals, and much more. You'll start by learning how to create an RHEL 8 virtual machine and get to grips with essential Linux commands. You'll then understand how to manage users and groups on an RHEL 8 system, install software packages, and configure your network interfaces and firewall. As you advance, the book will help you explore disk partitioning, LVM configuration, Stratis volumes, disk compression with VDO, and container management with Podman, Buildah, and Skopeo. By the end of this book, you'll have covered everything included in the RHCSA EX200 certification and be able to use this book as a handy, on-the-job desktop reference guide. This book and its contents are solely the work of Miguel Pérez Colino, Pablo Iranzo Gómez, and Scott McCarty. The content does not reflect the views of their employer (Red Hat Inc.). This work has no connection to Red Hat, Inc. and is not endorsed or supported by Red Hat, Inc.
Table of Contents (25 chapters)
1
Section 1: Systems Administration – Software, User, Network, and Services Management
9
Section 2: Security with SSH, SELinux, a Firewall, and System Permissions
14
Section 3: Resource Administration – Storage, Boot Process, Tuning, and Containers
21
Section 4: Practical Exercises

Creating and syncing repositories with createrepo and reposync

It's common that we receive an RPM file and keep it in a repository that we can use on our machine (and sometimes share it with other machines with a web server of an NFS share). It's also common that when we start building our own RPMs, we distribute them and, to do so, we need to create a repository. To do that, we can use the createrepo tool.

First let's create a folder in /var/tmp for repos:

[root@rhel8 ~]# cd /var/tmp/
[root@rhel8 tmp]# mkdir repos
[root@rhel8 tmp]# cd repos/

Then let's create a folder for slack, a common tool to communicate with your team, and download the RPM package:

[root@rhel8 repos]# mkdir slack
[root@rhel8 repos]# cd slack/
[root@rhel8 repos]# curl -s -O https://downloads.slack-edge.com/linux_releases/slack-4.12.2-0.1.fc21.x86_64.rpm 
[root@rhel8 slack]# ls -l
total 62652
-rw-r--r--. 1 root 64152596 feb 14 18:12 slack-4.12.2-0.1.fc21.x86_64.rpm

Now we have...