RHCSA Rapid Track
Course update
An updated version of this course is available that uses a newer version of Red Hat Enterprise Linux in the lab environment. Therefore, the RHEL 9.0 version of the lab environment will retire on December 31, 2024. Please complete any work in this lab environment before it is removed on December 31, 2024. For the most up-to-date version of this course, we recommend moving to the RHEL 9.3 version.
In this lab, you manage software repositories, and install and upgrade packages from those repositories.
Outcomes
Manage software repositories.
Install and upgrade packages from repositories.
Install an RPM package.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command prepares your environment and ensures that all required resources are available.
[student@workstation ~]$ lab start software-review
Instructions
On the
serverbmachine, configure a software repository to obtain updates. Name the repositoryerrataand configure the repository in the/etc/yum.repos.d/errata.repofile. Configure theerrata.repofile to use thehttp://content.example.com/rhel9.0/x86_64/rhcsa-practice/erratarepository. Do not verify GPG signatures.Log in to the
serverbmachine as thestudentuser, and switch to therootuser.[student@workstation ~]$
ssh student@serverb...output omitted... [student@serverb ~]$sudo -i[sudo] password for student:student[root@serverb ~]#Create the
/etc/yum.repos.d/errata.repofile with the following content:[errata] name=Red Hat Updates baseurl=http://content.example.com/rhel9.0/x86_64/rhcsa-practice/errata enabled=1 gpgcheck=0
On
serverb, install therht-systempackage.List the available packages for the
rht-systempackage.[root@serverb ~]#
dnf list rht-systemLast metadata expiration check: 0:05:27 ago on Wed 27 Apr 2022 05:01:59 AM EDT.Available Packagesrht-system.noarch1.0.0-2errataInstall the latest version of the
rht-systempackage.[root@serverb ~]#
dnf install rht-system...output omitted... Total download size: 7.5 k Installed size: 300 Is this ok [y/N]:y...output omitted... Complete! [root@serverb ~]#
For security reasons, the
serverbmachine must not be able to connect to a paper printer. You can achieve this effect by removing thecupspackage. When finished, exit from therootshell.List the installed
cupspackage.[root@serverb ~]#
dnf list cupsLast metadata expiration check: 0:08:02 ago on Wed 27 Apr 2022 05:01:59 AM EDT. Installed Packagescups.x86_641:2.3.3op2-13.el9 @rhel-9.0-for-x86_64-appstream-rpms [root@serverb ~]#Remove the
cupspackage.[root@serverb ~]#
dnf remove cups.x86_64...output omitted... Remove 46 Packages Freed space: 94 M Is this ok [y/N]:y...output omitted... Complete!Exit from the
rootshell.[root@serverb ~]#
exit[student@serverb ~]$
The start script downloads the
rhcsa-script-1.0.0-1.noarch.rpmpackage in the/home/studentdirectory on theserverbmachine.Confirm that the
rhcsa-script-1.0.0-1.noarch.rpmpackage is available onserverb, and install it by usingrootprivileges. Verify that the package is installed. Exit from theserverbmachine.Verify that the
rhcsa-script-1.0.0-1.noarch.rpmpackage is available onserverb.[student@serverb ~]$
rpm -q -p rhcsa-script-1.0.0-1.noarch.rpm -iName : rhcsa-script Version : 1.0.0 Release : 1 Architecture: noarch Install Date: (not installed) Group : System Size : 593 License : GPL Signature : (none) Source RPM : rhcsa-script-1.0.0-1.src.rpm Build Date : Wed 23 Mar 2022 08:24:21 AM EDT Build Host : localhost Packager : Bernardo Gargallo URL : http://example.com Summary : RHCSA Practice Script Description : A RHCSA practice script. The package changes the motd.Install the
rhcsa-script-1.0.0-1.noarch.rpmpackage.[student@serverb ~]$
sudo dnf install \rhcsa-script-1.0.0-1.noarch.rpm[sudo] password for student:studentLast metadata expiration check: 0:11:06 ago on Wed 27 Apr 2022 05:01:59 AM EDT. Dependencies resolved. ========================================================================== Package Architecture Version Repository Size ========================================================================== Installing: rhcsa-script noarch 1.0.0-1 @commandline 7.5 k Transaction Summary ========================================================================== Install 1 Package Total size: 7.5 k Installed size: 593 Is this ok [y/N]:yDownloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: rhcsa-script-1.0.0-1.noarch 1/1 Installing : rhcsa-script-1.0.0-1.noarch 1/1 Running scriptlet: rhcsa-script-1.0.0-1.noarch 1/1 Verifying : rhcsa-script-1.0.0-1.noarch 1/1 Installed: rhcsa-script-1.0.0-1.noarch Complete!Verify that the package is installed.
[student@serverb ~]$
rpm -q rhcsa-scriptrhcsa-script-1.0.0-1.noarch [student@serverb ~]$Return to the
workstationsystem as thestudentuser.[student@serverb ~]$
exitlogout Connection to serverb closed. [student@workstation ~]$
This concludes the section.