Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

RHCSA Red Hat Enterprise Linux 8 (UPDATED): Training and Exam Preparation Guide (EX200), Second Edition
RHCSA Red Hat Enterprise Linux 8 (UPDATED): Training and Exam Preparation Guide (EX200), Second Edition
RHCSA Red Hat Enterprise Linux 8 (UPDATED): Training and Exam Preparation Guide (EX200), Second Edition
Ebook1,367 pages12 hours

RHCSA Red Hat Enterprise Linux 8 (UPDATED): Training and Exam Preparation Guide (EX200), Second Edition

Rating: 5 out of 5 stars

5/5

()

Read preview
  • User Management

  • Linux

  • Package Management

  • Networking

  • Command Line Interface

  • Mentor

  • Chosen One

  • Quest

  • Journey

  • Test

  • Technology

  • Technobabble

  • Challenge

  • Power of Friendship

  • Big Bad

  • System Administration

  • Rhcsa Exam

  • Security

  • Virtual Machines

  • Shell Scripting

About this ebook

HIGHLIGHTS

> Covers Red Hat Enterprise Linux 8

> Covers ALL Latest Official Exam Objectives

(including Shell Scripting and Containers)

> Great for Self-Study and In-Class/Virtual Training

> 23 Chapters

> 108

LanguageEnglish
Release dateNov 13, 2020
ISBN9781775062158
RHCSA Red Hat Enterprise Linux 8 (UPDATED): Training and Exam Preparation Guide (EX200), Second Edition

Read more from Asghar Ghori

Related to RHCSA Red Hat Enterprise Linux 8 (UPDATED)

Related ebooks

Operating Systems For You

View More

Related articles

Reviews for RHCSA Red Hat Enterprise Linux 8 (UPDATED)

Rating: 5 out of 5 stars
5/5

2 ratings1 review

What did you think?

Tap to rate

Review must be at least 10 words

  • Rating: 5 out of 5 stars
    5/5
    Excelente libro para la certificación RHCSA versión 8. Lo recomiendo.

Book preview

RHCSA Red Hat Enterprise Linux 8 (UPDATED) - Asghar Ghori

Chapter 01

Local Installation

This chapter describes the following major topics:

A quick look at Linux and Open Source

Linux distribution from Red Hat

Recommended lab setup for RHCSA exam preparation

Overview of the installer program

Where are installation messages stored?

What are virtual console screens?

Download and install VirtualBox

Create virtual machine

Download and install Red Hat Enterprise Linux 8 in virtual machine

Execute post-installation configuration tasks

Log in and out at the graphical console

Log in and out at over the network

RHCSA Objectives:

04. Access remote systems using ssh

This chapter sets up the foundation for learning and practicing the exam objectives for RHCSA

Linux is a free operating system and it has been in existence for almost three decades. Its source code is available to developers, amateurs, and general public for enhancements and customization. Red Hat Inc. modifies a copy of a selected version of Linux source code and introduces features, adds improvements, and fixes bugs. The company packages the updated version as a Linux distribution of their own for commercial purposes. This distribution is thoroughly tested to run smoothly and perform well on a wide range of computer hardware platforms. It is stable, robust, feature-rich, and is ready to host workload of any size.

Red Hat Enterprise Linux may be downloaded for learning, practicing, and preparing for the RHCSA exam. It is available as a single installable image file. A lab environment is necessary to practice the procedures to solidify the understanding of the concepts and tools learned. The install process requires careful planning to identify critical system configuration pieces prior to launching the installer program. Once the operating system is installed, users can log in at the console or over the network.

A Quick Look at Linux Development

Linux is a free computer operating system (OS) that is similar to the UNIX OS in terms of concepts, features, functionality, and stability. It is referred to as a UNIX-like operating system.

Linux powers an extensive range of computer hardware platforms, from laptop and desktop computers to massive mainframes and supercomputers. Linux also runs as the base OS on networking, storage, gaming, smart television, and mobile devices. Numerous vendors, including Red Hat, IBM, Canonical, Oracle, DXC Technology, Novell, and Dell, offer commercial support to Linux users worldwide.

Linux is the main alternative to proprietary UNIX and Windows operating systems because of its functionality, adaptability, portability, and cost-effectiveness. At present, over one hundred different Linux distributions are circulating from various vendors, organizations, non-profit groups, and individuals, though only a few of them are popular and widely recognized.

Linux is largely used in government agencies, corporate businesses, academic institutions, scientific organizations, as well as in home computers. Linux deployment and usage are constantly on the rise.

Linux History in a Nutshell

In 1984, Richard Stallman, an American software engineer, had a goal to create a completely free UNIX-compatible open source (non-proprietary) operating system. The initiative was called the GNU Project (GNU’s Not Unix) and by 1991, significant software had been developed. The only critical piece missing was a core software component called kernel to drive and control the GNU software and to regulate its communication with the hardware.

