Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Red Hat Enterprise Linux 8 Administration
Red Hat Enterprise Linux 8 Administration

Red Hat Enterprise Linux 8 Administration: Master Linux administration skills and prepare for the RHCSA certification exam

Arrow left icon
Profile Icon Miguel Pérez Colino Profile Icon Scott McCarty Profile Icon Pablo Iranzo Gómez
Arrow right icon
S$41.98 S$59.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (4 Ratings)
eBook Nov 2021 534 pages 1st Edition
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial
Arrow left icon
Profile Icon Miguel Pérez Colino Profile Icon Scott McCarty Profile Icon Pablo Iranzo Gómez
Arrow right icon
S$41.98 S$59.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (4 Ratings)
eBook Nov 2021 534 pages 1st Edition
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Red Hat Enterprise Linux 8 Administration

Chapter 1: Installing RHEL8

The first step to start working with Red Hat Enterprise Linux, or RHEL, is to have it running. Whether in your own laptop as the main system, in a virtual machine, or in a physical server, its installation is necessary in order to get your hands on the system you want to learn to use. It is highly encouraged that you get yourself a physical or virtual machine to use the system while reading this book.

In this chapter, you will deploy your own RHEL8 system, so as to be able to follow all the examples mentioned in this book as well as discover more about Linux.

The topics to be covered in this chapter are as follows:

  • Obtaining RHEL software and a subscription
  • Installing RHEL8

Technical requirements

The best way to get started is by having an RHEL8 virtual machine to work with. You may do it in your main computer as a virtual machine or using a physical machine. In the following section of this chapter, we will review both options and you will be able to run your own RHEL8 system.

Tip

A virtual machine is a way to emulate a complete computer. To be able to create this emulated computer on your own laptop, in case you are using macOS or Windows, you will need to install virtualization software such as Virtual Box, for example. If you are already running Linux, it is already prepared for virtualization, and you will only need to add the virt-manager package.

Obtaining RHEL software and a subscription

To be able to deploy RHEL, you will need a Red Hat Subscription to obtain the images to be used, as well as access to repositories with software and updates. You can obtain, free of charge, a Developer Subscription from the developers' portal site of Red Hat using the following link: developers.redhat.com. You then need to follow these steps:

  1. Log in or create an account at developers.redhat.com.
  2. Go to the developers.redhat.com page and click on the Log In button:
    Figure 1.1 – The developers.redhat.com home page, indicating where to click to log in

    Figure 1.1 – The developers.redhat.com home page, indicating where to click to log in

  3. Once in the login page, use your account or, if you do not have one, create it by clicking on Register in the top-right corner or on the Create one now. button directly in the registration box, as follows:
    Figure 1.2 – Red Hat login page (common to all Red Hat resources)

    Figure 1.2 – Red Hat login page (common to all Red Hat resources)

    You can choose to use your credentials in several services (in other words, Google, GitHub, or Twitter) if you prefer to do so.

  4. Once you have logged in, go to the Linux section

    You can find the Linux section in the navigation bar before the content:

    Figure 1.3 – Accessing the Linux page at developers.redhat.com

    Figure 1.3 – Accessing the Linux page at developers.redhat.com

    Click on Download RHEL which appears as a fancy button on the next page:

    Figure 1.4 – Accessing the RHEL downloads page at developers.redhat.com

    Figure 1.4 – Accessing the RHEL downloads page at developers.redhat.com

    Then select the ISO image for the x86_64 (9 GB) architecture (which is the one used in Intel- and AMD-based computers):

    Figure 1.5 – Choosing the ISO download of RHEL8 for x86_64

    Figure 1.5 – Choosing the ISO download of RHEL8 for x86_64

  5. Obtain the RHEL8 ISO image as follows:
Figure 1.6 – Download dialog for RHEL8 for x86_64

Figure 1.6 – Download dialog for RHEL8 for x86_64

The ISO image is a file that contains an exact copy of the contents of a full DVD (even when we are not using a DVD). This file will later be used to install our machines, whether dumping it to a USB drive for Bare Metal installations, unpacking it for network installations, or attaching it for virtual machine installations (or using out-of-band capabilities in servers such as IPMI, iLO, or iDRAC)

Tip

