RHCSA Rapid Track
In this exercise, you will list the available modules, enable a specific module stream, and install packages from that stream.
Outcomes
You should be able to:
List installed modules and examine information of a module.
Enable and install a module from a stream.
Switch to a specific module stream.
Remove and disable a module.
Log in as the student user on workstation using student as the password.
From workstation run the lab software-module start command.
The command runs a start script that determines whether the host, servera, is reachable on the network.
The script also ensures that the required software repositories are available and installs the postgresql:9.6 module.
[student@workstation ~]$lab software-module start
Use the ssh command to log in to
serveraas thestudentuser.[student@workstation ~]$ssh student@servera...output omitted...[student@servera ~]$Switch to
rootat the shell prompt.[student@servera ~]$sudo -i[sudo] password for student:student[root@servera ~]#List available modules, streams, and installed modules. Examine the information for the python36 module.
Use the yum module list command to list available modules and streams.
[root@servera ~]#yum module listRed Hat Enterprise Linux 8.2 AppStream (dvd) Name Stream Profiles Summary ...output omitted... python27 2.7 [d] common [d] Python ... version 2.7 python36 3.6 [d][e] build, common [d] Python ... version 3.6 python38 3.8 [d] build, common [d] Python ... version 3.8 ...output omitted... Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalledUse the yum module list --installed command to list installed modules and streams.
[root@servera ~]#yum module list --installedRed Hat Enterprise Linux 8.2 AppStream (dvd) Name Stream Profiles Summary postgresql 9.6 [e] client, server [d] [i] PostgreSQL server and client ... Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalledUse the yum module info command to examine details of the python36 module.
[root@servera ~]#yum module info python36Name:python36Stream:3.6[d][e][a] Version : 8010020190724083915 Context : a920e634 Architecture : x86_64Profiles:build,common[d] Default profiles : common Repo : rhel-8.2-for-x86_64-appstream-rpms Summary : Python programming language, version 3.6 ...output omitted... Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled, [a]ctive]
Install the python36 module from the
3.6stream and thecommonprofile. Verify the current status of the module.Use the yum module install command to install the python36 module. Use the
name:stream/profilesyntax to install the python36 module from the3.6stream and thecommonprofile.Note
You can omit
/profileto use the default profile and:streamto use the default stream.[root@servera ~]#yum module install python36:3.6/common...output omitted... Is this ok [y/N]:y...output omitted... Complete!Examine the current status of the python36 module.
[root@servera ~]#yum module list python36Red Hat Enterprise Linux 8.2 AppStream (dvd) Name Stream Profiles Summary python363.6 [d][e]build,common[d][i]Python ... version 3.6 Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Switch the postgresql module of the
serverprofile to use the10stream.Use the yum module list command to list the postgresql module and the stream. Notice that the postgresql:9.6 module stream is currently installed.
[root@servera ~]#yum module list postgresqlRed Hat Enterprise Linux 8.2 AppStream (dvd) Name Stream Profiles Summarypostgresql9.6[e]client,server[d][i]PostgreSQL server and client ... postgresql 10 [d] client, server [d] PostgreSQL server and client ... postgresql 12 client, server [d] PostgreSQL server and client ... Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalledRemove and disable the postgresql module stream along with all the packages installed by the profile.
[root@servera ~]#yum module remove postgresql...output omitted... Is this ok [y/N]:y...output omitted... Removed: postgresql-server-9.6.10-1.module+el8+2470+d1bafa0e.x86_64 libpq-10.5-1.el8.x86_64 postgresql-9.6.10-1.module+el8+2470+d1bafa0e.x86_64 CompleteReset the postgresql module and its streams.
[root@servera ~]#yum module reset postgresql================================================================= Package Arch Version Repository Size ================================================================= Resetting modules: postgresql Transaction Summary ================================================================= Is this ok [y/N]:yComplete!Use the yum module install command to switch to the postgresql:10 module stream.
[root@servera ~]#yum module install postgresql:10...output omitted... Is this ok [y/N]:y...output omitted... Complete!Verify that the postgresql module is switched to the
10stream.[root@servera ~]#yum module list postgresqlRed Hat Enterprise Linux 8.2 AppStream (dvd) Name Stream Profiles Summary postgresql 9.6 client, server [d] PostgreSQL server and client ...postgresql10[d][e]client,server[d][i]PostgreSQL server and client ... postgresql 12 client, server [d] PostgreSQL server and client ... Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Remove and disable the postgresql module stream along with all the packages installed by the profile.
Use the yum module remove command to remove the postgresql module. The command also removes all packages installed from this module.
[root@servera ~]#yum module remove postgresql...output omitted... Is this ok [y/N]:y...output omitted... Complete!Disable the postgresql module stream.
[root@servera ~]#yum module disable postgresql...output omitted... Is this ok [y/N]:y...output omitted... Complete!Verify that the postgresql module stream is removed and disabled.
[root@servera ~]#yum module list postgresqlRed Hat Enterprise Linux 8.2 AppStream (dvd) Name Stream Profiles Summary postgresql 9.6 [x] client, server [d] PostgreSQL server and client ... postgresql10[d][x]client,server[d] PostgreSQL server and client ... postgresql 12 [x] client, server [d] PostgreSQL server and client ... Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Exit from
servera.[root@servera ~]#exitlogout[student@servera ~]$exitlogout Connection to servera closed.[student@workstation ~]$