Around the same time, Finnish computer science student Linus Torvalds developed a kernel and proclaimed its availability. The new kernel was named Linux, and it was gradually integrated with the GNU software to form what is now referred to as GNU/Linux, Linux operating system, or simply Linux.

Linux was released under the GNU General Public License (GPL). Initially written to run on Intel x86-based computers, the first version (0.01) was released in September 1991 with little more than 10,000 lines of code. In 1994, the first major release (1.0.0) was introduced, followed by a series of successive major and minor versions until the version 4.0 in 2015. Development and enhancements continued, and version 4.0 was followed by several stable versions. At the time of this writing, version 4.19, with its millions of lines of code, is the latest stable kernel.

The Linux kernel, and the operating system in general, has been enhanced with contributions from tens of thousands of software programmers, amateurs, and organizations around the world into a large and complex system under GNU GPL, which provides public access to its source code free of charge and with full consent to amend, package, and redistribute.

Linux from Red Hat

Red Hat, Inc., founded in 1993, used the available Linux source code and created one of the first commercial Linux operating system distribution called Red Hat Linux (RHL). The company released the first version 1.0 in November 1994. Several versions followed until the last version in the series, Red Hat Linux 9 (later referred to as RHEL 3), based on kernel 2.4.20, was released in March 2003. Red Hat renamed their Red Hat Linux brand as Red Hat Enterprise Linux (RHEL) commencing 2003.

RHL was originally assembled and enhanced within the Red Hat company. In 2003, Red Hat sponsored and facilitated the Fedora Project and invited the user community to join hands in enhancing and updating the source code. This project served as the test bed for developing and testing new features and enabled Red Hat to include the improved code in successive versions of RHEL.

The Fedora distribution is completely free, while RHEL is commercial. RHEL 4 (based on kernel 2.6.9 and released in February 2005), RHEL 5 (based on kernel 2.6.18 and released in March 2007), RHEL 6 (based on kernel 2.6.32 and released in November 2010), RHEL 7 (based on kernel 3.10 and released in June 2014), and RHEL 8 (based on kernel 4.18 and released in May 2019) have been built using Fedora distributions 3, 6, 12, 13, 19, and 28, respectively.

RHEL 8 has been tested to run on bare-metal computer hardware, virtualized platforms, high-end graphics workstations, IBM Power little endian, IBM System Z, and in the cloud.

Lab Infrastructure for Practice

RHEL 8 is available as a free download from Red Hat for Intel and AMD processor machines. You will need to create a free Red Hat user account in order to download it. The downloaded image file can then be attached to a Virtual Machine (VM) as an ISO image, burned to a DVD to support installation on a physical computer, or placed on a remote server for network-based installations via HTTP, FTP, or NFS protocols.

An ISO image is a single file that represents the content of an entire DVD or CD.

Burning the image to a DVD and configuring a server for network-based installation are beyond the scope of this book. This chapter will focus on installing the operating system with an ISO image.

What is Needed for the Lab?

Throughout this book, there will be several discussions about system, network, and security, along with examples on how to implement and administer them. Each chapter will contain a number of exercises that will help you perform certain tasks and execute commands.

You’ll need a laptop or a desktop computer with at least a dual-core processor, 8GB of physical memory, and 27GB of free storage space to run two virtual machines with required storage. If you want to use the static IP addresses on your home router, make sure that you keep a map between them, and the ones provided below to avoid any confusion. The computer must have hardware virtualization support enabled in the BIOS to allow for 64-bit OS installation. Here is a snapshot of what is needed and how it will be configured:

The entire setup for the lab is shown in Figure 1-1.

Figure 1-1 Lab Setup

You will install VirtualBox 5.2.24 (or higher) on Windows 10 or MacOS 10.12 (or higher). You may use VMware or other virtualization software as an alternative; however, all of the exercises and examples in this book reference VirtualBox (VB).

The RHEL Installer Program

The RHEL installer program is called Anaconda. There are several configuration options on the main screen that require modification before the installation process begins. Some of the questions are compulsory and must be answered appropriately while others are optional and may be skipped for post-installation setup.

The configuration can be done in any sequence that you prefer. You should have the minimum mandatory configuration data handy and be ready to enter it when prompted. Some of the key configuration items are language, keyboard type, time zone, disk partitioning, hostname/IP, software selection, root password, user information, and kdump.

Where Do Installation Logs Go?

There are plentiful log files created and updated as the installation progresses. These files record configuration and status information. You can view their contents after the installation has been completed to check how the installation proceeded. These files are described in Table 1-1.

Table 1-1 Installation Logs

Files in the /var/log/anaconda directory are actually created and updated in the /tmp directory during the installation; however, they are moved over once the installation is complete.

Virtual Console Screens

During the installation, there are six text-based virtual console screens available to monitor the process, view diagnostic messages, and discover and fix any issues encountered. The information displayed on the console screens is captured in the installation log files (Table 1-1). You can switch between screens by pressing a combination of keys as described below.