To verify the ISO image, and ensure that the one we have obtained is not corrupted, or altered, a mechanism called "checksum" can be used. Checksums are a way to review a file and provide a set of letters and numbers that can be used to verify that the file is precisely the same one as in the origin. Red Hat provides a list of sha256 checksums for doing so in the downloads section of the Customer Portal (https://access.redhat.com/). An article describing the process is available here: https://access.redhat.com/solutions/8367.

We have the software, in this case the ISO image, to install RHEL8 in any computer. These are the same bits that are used in production machines worldwide and that you can use yourself for learning purposes with your developer subscription. Now it is time to give them a go in the next section.

Installing RHEL8

For this section of the chapter, we will follow the typical installation process to have RHEL installed on a machine. We will follow the default steps, reviewing the options available for each one.

Preparation for a physical server installation

A physical server requires some initial setup before beginning with installation. Common steps include configuring the disks in the internal array, connecting it to the networks, preparing the switches for any interface aggregation that is expected (teaming, bonding), preparing access to external disk arrays (in other words, fiber channel arrays), setting up out-of-band capabilities, and securing the BIOS configuration.

We will not get into the details of these preparations, except for the boot sequence. The server will require to boot (start loading the system) from an external device such as a USB thumb drive or optical disk (whether physical or emulated through the out-of-band capabilities).

To create a bootable USB thumb drive from a machine with Linux or macOS, this is as simple as doing a "disk dump" with the dd application. Perform the following steps:

  1. Find your USB device in the system, usually /dev/sdb in Linux, or /dev/disk2 in macOS (in macOS, this command requires special privileges; please run it as sudo dmesg | grep removable):
    $ dmesg | grep removable
    [66931.429805] sd 0:0:0:0: [sdb] Attached SCSI removable disk

    Important note

    Please verify the disk name very carefully, as the procedure for using "disk dump" will completely overwrite the disk target.

    Check whether the USB is mounted and, if so, dismount it (for macOS users, please use diskutil list to ascertain whether the device is mounted):

    $ lsblk /dev/sdb
    NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    sdb      8:0   1  3,8G  0 disk 
    ├─sdb1   8:1    1  1,8G  0 part /run/media/miguel/USB
    ├─sdb2   8:2    1 10,9M  0 part 
    └─sdb3   8:3    1 22,9M  0 part

    In this case, only partition 1 of the sdb disk, referred to as sdb1, is mounted. We will need to unmount all the partitions mounted. In this example, this is straightforward as there is only one. To do so, we can run the following command:

    Important note

    Using super-user do or sudo, for administrative tasks, such as unmounting devices, we could open an administrator shell (root in Linux and Unix-like systems) or run the command using sudo, which provides administrative privileges to the current user. When running commands with sudo, the user will be requested to enter their password (not the admin password, but the user's own password) to proceed with the execution (this default behavior may be overridden in the sudoers configuration file).

    $ sudo umount /dev/sdb1

    Dump the image! (Warning, this will erase the selected disk!):

    $ sudo dd if=rhel-8.3-x86_64-dvd.iso of=/dev/sdb bs=512k

    Tip

    Alternative methods are available for creating a boot device. Alternative graphical tools are available for creating a boot device that can help select both the image and the target device. In Fedora Linux (the community distribution where RHEL was based on, and a workstation for many engineers and developers), the Fedora Media Writer tool can be used. For other environments, the UNetbootin tool could also serve to create your boot media.

Now, with the USB thumb drive, we can install any physical machine, from a tiny laptop to a huge server. The next part involves making the physical machine boot from the USB thumb drive. The mechanism for doing that will depend on the server being used. However, it is becoming common to offer an option to select a boot device during bootup. The following is an example of how to select a temporary boot device in a laptop:

  1. Interrupt the normal startup. In this case, the boot process shows that I can do that by pressing Enter:
    Figure 1.7 – Example of a BIOS message to interrupt normal startup

    Figure 1.7 – Example of a BIOS message to interrupt normal startup

  2. Choose a temporary start up device, in this case by pressing the F12 key:
    Figure 1.8 – Example of a BIOS menu for interrupted startup

    Figure 1.8 – Example of a BIOS menu for interrupted startup

  3. Select the device to boot from. We want to boot from our USB thumb drive, which, in this case, is USB HDD: ChipsBnk Flash Disk:
Figure 1.9 – Example of a BIOS menu to choose the USB HDD boot device

Figure 1.9 – Example of a BIOS menu to choose the USB HDD boot device

Let the system start the installer from the USB drive.

Once we know how to prepare a USB drive with an RHEL installer, and how to make a physical machine to boot from it, we can skip to the Running an RHEL installation section in this chapter and proceed to install it. This can be pretty useful if we have a mini server (in other words, an Intel NUC), an old computer, or a laptop to be used as the machine for following along with this book.

Next, we will look at how to prepare a virtual machine in your installation, in case you are considering following this book with your current main laptop (or workstation) but you still want to keep a separate machine to work with.

Preparation for a virtual server installation

A virtual server works like having some virtualization software that emulates a real machine in your current system. In a Linux workstation, installing virt-manager will add all the under-the-hood components required to run (for your information, these components are KVM, Libvirt, Qemu, and virsh, among others). Other no-cost virtualization software, recommended for Windows or macOS systems, includes Oracle VirtualBox and VMware Workstation Player.

The examples in this section will be executed using virt-manager, but are easily applicable to any other virtualization software, whether in a laptop or in the largest deployments.

The preliminary steps have been described above and require obtaining the Red Hat Enterprise Linux ISO image, which, in this case, will be rhel-8.3-x86_64-dvd.iso. Once downloaded and, if possible, having checked its integrity (as mentioned in the last tip of the Obtaining RHEL software and a subscription section), let's prepare to deploy a virtual machine:

  1. Start your virtualization software, in this case, virt-manager:
    Figure 1.10 – The virtual manager main menu

    Figure 1.10 – The virtual manager main menu

  2. Create a new virtual machine by going to File and then clicking on New Virtual Machine. Select Local install media (ISO Image or CDROM):
    Figure 1.11 – Virtual manager – New VM menu

    Figure 1.11 – Virtual manager – New VM menu

  3. Select the ISO image. With this, the virtual machine will be configured with a virtual DVD/CDROM drive and already prepared to boot from it. This is customary behavior. However, when using a different virtualization software, you may want to perform a check:
    Figure 1.12 – The virtual manager menu to select an ISO image as an installation medium

    Figure 1.12 – The virtual manager menu to select an ISO image as an installation medium

  4. Assign memory and CPU to the virtual machine we are creating (note: a virtual machine is usually referred to as a VM). For Red Hat Enterprise Linux 8 (also referred to as RHEL8), 1.5 GB of memory is the minimum, while 1.5 GB per logical CPU is recommended. We will use the minimum settings (1.5 GB memory, 1 CPU core):
    Figure 1.13 – The virtual manager menu for selecting memory and CPU

    Figure 1.13 – The virtual manager menu for selecting memory and CPU

    It is time to assign at least one disk to the virtual machine. In this case, we will assign a single disk with the minimum disk space, 10 GB, but in future chapters, we will be able to assign more disks to test other functionalities:

    Figure 1.14 – The virtual manager menu to create a new disk and add it to the virtual machine

    Figure 1.14 – The virtual manager menu to create a new disk and add it to the virtual machine

  5. Our virtual machine has all that we need to get started: A boot device, memory, CPU, and disk space. In this last step, a network interface is added, so now we even have a network. Let's review the data and launch it:
Figure 1.15 – The virtual manager menu for selecting the name of the virtual machine and the network

Figure 1.15 – The virtual manager menu for selecting the name of the virtual machine and the network

After taking these steps, we have a fully functional virtual machine available. Now it is time to complete the process by installing the RHEL operating system on it. Check how to do this in the next section.

Running an RHEL installation

Once we have prepared our virtual or physical server for installation, it's time to proceed with it. We will know whether all the previous steps were performed correctly if we arrive at the following screen:

Figure 1.16 – Initial boot screen for RHEL8 installation with Install selected

Figure 1.16 – Initial boot screen for RHEL8 installation with Install selected

We are offered three options (selected in white):

  • Install Red Hat Enterprise Linux 8.3: This option will boot and run the installer.
  • Test this media & install Red Hat Enterprise Linux 8.3: This option will check the image being used to ensure that it is not corrupt, and that the installation can proceed with certainty. It is recommended to use this one for the first time using a just downloaded ISO image or just created media, such as a USB thumb drive or DVD (in a virtual machine, it takes approximately 1 minute to run the check).
  • Troubleshooting: This option will help you review other options in case there are problems with installation, with a running system, or with hardware. Let's take a quick look at the available options on this menu:

    Install Red Hat Enterprise Linux 8.3 in basic graphics mode: This option is useful for systems with an old graphics card and/or an unsupported one. It can help to get the system installed in case an issue with visualization is identified.

    Rescue a Red Hat Enterprise Linux system: This option can be used when we have a system with issues booting or when we want to access it to introspect it (in other words, review a possible compromised system). It will initiate a basic in-memory system to perform these tasks.

    Run a memory test: The system memory can be checked to prevent issues, as in the case of a brand-new server, for instance, where we want to ensure that its memory is running correctly, or a system suffering issues and panics that may indicate a memory-related issue.

    Boot from local drive: In case you booted from the install media, but you already have a system installed.

    Return to main menu: To go back to the previous menu.

    Important note

    The RHEL boot menu will show several options. The one selected will show in white, with one single letter in a different color, in this case, "i" for install and "m" for test media. These are shortcuts. Pressing the key with that letter will take us directly to this menu item.

Let's proceed with Test this media & install Red Hat Enterprise Linux 8.3 to let the installer review the ISO image we are using:

Figure 1.17 – RHEL8 ISO image self-check

Figure 1.17 – RHEL8 ISO image self-check

Once completed, it will reach the first installation screen. The installer is called Anaconda (a joke, as it is written in a language called Python, and it follows a step-by-step approach). It is important to pay attention to the options we will select during installation, as we will review them later in the Automating deployments with Anaconda section of the book.

Localization

The first step to installation is selecting the installation language. For this installation, we will select English, followed by English (United States):

Figure 1.18 – RHEL8 install menu – Language

Figure 1.18 – RHEL8 install menu – Language

In case you cannot easily find your language, you may type it in the box under the list to search for it. Once a language is selected, we can click the Continue button to proceed. This will take us to the INSTALLATION SUMMARY screen:

Figure 1.19 – RHEL8 install menu – Main page

Figure 1.19 – RHEL8 install menu – Main page

On the INSTALLATION SUMMARY screen, all the configuration parts required are shown, with many of them (the ones without a warning sign and red text underneath) already preconfigured with defaults.

Let's review the LOCALIZATION settings. First, Keyboard:

Figure 1.20 – RHEL8 install – The Keyboard selection icon

Figure 1.20 – RHEL8 install – The Keyboard selection icon

We can review the keyboard settings, which can help, not just changing the keyboard, but adding extra layouts in case we want to switch between them:

Figure 1.21 – RHEL8 install – Keyboard selection dialog

Figure 1.21 – RHEL8 install – Keyboard selection dialog

This can be done by clicking on the + button. Here is an example of adding the Spanish; Castilian (Spanish) layout. We search for spa until it appears, and then we select it and then click Add, as follows:

Figure 1.22 – RHEL8 install – Keyboard selection list

Figure 1.22 – RHEL8 install – Keyboard selection list

To make it the default option will require clicking on the ^ button underneath. In this case, we will keep it as a secondary option so that the supporting software gets installed. Once completed, click Done:

Figure 1.23 – RHEL8 install – Keyboard selection dialog with different keyboards

Figure 1.23 – RHEL8 install – Keyboard selection dialog with different keyboards

Now, we will move on to Language Support:

Figure 1.24 – RHEL8 install – Language selection icon

Figure 1.24 – RHEL8 install – Language selection icon

Here, we can also add our local language. In this example, I'll use Español, and then Español (España). This will again include the software required to support the language that has been added:

Figure 1.25 – RHEL8 install – Language selection dialog with different languages

Figure 1.25 – RHEL8 install – Language selection dialog with different languages

We will proceed with both languages configured, although you may want to choose your own localized language.

Now, we will move on to Time & Date, which can be seen as follows:

Figure 1.26 – RHEL8 install – Time and Date selection icon

Figure 1.26 – RHEL8 install – Time and Date selection icon

The default configuration is set to the city of New York in the United States of America. You have two possibilities here:

  • Use your local time zone. This is recommended when you want to have all the logs registered in that time zone (in other words, because you are only working in one time zone or because there are local teams for each time zone). In this example, we are selecting the Spain, Madrid, Europe time zone:
Figure 1.27 – RHEL8 install – Time and Date selection dialog – Madrid selected

Figure 1.27 – RHEL8 install – Time and Date selection dialog – Madrid selected

  • Use Coordinated Universal Time (also known as UTC) to have the same time zone for all the servers around the globe. This can be selected under Region: | Etc, and then City: | Coordinated Universal Time:
Figure 1.28 – RHEL8 install – Time and Date selection dialog – UTC selected

Figure 1.28 – RHEL8 install – Time and Date selection dialog – UTC selected

We will proceed with the localized time for Spain, Madrid, Europe, although you may want to select your localized time zone.

Tip

As you can see in the screen, there is an option to select Network Time to have the machine's clock synchronized with other machines. This option can only be selected once the network is configured.

Software

With the Localization configuration completed (or almost completed; we may come back for the network time later), we move on to the Software section, or, more precisely, to Connect to Red Hat under it:

Figure 1.29 – RHEL8 install – Connect to Red Hat selection icon

Figure 1.29 – RHEL8 install – Connect to Red Hat selection icon

In this section, we can use our own Red Hat account, like the one we created previously under developers.redhat.com, to access the latest updates for the system. To configure it, we will need to configure the network first.

For the purposes of this deployment, we will not configure this section now. We will review how to manage subscriptions and get updates in Chapter 7, Adding, Patching, and Managing Software, of this book.

Important note

Systems management with Red Hat Satellite: For large deployments with more than 100 servers, Red Hat offers "Red Hat Satellite," with advanced software management capabilities (such as versioned content views, centralized security scans with OpenSCAP, and simplified patching and updating for RHEL). To connect to a Red Hat Satellite, the activation key can be used, thereby simplifying the management of systems.

Let's now move on to Installation Source, as follows:

Figure 1.30 – RHEL8 install – Installation Source icon

Figure 1.30 – RHEL8 install – Installation Source icon

This can be used for installation using remote sources. It is very useful when using the boot ISO image that only contains the installer. In this case, as we are using the full ISO image, it already contains all the software (also referred to as packages) needed to complete the installation.

The next step is Software Selection, as shown in the following screenshot:

Figure 1.31 – RHEL8 install – Software Selection icon

Figure 1.31 – RHEL8 install – Software Selection icon

In this step, we can select a predefined set of packages to be installed on the system so that it can perform different tasks. While it can be very convenient to do so in this stage, we are going to adopt a more manual approach and select the Minimal Install profile to add software to the system later.

This approach also has the advantage of reducing the attack surface by installing just the minimum required packages in the system:

Figure 1.32 – RHEL8 install – Software Selection menu; Minimal Install selected

Figure 1.32 – RHEL8 install – Software Selection menu; Minimal Install selected

System

Once the set of packages has been selected, let's move on to the System configuration section. We will start with the destination of the installation, where we can choose the disk or disks to be used to install and configure them:

Figure 1.33 – RHEL8 install – Installation Destination icon with a warning sign as this step is not complete

Figure 1.33 – RHEL8 install – Installation Destination icon with a warning sign as this step is not complete

This task is very important as it will define not just the way the system is deployed on the disk, but also how the disk is distributed and with which tools. Even when in this section, we won't use the advanced options. We will take some time to review the main options.

This is the default Device Selection screen, with only one local standard disk discovered, no Specialized & Network Disks options, and ready to run the Automatic partitioning. This can be seen in the following screenshot:

Figure 1.34 – RHEL8 install – INSTALLATION DESTINATION menu, with automatic partitioning selected

Figure 1.34 – RHEL8 install – INSTALLATION DESTINATION menu, with automatic partitioning selected

Clicking Done in this section will complete the minimal set of data required to continue with the installation.

Let's review the sections.

Local Standard Disks are a set of disks to be used by the installer. It may be the case that we have several disks, and we only want to use a specific disk:

Figure 1.35 – RHEL8 install – INSTALLATION DESTINATION menu, with several local disks selected

Figure 1.35 – RHEL8 install – INSTALLATION DESTINATION menu, with several local disks selected

This is an example of having three available disks and using only the first and third ones.

In our case, we only have one disk, and it is already selected:

Figure 1.36 – RHEL8 install – INSTALLATION DESTINATION menu, with a single local disk selected

Figure 1.36 – RHEL8 install – INSTALLATION DESTINATION menu, with a single local disk selected

It would be easy to use full disk encryption by selecting Encrypt my data, which is highly recommended for laptop installations or for installing in environments with low levels of trust:

Figure 1.37 – RHEL8 install – INSTALLATION DESTINATION menu, with the data encryption option (not selected)

Figure 1.37 – RHEL8 install – INSTALLATION DESTINATION menu, with the data encryption option (not selected)

For this example, we will not encrypt our drive.

The Automatic install option will distribute the disk space automatically:

Figure 1.38 – RHEL8 install – INSTALLATION DESTINATION menu; Storage Configuration (Automatic)

Figure 1.38 – RHEL8 install – INSTALLATION DESTINATION menu; Storage Configuration (Automatic)

It will do so by creating the following resources:

  • /boot: Space to allocate the system core (kernel) and files to help during the boot process (such as the initial boot image, initrd).
  • /boot/efi: Space to support the EFI boot process.
  • /": The root filesystem. This is the main storage space where the system lives. Other disks/partitions will be assigned to folders (when doing so, they will be called mountpoints).
  • /home: Space where the user will store personal files.

Let's select this option and then click Done.

Tip

System partitions and the boot process: Do not worry if you still do not fully understand some extended concepts regarding system partitions and boot processes. To cover the filesystems, partitions, and how to manage disk space, there is a chapter entitled Managing Local Storage and Filesystems dedicated to it. To review the boot process, there is a chapter entitled Understanding the Boot Process, which reviews step by step the full system start up sequence.

The next step involves reviewing Kdump, or Kernel Dump. This is a mechanism that allows the system to save the status in case a critical event happens and it crashes (it dumps the memory, hence its name):

Figure 1.39 – RHEL8 install – Kdump configuration icon

Figure 1.39 – RHEL8 install – Kdump configuration icon

In order to work, it will reserve some memory for itself where it will stay, waiting to act if the system crashes. The default configuration does a good calculation of the requirements:

Figure 1.40 – RHEL8 install – Kdump configuration menu

Figure 1.40 – RHEL8 install – Kdump configuration menu

Clicking Done will take us to the next step, Network & Host Name, which appears as follows:

Figure 1.41 – RHEL8 install – Network & Host Name configuration icon

Figure 1.41 – RHEL8 install – Network & Host Name configuration icon

This section will help to have the system connected to a network. In the case of a virtual machine, access to external networks will be handled by the Virtualization Software. It is very common that the default configuration uses Network Address Translation (NAT) and Dynamic Host Configuration Protocol (DHCP), which will provide a network configuration to the virtual machine and access to external networks.

Once on the configuration page, we can see how many network interfaces are assigned to our machine. In this case, there is only one, as follows:

Figure 1.42 – RHEL8 install – NETWORK & HOST NAME configuration menu

Figure 1.42 – RHEL8 install – NETWORK & HOST NAME configuration menu

First, we can enable the interface by clicking on the ON/OFF toggle on the right. To turn it off, it looks like this:

Figure 1.43 – RHEL8 install – NETWORK & HOST NAME configuration toggle (OFF)

Figure 1.43 – RHEL8 install – NETWORK & HOST NAME configuration toggle (OFF)

And to turn it on, it should look like this:

Figure 1.44 – RHEL8 install – NETWORK & HOST NAME configuration toggle (ON)

Figure 1.44 – RHEL8 install – NETWORK & HOST NAME configuration toggle (ON)

We will see that the interface now has a configuration (IP Address, Default Route, and DNS):

Figure 1.45 – RHEL8 install – NETWORK & HOST NAME configuration information details

Figure 1.45 – RHEL8 install – NETWORK & HOST NAME configuration information details

To make this change permanent, we will click the Configure button at the bottom-right corner of the screen to edit the interface configuration:

Figure 1.46 – RHEL8 install – NETWORK & HOST NAME configuration; interface configuration; Ethernet tab

Figure 1.46 – RHEL8 install – NETWORK & HOST NAME configuration; interface configuration; Ethernet tab

Clicking on the General tab will present the main options. We will select Connect automatically with priority and leave the value as 0, just like this:

Figure 1.47 – RHEL8 install – NETWORK & HOST NAME configuration; interface configuration; General tab

Figure 1.47 – RHEL8 install – NETWORK & HOST NAME configuration; interface configuration; General tab

Clicking Save will make the changes permanent and have this network interface enabled by default.

Now it's time to give a name to our virtual server. We will go to the Host Name section in the main page and type the name we want for it. We can use rhel8.example.com, and then click Apply:

Figure 1.48 – RHEL8 install – NETWORK & HOST NAME configuration; Host Name detail

Figure 1.48 – RHEL8 install – NETWORK & HOST NAME configuration; Host Name detail

Tip

The domain example.com is used for demonstration purposes, and it is safe to be used on any occasion, knowing that it will not collide or cause any trouble to other systems or domains.

The networking page will look like this:

Figure 1.49 – RHEL8 install – NETWORK & HOST NAME configuration menu; configuration complete

Figure 1.49 – RHEL8 install – NETWORK & HOST NAME configuration menu; configuration complete

Clicking Done will take us back to the main installer page, with a system connected to a network and prepared to connect once the installation is complete.

The chapter entitled Enabling Network Connectivity will describe in more detail the options available to configure the network in an RHEL system.

Important note

Now that the system is connected to the network, we can go back to Time & Date and enable network time (which is done automatically by the installer), as well as go to Connect to Red Hat to subscribe the system to Red Hat's Content Distribution Network (or CDN). The subscription of the system to the CDN will be explained in detail in Chapter 7, Adding, Patching, and Managing Software.

It is now time to review the final system option, security profiles, by going to Security Policy as follows:

Figure 1.50 – RHEL8 install – Security Policy configuration icon

Figure 1.50 – RHEL8 install – Security Policy configuration icon

In it, we will see a list of security profiles that can be enabled by default in our system:

Figure 1.51 – RHEL8 install – SECURITY POLICY configuration menu

Figure 1.51 – RHEL8 install – SECURITY POLICY configuration menu

The security profiles have requirements that we are not covering in this installation (such as having separate /var or /tmp partitions). We can click on Apply security policy to turn it off, and then on Done:

Figure 1.52 – RHEL8 install – Security policy configuration toggle (off)

Figure 1.52 – RHEL8 install – Security policy configuration toggle (off)

More on this topic will be covered in Chapter 11, System Security Profiles with OpenSCAP.

User settings

The main administrator user in a Unix or Linux system is called root.

We can enable a root user by clicking in the Root Password section, although this is not necessary and, in security restricted environments, you are advised not to do so. We will do so in this chapter in order to learn how to do it and explain the cases covered:

Figure 1.53 – RHEL8 install – Root Password configuration icon (warning as it is not set)

Figure 1.53 – RHEL8 install – Root Password configuration icon (warning as it is not set)

After clicking on Root Password, we are presented with a dialog to type it:

Figure 1.54 – RHEL8 install – Root Password configuration menu

Figure 1.54 – RHEL8 install – Root Password configuration menu

It is recommended that the password has the following:

  • More than 10 characters (and a minimum of 6)
  • Lowercase and uppercase
  • Numbers
  • Special characters (such as $, @, %, and &)

If the password does not meet those requirements, it will warn us and it will force us to click Done twice to use a weak password.

It is now time to create a user for the system by clicking on User Creation:

Figure 1.55 – RHEL8 install – User Creation configuration icon (warning as it is not complete)

Figure 1.55 – RHEL8 install – User Creation configuration icon (warning as it is not complete)

This will take us to a section to input user data:

Figure 1.56 – RHEL8 install – User Creation configuration menu

Figure 1.56 – RHEL8 install – User Creation configuration menu

The same password rules will apply here as in the previous section.

Clicking on Make this user administrator will enable the performance of administrative tasks (and also no need to configure the root password).

Tip

As a good practice, do not use the same password for the root account and for the user account.

The Chapter 5, Securing Systems with Users, Groups, and Permissions includes a section on how to use and manage administrative privileges for users with the sudo tool.

Click on Done to return to the main installer screen. The installer is ready to proceed with the installation. The main page will look like this:

Figure 1.57 – RHEL8 install – Main menu once completed

Figure 1.57 – RHEL8 install – Main menu once completed

Clicking on Begin Installation will launch the installation process:

Important note

If any of the steps required to start the installation are omitted, the Begin Installation button will be grayed out, and therefore not available to be clicked.

Figure 1.58 – RHEL8 install – Installation in progress

Figure 1.58 – RHEL8 install – Installation in progress

Once the installation is complete, we can click on Reboot System and it will be ready to use:

Figure 1.59 – RHEL8 install – Installation complete

Figure 1.59 – RHEL8 install – Installation complete

It is important to remember to detach the ISO image from the virtual machine (or remove the USB thumb drive from the server) and check that the boot order is properly configured in the system.

Your first Red Hat Enterprise Linux 8 system is now ready! Congratulations.

As you can see, it is easy to install RHEL in a virtual or physical machine and have it ready to be used for any service we want to run in it. In the cloud, the process is very different as machines are instantiated from images to run. In the next chapter, we will review how to run RHEL in a virtual machine instance in the cloud.

Summary

The Red Hat Certified System Administrator exam is entirely practical, based on real-world experience. The best way to prepare for it is by practicing as much as possible, which is why this book begins by providing access to Red Hat Enterprise Linux 8 (RHEL8) and offering alternatives on how to deploy your own virtual machine.

Different scenarios are covered regarding installation. These are the most common ones, and include using a physical machine, a virtual machine, or a cloud instance. In this chapter, we focused on using a virtual machine or a physical one.

When using physical hardware, we will be focusing on the fact that many people like to reuse old hardware, buy second-hand or cheap mini servers, or even use their laptop as the primary installation for their Linux experience.

In the case of virtual machines, we are thinking about the people that want to keep all their work on the same laptop, but without messing with their current operating system (which may not even be Linux). This could also work well with the previous option by having virtual machines on your own mini server.

After this chapter, you are ready to proceed with the rest of the book, having at least an instance or Red Hat Enterprise Linux 8 available to work with and practice on.

In the next chapter, we will review a number of advanced options, such as using the cloud for RHEL instances, automating the installation, and best practices.

Let's get started!

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn the most common administration and security tasks and manage enterprise Linux infrastructures efficiently
  • Assess your knowledge using self-assessment questions based on real-world examples
  • Understand how to apply the concepts of core systems administration in the real world

Description

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.

Who is this book for?

This book is for IT professionals or students who want to start a career in Linux administration and anyone who wants to take the RHCSA 8 certification exam. Basic knowledge of Linux and familiarity with the Linux command-line is necessary.

What you will learn

  • Deploy RHEL 8 in different footprints, from bare metal and virtualized to the cloud
  • Manage users and software on local and remote systems at scale
  • Discover how to secure a system with SELinux, OpenSCAP, and firewalld
  • Gain an overview of storage components with LVM, Stratis, and VDO
  • Master remote administration with passwordless SSH and tunnels
  • Monitor your systems for resource usage and take actions to fix issues
  • Understand the boot process, performance optimizations, and containers

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 11, 2021
Length: 534 pages
Edition : 1st
Language : English
ISBN-13 : 9781800567528

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 11, 2021
Length: 534 pages
Edition : 1st
Language : English
ISBN-13 : 9781800567528

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 201.97
Mastering Ansible, 4th Edition
S$59.99
Red Hat Enterprise Linux 8 Administration
S$74.99
Linux for Networking Professionals
S$66.99
Total S$ 201.97 Stars icon
Banner background image

Table of Contents

24 Chapters
Section 1: Systems Administration – Software, User, Network, and Services Management Chevron down icon Chevron up icon
Chapter 1: Installing RHEL8 Chevron down icon Chevron up icon
Chapter 2: RHEL8 Advanced Installation Options Chevron down icon Chevron up icon
Chapter 3: Basic Commands and Simple Shell Scripts Chevron down icon Chevron up icon
Chapter 4: Tools for Regular Operations Chevron down icon Chevron up icon
Chapter 5: Securing Systems with Users, Groups, and Permissions Chevron down icon Chevron up icon
Chapter 6: Enabling Network Connectivity Chevron down icon Chevron up icon
Chapter 7: Adding, Patching, and Managing Software Chevron down icon Chevron up icon
Section 2: Security with SSH, SELinux, a Firewall, and System Permissions Chevron down icon Chevron up icon
Chapter 8: Administering Systems Remotely Chevron down icon Chevron up icon
Chapter 9: Securing Network Connectivity with firewalld Chevron down icon Chevron up icon
Chapter 10: Keeping Your System Hardened with SELinux Chevron down icon Chevron up icon
Chapter 11:System Security Profiles with OpenSCAP Chevron down icon Chevron up icon
Section 3: Resource Administration – Storage, Boot Process, Tuning, and Containers Chevron down icon Chevron up icon
Chapter 12: Managing Local Storage and Filesystems Chevron down icon Chevron up icon
Chapter 13: Flexible Storage Management with LVM Chevron down icon Chevron up icon
Chapter 14: Advanced Storage Management with Stratis and VDO Chevron down icon Chevron up icon
Chapter 15: Understanding the Boot Process Chevron down icon Chevron up icon
Chapter 16: Kernel Tuning and Managing Performance Profiles with tuned Chevron down icon Chevron up icon
Chapter 17: Managing Containers with Podman, Buildah, and Skopeo Chevron down icon Chevron up icon
Section 4: Practical Exercises Chevron down icon Chevron up icon
Chapter 18: Practice Exercises – 1 Chevron down icon Chevron up icon
Chapter 19: Practice Exercise – 2 Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(4 Ratings)
5 star 75%
4 star 0%
3 star 25%
2 star 0%
1 star 0%
MKO Jan 11, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Ich arbeite seit vielen Jahren mit Linux,Fedora und auch RedHat Linux. Dieses Buch ist geeignet für den Einsteiger in RedHat Linux, wie auch für fortgeschrittene Admins.Das Buch ist gut sortiert nach den verschiedenen Adminstrationsthemen, (z.B. Usermanagement, Storagemanagement). Hierdurch kann man sehr gut punktuell nachlesen, wie man administrative Aufgaben effizient umsetzt. Die Konzepte werden verständlich beschrieben und man kann sich dann in die einzelnen erforderlichen Adminstrationskommandos einlesen, mit den man sein entwickeltes Konzept umsetzen kann. Trotz langjähriger Administrationserfahrung, konnte ich so die ein oder andere Aufgabenstellung eleganter und schneller lösen, als es ohne das Buch mögliuch gewesen wäre.Aus diesem Grunde eine klare Kaufempfehlung für alle, die Red Hat Enterprise Linux 8 (oder entsprechende Clones) administrierenHierbei waren
Amazon Verified review Amazon
Mr. Banner Mar 20, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great read for the aspiring Certified RedHat Sys Admin.
Amazon Verified review Amazon
Rahul Agrawal Feb 24, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great guide to be prepared for the Red Hat RHCSA Certification. The book is very well prepared, easy to understand with plenty of examples, self-assessment questions, tips, best practices, and practical exercises with detailed solutions which I liked the most.
Amazon Verified review Amazon
Daniel D. Mar 24, 2022
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Unfortunately technical writers and end users disagree on how a manual should be written. The indexing on this one is worse than usual, however. But the content is on par with others. These books are more written for brushing up rather than learning. I find this true of every manual, regardless of who wrote it. I don't need to brush up on this I need to learn it.So, it's average, for what it is. You will find that there are things that must always be done together, but you won't find any mention of that in these kinds of books. It's frustrating, really, but there is no other choice. As far as books go, that is. YouTube has similar issues on the subject matter but is often better at getting to what I need. It's just difficult to find exactly what I need in a timely manner.So, final word, get this book AND search YouTube. Or get any book and search YouTube.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.