Console 1 (Ctrl+Alt+F1): This is the main screen. Before Anaconda begins, you will select a language to use during installation, and then it will switch the default console to the sixth screen (Console 6).

Console 2 (Ctrl+Alt+F2): The screen displays the shell interface to run commands as the root user.

Console 3 (Ctrl+Alt+F3): This screen displays installation messages and stores them in /tmp/anaconda.log file. This file also captures information on detected hardware, in addition to other data.

Console 4 (Ctrl+Alt+F4): This screen shows storage messages and records them in /tmp/storage.log file.

Console 5 (Ctrl+Alt+F5): This screen displays program messages and logs them to /tmp/program.log file.

Console 6 (Ctrl+Alt+F6): This is the default graphical configuration and installation console screen.

Exercise 1-1: Download and Install VirtualBox Software, and Create a Virtual Machine

In this exercise, you will download and install VirtualBox software. You will create a virtual machine to set up the foundation to install RHEL 8 for the next exercise.

EXAM TIP: Downloading and installing VirtualBox software and creating a virtual machine are not part of the exam objectives. These tasks have been included here only to support readers with building their own lab environment for practice.

Downloading and Installing VirtualBox

VirtualBox is available for free download and use. At the time of this writing, the latest version is 6.0; however, you can use any previous 5.x or a future version. Here is a quick guide on how to download and install the current version of VirtualBox on a Windows 10 computer.

1.Go to www.virtualbox.org (Figure 1-2) and click Download VirtualBox 6.0.

Figure 1-2 VirtualBox Website

2.On the next screen, click on Windows hosts. This will start the download to your computer.

Figure 1-3 VirtualBox Download

The software is now available on your computer.

3.Double-click on the VirtualBox binary to start the installation. Click Next to proceed on the first screen that appears.

Figure 1-4 VirtualBox Installation 1

4.If needed, choose a different location on the disk to install VirtualBox. Click Next to continue.

Figure 1-5 VirtualBox Installation 2

5.Untick any of the checked items if required and click Next to continue.

Figure 1-6 VirtualBox Installation 3

6.Accept the warning and continue by pressing Yes.

Figure 1-7 VirtualBox Installation 4

7.The setup wizard is now ready to begin the installation. Click Install to proceed.

Figure 1-8 VirtualBox Installation 5

8.Click Finish to continue.

Figure 1-9 VirtualBox Installation 6

This brings the installation of VirtualBox to a successful completion. It will also launch the application.

Creating a Virtual Machine

Use VirtualBox to create the first virtual machine called RHEL8-VM1 with specifications described earlier in this chapter. Here are the steps for the creation.

9.Launch VirtualBox if it is not already running. The interface looks similar to what is shown in Figure 1-10.

Figure 1-10 Virtual Machine Creation 1

10.Click on New on the top menu bar to start the virtual machine creation wizard (see Figure 1-11). Enter the name RHEL8-VM1, select Linux as the operating system type, and Red Hat (64-bit) as the version. For this demonstration, accept the default location to store the VM files on the C drive. Click Next to continue.

Figure 1-11 Virtual Machine Creation 2

11.In the next window, specify the memory size you want allocated to the VM. Accept the recommended 1GB for this VM and click Next.

Figure 1-12 Virtual Machine Creation 3

12.The VM will need a hard disk to store the RHEL 8 operating system. For this demonstration, choose the creation of a virtual hard disk option, which is also the default selection. The other two options are irrelevant for this exercise. You will adjust the recommended hard disk size of 8GB in a later step.

Figure 1-13 Virtual Machine Creation 4

13.The virtual hard disk is in essence a file. VirtualBox supports three different virtual hard disk file types: VDI (VirtualBox Disk Image), VHD (Virtual Hard Disk), and VMDK (Virtual Machine Disk). These file types represent VirtualBox, Microsoft, and VMware disk image formats. Select the default, VDI, for this demonstration.

Figure 1-14 Virtual Machine Creation 5

14.There are a couple of methods to allocate storage for the OS. A fixed allocation method reserves the entire specified capacity for the disk right away and takes a while to create the disk. In contrast, the dynamically allocated option only uses the amount of disk space that is needed for the storage without reserving the entire disk capacity. This option is preferred over the former. Click Next to continue with the default option.

Figure 1-15 Virtual Machine Creation 6

15.The RHEL 8 virtual disk image will be stored on a computer disk. The name of the VDI file will match the name of the virtual machine name. You can also specify the size for the disk. Enter 10GB for the OS disk and leave the VDI file storage location to the default.

Figure 1-16 Virtual Machine Creation 7

16.Clicking Next on the previous window completes the VM creation process and ends the wizard. VirtualBox will have the VM listed along with its configuration (see Figure 1-17).

Figure 1-17 Virtual Machine Creation 8

There are a number of other configurable items as depicted in Figure 1-17. You may have to adjust the display controller setting to VMSVGA under Display to view full screen content on the console and attach the network adapter to Bridged Adapter under Network for bi-directional communication with the Windows host and the Internet.

Exercise 1-2: Download and Install RHEL 8

This exercise will build server1 in RHEL8-VM1.

In this exercise, you will download RHEL 8 and install it in RHEL8-VM1 that you created in Exercise 1-1. You will attach the RHEL 8 ISO image to the VM, name the Linux system server1.example.com and IP 192.168.0.110. Additional configuration will be supplied as the installation advances.

EXAM TIP: Downloading and installing RHEL 8 are beyond the scope of the exam objectives. They have been included here only to support the readers with building their own lab environment for practice.

The user creation, base environments, storage partitioning, network device and connection configuration, time synchronization, and other topics are not explained as part of this exercise; however, they will be discussed in later chapters.

Downloading RHEL 8 ISO Image

RHEL 8 image is available for free download from Red Hat Developer’s webpage. You need to create a user account in order to log in and obtain a copy for yourself. Alternatively, you can use your credentials on Facebook, Google, LinkedIn, Twitter, etc. for login. For this demonstration, you will find instructions on how to open a new account and download the software.

1.Visit https://developers.redhat.com/login and click Create one now.

Figure 1-18 Red Hat User Account Creation 1

2.Fill out the form by providing a unique username, email address, and password. Make sure to checkmark the boxes to accept terms and conditions.

Figure 1-19 Red Hat User Account Creation 2

3.After an account has been created, go back to the login page https://developers.redhat.com/login and submit the credentials to log in.

4.Click on Linux at the top of the page under the Red Hat Developer logo.

Figure 1-20 Red Hat Developer Login

5.Click DOWNLOAD on the following page.

6.Click DOWNLOAD INTEL ISO on the subsequent page to initiate a download.

The filename of the downloaded image for RHEL version 8.0 will be rhel-8.0-x86_64-dvd.iso and it will be about 6.9GB in size. You can move this file to a disk location on your computer where you want it stored.

Attaching RHEL 8 ISO Image to the Virtual Machine

We now attach the RHEL 8 ISO image to RHEL8-VM1 in order to boot and install the OS in the VM. Click on [Optical Drive] Empty under Storage in VirtualBox for this VM and select Choose Disk Image. Navigate to where you have the ISO image stored. Highlight the image and click Open to attach it to the VM. After the image has been attached, the VirtualBox Storage configuration will look like Figure 1-21.

Figure 1-21 Attach ISO Image to VM

Leave the rest of the settings to their default values.

Launching the Installer

7.While the VM is highlighted in VirtualBox, click the Start button at the top to power up the VM.

8.A console screen pops up displaying the boot menu (Figure 1-22) with three options. Press the Spacebar key to halt the autoboot process.

Figure 1-22 Boot Menu

The first option, Install Red Hat Enterprise Linux 8.0.0, is usually used for installing RHEL 8 unless you want the installation media tested for integrity before continuing, in which case you will select the second option. Anaconda waits 60 seconds for you to alter the selection, or it proceeds and autoboots using the second option on the list, which is also the default. The third option, Troubleshooting, allows you to address some boot-related issues that might occur during installation.

Use the Up or Down arrow key to select the Install Red Hat Enterprise Linux 8.0.0 entry and press Enter. The installer is launched in graphical mode.

9.The installer program shows a welcome screen with a long list of supported languages that you could use during the installation. The default is set to English. Click Continue to accept the default and move on.

Figure 1-23 Language Selection

If all the content does not fit on the console screen, try changing the Graphics Controller to VMSVGA under Settings | Display in the VirtualBox Manager for the VM.

10.The Installation Summary screen appears next, as shown in Figure 1-24. You have the opportunity to make all necessary configuration changes prior to starting the installation. This screen presents a single interface to configure localization (keyboard, language, date, time, and time zone), software (installation source and software selection), and system (disk selection and partitioning, network and hostname assignments, etc.).

Figure 1-24 Installation Summary | Main

Any items highlighted in red and with a warning sign must be configured before the Begin Installation button at the bottom right of the screen is enabled.

There is no particular sequence to configure these items. If you do not wish to change a non-highlighted item, simply leave it intact and the installation program will apply the default settings for it.

Adding Support for Keyboards and Languages

11.Anaconda presents additional choices for keyboard layouts and languages for use during and after the installation. This should only be done on systems where support for multiple keyboard layouts and languages is required. The default is the US English for both.

Configuring Time & Date

12.Click Time & Date to set the time zone (region and city), date, and time for the system. See Figure 1-25. Click Done in the upper left corner to save the changes and return to the Installation Summary screen.

Figure 1-25 Installation Summary | Time & Date

Figure 1-25 reflects two adjustments from the default. The city is changed to Toronto, and the clock format is switched to AM/PM.

Choosing an Installation Source

13.You can set the installation source for RHEL 8. By default, Anaconda chooses the auto-detected local media (DVD, USB flash drive, or ISO image) that was used to start this installation. For this demonstration, leave the installation source to the default. Click Done to return to the Installation Summary page.

Figure 1-26 Installation Summary | Installation Source

If you have access to a configured network location hosting the installation files, you can choose On the network and specify the HTTP, HTTPS, FTP, or NFS protocol, hostname or IP address of the network server, and the path to the files. You can also specify the locations of additional software repositories, besides the default AppStream, if you have access to them.

Selecting Software to be Installed

14.You can choose the base operating environment that you want installed. Base environments are predefined groups of software packages designed for specific use cases. The six base environments are described in Table 1-2.

Table 1-2 Installation Summary | Software Selection | Base Environments

Choosing a base environment in the left pane reveals additional components on the right that may be ticked for installation along with the selected base environment. See Figure 1-27.

Figure 1-27 Installation Summary | Software Selection

The installer automatically picks and installs prerequisite software components to fulfill dependency requirements for a successful installation. The default base environment is Server with GUI for this demonstration. Leave add-ons to the default as well. Click Done to return to the Installation Summary page.

Configuring Installation Destination

15.The Installation Destination allows you to choose an available local or remote disk for partitioning and installing the OS on. Anaconda selects Automatic partitioning selected (highlighted in red) on the Installation Summary page (Figure 1-24), which you can change on Installation Destination (Figure 1-28). By default, the 10GB virtual disk you assigned to the VM initially is automatically picked up by the installer as the target and it is represented as sda. The Encrypt my data checkbox under Encryption encrypts all partitions on the disk. If you choose this option, you will be prompted to enter a passphrase to access the partitions later. The Full disk summary and bootloader link at the bottom left allows you to choose a disk to place the bootloader program on. This does not need to be modified on a single disk system. The default and the only bootloader program available in RHEL 8 is called GRUB2, and it is explained at length in Chapter 11, Boot and Initialization.

Figure 1-28 Installation Summary | Installation Destination

For this demonstration, stick to the default automatic partitioning scheme. Simply click Done to return to the previous screen. This scheme will create three partitions—/boot, /, and swap, and together they will consume the entire selected disk.

Configuring Network and Hostname

16.Assigning appropriate IP and hostname are essential for system functionality in a network environment. Click Network & Hostname on the Installation Summary page and a window similar to the one shown in Figure 1-29 will appear. Anaconda detects all attached network interfaces, but it does not automatically assign them IPs. Also, the default hostname is set to localhost.localdomain. You need to modify these assignments so that your system is able to communicate with other systems on the network. Currently, there is one network device assigned to the system, which is represented as enp0s3.

The terms network interface and network device refer to the same network hardware component. These terms are used interchangeably throughout this book. These terms are different from the term network connection, which is the software configuration applied to a network interface/device.

The default naming convention for network devices vary based on the underlying virtualization software being used.

Change the hostname to server1.example.com in the Hostname field. For IP assignments, there are a couple of options. You can obtain them automatically from an available DHCP server by simply sliding the ON/OFF switch located in the top right-hand corner. However, for this demonstration, click Configure at the bottom right and enter IP information manually. You also need to ensure that the network connection is set to autostart.

Figure 1-29 Installation Summary | Network & Hostname

There are multiple tabs available on the network connection configuration screen, as depicted in Figure 1-30. Go to IPv4 Settings and choose Manual from the drop-down list against Method. Click Add and enter address 192.168.0.110, netmask 24, and gateway 192.168.0.1. Click Save to save the configuration and return to the Network & Hostname window.

Figure 1-30 Installation Summary | Network & Hostname | Configure

On the Network & Hostname window, slide the ON/OFF switch to the ON position so that the new assignments take effect right away. This will also ensure that the assignments are applied automatically on subsequent system reboots.

Figure 1-31 Installation Summary | Network & Hostname

Now click Done to return to the Installation Summary page. Chapter 16 Networking, Network Devices, and Network Connections discusses configuring hostnames, network interfaces, and network connections in detail.

Beginning Installation

17.You’re now on the Installation Summary page (Figure 1-32). You still have the opportunity to go back and configure or reconfigure any items you’ve missed. Once you are satisfied, click Begin Installation at the bottom right to initiate the installation based on the configuration entered in the previous steps. Anaconda will now partition the selected disk and install the software. Any data previously stored on the disk will be erased and unrecoverable.

Figure 1-32 Installation Summary | Begin Installation

The Begin Installation button remains inactive until all the items highlighted in red and with a warning sign are configured.

The configuration and software copy will take some time to complete. The progress will depend on the system performance and resources allocated to the VM.

Setting root Password and Creating a User Account

18.Once the installation has begun, a new screen, called Configuration, pops up. See Figure 1-33. This is where you can monitor the progress, and it also allows you to assign a password to the root user and create a user account.

Figure 1-33 Configuration | User Settings

19.While the installer continues to run, click Root Password and set a password for the root user. Click Done (two clicks if the password entered is too short or simple) to return to the Configuration screen.

20.Next, click User Creation to create a user account called user1 and assign it a password. Leave the Make this user administrator option unticked. See Figure 1-34. Click Done (two clicks if the password entered is too short or simple) to return to the Configuration screen.

Figure 1-34 Configuration | User Settings | Create User

Anaconda will set the root user password and create the user account during the configuration part of the installation.

Concluding Installation

21.When the required setup is complete and all software packages are installed, a Reboot button will appear at the bottom right on the Configuration screen (Figure 1-35). Click this button to reboot the new system.

Figure 1-35 Configuration | Finishing Installation

By default, VirtualBox does not automatically change the default boot order. This results in rebooting the VM from the ISO image again and restarting the installation. To avoid this situation, power off the virtual machine from VirtualBox and alter the boot sequence.

Changing Default Boot Order

22.Power off the VM from VirtualBox.

23.The current boot sequence, as shown in Figure 1-36, is set to boot with floppy first and then optical (DVD/CD) followed by hard disk.

Figure 1-36 VirtualBox Manager | System | Boot Order

24.Change this sequence to hard disk first and optical next. See Figure 1-37. Untick Floppy, as it is not required.

Figure 1-37 VirtualBox Manager | System | Boot Order | Alter

Now power up the VM from the VirtualBox Manager. It will boot the installed OS.

Performing Post-Installation Tasks

25.The system initiates the Initial Setup application upon restart so that you can complete certain post-installation tasks. Figure 1-38 shows the Initial Setup screen with license already accepted.

Figure 1-38 Initial Setup

26.On this screen you must click the License Information icon and accept the license terms and conditions by ticking the box beside I accept the license agreement. Click Done to return to the Initial Setup screen.

27.The second item on the Initial Setup screen helps you register this system with Red Hat’s subscription management service to enable it to receive automatic software updates and perform certain other management tasks. Leave this item intact for this demonstration and click Finish Configuration.

This brings the installation and initial configuration of RHEL 8 to a successful completion.

Logging In and Out at the Graphical Console

Now that the installation is complete, you can log on to the system. You selected the Server with GUI base environment, which includes graphical desktop support to interact with the system. You also entered credentials for a user account, user1, during installation. You can now use this account to log in.

Logging In for the First Time

When you sign in with a new user account for the first time, several screens appear in succession to allow you to configure a few basic items for the user. Follow the steps below to go through this process. You will not be prompted again for this configuration upon next logon.

1.On the graphical logon screen, click user1 and enter the password when prompted.

Figure 1-39 Graphical Desktop | Sign-in Screen

The login process continues, and a Welcome screen pops up that shows the language that you had selected at the beginning of the installation. You can change it to a different language if you so desire. Click Next.

2.Add an Input Source to be used on the next screen. The default is the US English keyboard type that you had selected earlier. Click Next.

3.Enable the geographical location of this system to be automatically determined for applications to use. The default is set to on. Click Next.

4.You can connect one of your online user accounts such as Google, Nextcloud, Microsoft, or Facebook in order to access your email, contact, and other information and services. Click Skip for this demonstration.

5.Click Start using Red Hat Enterprise Linux on the final Ready to Go screen, Figure 1-40.

Figure 1-40 First Time User Login

6.A Getting Started help screen pops up (Figure 1-41). Here, you can watch videos on how to launch applications, switch tasks, and use windows and workspaces in the Graphical User Interface (GUI). The help is available in text format as well. You can close this window by clicking the x (exit) button at the top right.

Figure 1-41 First Time User Login | Getting Started

7.The default graphical desktop included in RHEL 8 is the GNOME desktop environment (Figure 1-42). You should now be able to start using the system as user1.

Figure 1-42 GNOME Desktop Environment

GNOME stands for GNU Network Object Model Environment. It is the default graphical display manager and desktop environment for users in RHEL 8. Chapter 02 Initial Interaction with the System provides more details on this topic.

Logging Out

8.Logging out of the system is easy. Click on the down arrow (top right), expand user1 (the name of the logged-in user), and click Log Out. See Figure 1-43. The user will be signed out and the main login screen will reappear.

Figure 1-43 GNOME Desktop Environment| Log Out

Now, let’s look at how to connect and log in to the system remotely from over the network.

Exercise 1-3: Logging In from Windows

This exercise should be done on the Windows computer hosting the virtual machine for server1.

In this exercise, you will use a program called PuTTY to access server1 using its IP address and as root. You will run appropriate commands on the server for validation. You will log off to terminate the session.

1.On Windows desktop, download PuTTY free of charge from the Internet. Launch this program and enter the target host’s IP address. Leave the rest of the settings to their defaults.

You may assign a name to this session (typically the hostname is used as the session name) in the Saved Sessions field and click Save to store this information so as to avoid retyping in the future.

2.Click on the Open button at the bottom of the screen to try a connection.

3.Enter root and password at the login as prompt to log in:

2.Issue the basic Linux commands whoami, hostname, and pwd to confirm that you are logged in as root on server1 and placed in the correct home directory:

3.Run the logout or the exit command or press the key combination Ctrl+d to log off server1 and terminate the login session:

This concludes the exercise. Going forward, you should be doing all the exercises and labs presented in this book in PuTTY (ssh) terminal sessions.

Chapter 02 will explore how to navigate within the GNOME desktop environment, execute basic Linux commands at the command prompt, and obtain necessary help.

Chapter Summary

In this chapter, we started by looking at Linux history and exploring available versions of Linux from Red Hat. We examined various pre-installation items for our lab environment to prepare for a smooth installation in order to practice the exercises and labs presented in this book. We demonstrated downloading the images for VirtualBox Manager software and RHEL 8. We built a virtual machine and installed RHEL 8 in it. We completed post-installation tasks to conclude the demonstration. Finally, we logged in to the new system at the console and over the network via PuTTY to verify the installation.

Review Questions

1.The minimal Install base environment includes the graphical support. True or False?

2.Can you install RHEL 8 in text mode?

3.You can use the /boot partition within LVM to boot RHEL. True or False?

4.Which kernel version is the initial release of RHEL 8 based on?

5.Several log files are created and updated in the /tmp directory during the installation process. Where are these files moved to after the completion of installation?

6.Name the RHEL installer program.

7.How many console screens do you have access to during the installation process?

8.RHEL 8 may be downloaded from Red Hat’s developer site. True or False?

9.RHEL 8 cannot be installed over the network. True or False?

10.What is the name of the default graphical user desktop if Server with GUI is installed?

Answers to Review Questions

1.False. Minimal Install base environment does not include graphics support.

2.Yes, RHEL 8 can be installed in text mode.

3.False. /boot cannot reside within LVM.

4.The initial release of RHEL 8 is based on kernel version 4.18.

5.These files are moved to the /var/log directory.

6.The name of the RHEL installer program is Anaconda.

7.There are six console screens available to you during the installation process.

8.True. RHEL 8 may be downloaded from developers.redhat.com. You need to open a new account or use an existing before you can download it.

9.False. RHEL 8 can be installed with installation files located on a network server.

10.The default graphical desktop is called GNOME desktop environment.

Do-It-Yourself Challenge Labs

The following labs are useful to strengthen most of the concepts and topics learned in this chapter. It is expected that you perform the labs without external help. A step-by-step guide is not supplied, as the knowledge and skill required to implement the lab has already been disseminated in the chapter; however, hints to the relevant major topic(s) are included.

Lab 1-1: Build RHEL8-VM2 (server2)

Create another virtual machine called RHEL8-VM2 in VirtualBox, attach the ISO image to it, and install RHEL 8. Use the configuration provided in What is Needed for the Lab? and follow the procedures outlined in Exercises 1-1 and 1-2. Use PuTTY with the IP address of the new server to connect to it.

Chapter 02

Initial Interaction with the System

This chapter describes the following major topics:

Interact with display manager and understand graphical interface

Overview of Linux directory structure

Recognize top-level directories

Understand command construct

Describe and run basic Linux commands

Obtain help using multiple native tools and RHEL documentation

RHCSA Objectives:

01. Access a shell prompt and issue commands with correct syntax

11. Locate, read, and use system documentation including man, info, and files in /usr/share/doc

Wayland is an advanced display protocol that sets up the foundation for running graphical applications, which includes system administration tools, user applications, as well as Linux graphical display and desktop manager programs. Working in a graphical environment to interact with the system is convenient for users with limited command line knowledge or specific requirements.

Linux files are organized logically for ease of administration. This file organization is maintained in hundreds of directories located in larger containers (file systems). Red Hat Enterprise Linux follows the File system Hierarchy Standard for file organization, which describes names, locations, and permissions for many file types and directories.

Linux offers a variety of commands for users and system managers. User commands are general purpose that are intended for execution by any user on the system. However, system management commands require elevated privileges of the superuser. Knowledge of these tools is essential for productive usage and efficient administration of the system. This chapter provides an analysis of command components and how to construct a command. Following that, it introduces a few basic user-level commands.

The availability of native help on the system simplifies task execution for Linux users and system administrators alike. This assistance is available on commands and configuration files via locally installed searchable manual pages and documentation for installed packages. In addition, Red Hat documentation website provides a wealth of information on various topics, procedures, and command usage.

Linux Graphical Environment

RHEL allows users to work in both text and graphical environments. Text interface might be cumbersome, but many administrators and programmers prefer to work in a text-mode setting without needing graphics capabilities. Nevertheless, a graphical environment provides easier and convenient interaction with the OS by hiding the challenges that users may otherwise experience when working in text-mode.

Wayland is a client/server display protocol that sets up the foundation for running graphical programs and applications in RHEL 8. It is available alongside the legacy X Window System, which has been around in RHEL for decades. Wayland provides superior graphics capabilities, features, and performance than X. There are two components that are critical to the functionality of a graphical environment: the display manager (a.k.a. login manager) and the desktop environment. Both are launched following the completion of the groundwork established by Wayland.

Display/Login Manager

A display/login manager handles the presentation of graphical login screen. It allows users to enter credentials to log on to the system. A preconfigured graphical desktop manager appears after the credentials are verified. In RHEL 8, the default display manager is called GNOME Display Manager (GDM). Figure 2-1 provides an image of GDM.

Figure 2-1 GNOME Display Manager

The login screen presents a list of all normal user accounts that exist on the system. You can log in as any one of them by selecting the desired account. If you wish to sign in as an unlisted user or the root user, click Not Listed? and enter the username and password for the desired account. The current system day and time also appear at the top of the login screen.

There are two downward arrowheads at the top right of the login screen. The arrowhead on the left is to enable or disable an accessibility feature. The arrowhead on the right allows you to power off or reboot the system and change the system volume. More controls become available after you have logged in. There are three additional icons at the top right that show the network connectivity, sound level, and battery/power status.

Desktop Environment

Once the credentials are validated for a user, the display/login manager establishes a Desktop Environment (DE) to work in. RHEL 8 comes with several graphical desktop software with GNOME desktop environment set as the default. It provides an easy and point-and-click GUI for users to run programs and operating system tools. Figure 2-2 is an image of the default GNOME desktop environment for root.

Figure 2-2 GNOME Desktop Environment

If you have worked with Microsoft Windows, you should have no difficulty using this desktop environment. The default screen has an Activities icon at the top left, which allows you to search and access programs. Figure 2-3 depicts a list of application icons when you click on Activities.

Figure 2-3 GNOME Desktop Environment | Activities

These application icons represent Firefox web browser, file manager, software updates, GNOME help, and shell terminal. The icon with nine dots displays all available programs, including Settings. The Settings application includes administrative and user-level controls to view or modify configuration items such as Wi-Fi, Bluetooth, desktop background, notifications, regional settings, privacy, sound, power, screensaver, network, and more.

Linux Directory Structure and File Systems

Linux files are organized logically in a hierarchy for ease of administration and recognition. This organization is maintained in hundreds of directories located in larger containers called file systems. Red Hat Enterprise Linux follows the Filesystem Hierarchy Standard (FHS) for file organization, which describes names, locations, and permissions for many file types and directories.

Linux file systems contain files and subdirectories. A subdirectory, also referred to as a child directory, is located under a parent directory. The parent directory is a subdirectory of a higher-level directory. The Linux directory structure is analogous to an inverted tree, where the top of the tree is the root of the directory, tree branches are subdirectories, and leaves are files. The root of the directory is represented by the forward slash character (/), and this is where the entire directory structure is ultimately connected. The forward slash is also used as a directory separator in a path, such as /etc/rc.d/init.d/functions.

In this example, the etc subdirectory is located under /, making root the parent of etc (which is a child), rc.d (child) is located under etc (parent), init.d (child) is located under rc.d (parent), and functions (leaf) is located under init.d (parent) at the bottom.

The term subdirectory is used for a directory that has a parent directory.

Each directory has a parent directory and a child directory, with the exception of the root and the lowest level subdirectories. The root directory has no parent, and the lowest level subdirectory has no child.

Top-Level Directories

The key top-level directories under the / are shown in Figure 2-4. Some of these directories hold static data, while others contain dynamic (or variable) information. Static data refers to file content that remains unchanged unless modified explicitly. Dynamic or variable data, in contrast, refers to file content that is modified and updated as required by system processes. Static directories normally contain commands, configuration files, library routines, kernel files, device files, etc., and dynamic directories contain log files, status files, temporary files, etc.

Figure 2-4 Linux Directory Structure

The hierarchical directory structure keeps related information together in a logical fashion. Compare this concept with a file cabinet containing several drawers, with each drawer storing multiple file folders.

File System Categories

There are a variety of file system types supported in RHEL that can be categorized in three basic groups: disk-based, network-based, and memory-based. Disk-based file systems are typically created on physical media such as a hard drive or a USB flash drive. Network-based file systems are essentially disk-based file systems that are shared over the network for remote access. Memory-based file systems are virtual; they are created automatically at system startup and destroyed when the system goes down. The first two types of file systems store information persistently, while any data saved in virtual file systems is lost at system reboots.

During RHEL installation, two disk-based file systems are created when you select the default partitioning. These file systems are referred to as the root and boot file systems. Furthermore, several memory-based file systems are vital to the

Enjoying the preview?
Page 1 of 1