Skip to main content

Working with Essential Red Hat Linux System Administration Tools – yum

Hands-On Lab

 

Photo of Rob Marti

Rob Marti

Linux Training Architect I in Content

Length

00:15:00

Difficulty

Beginner

In this lab we are going to make sure we have the minimum knowledge we need in order to successfully pass the RHCE on RHEL8. In this lab we'll cover yum/dnf and the new Application Stream module. Since this is a new tool with RHEL8 it's normal to not understand it 100%, but this lab will help reinforce how to use the Application Stream.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Basic Red Hat Certified Administrator Skills - DNF Lab for RHCE8

Introduction

In this lab we are going to make sure we have the minimum knowledge we need in order to successfully pass the RHCE on RHEL8. In this lab we'll cover yum/dnf and the new Application Stream module. Since this is a new tool with RHEL8 it's normal to not understand it 100%, but this lab will help reinforce how to use the Application Stream.

Scenario

We have been tasked with setting up a server for a production environment. The server that was handed to us needs to have postgresql-9.6 and httpd installed.

Don't worry about configuring this software, because that will come later. For now, we've just got to make sure the required software is installed.

Logging In

Use the credentials provided on the hands-on lab page to get into Server1 to begin with. Since we need root privileges, let's just run sudo -i right off and become root.

Install PostgreSQL Version 9.6

If we run yum module list, we'll see that postgresql 10 has an [e] next to it, indicating it's installed.

Since our task is to install the postgresql 9.6 server, we need to fix that:

Remove the Current Version

yum remove postgresql

Reset the Module

yum module reset postgresql

Enable the 9.6 Module

yum module enable postgresql:9.6

Install PostgreSQL 9.6

yum install postgresql -y

Those commands will remove the installed postgresql-10, reset the application stream, set the correct version for the application stream, and then install the correct version of PostgreSQL.

Install httpd

While Apache does have an Application Stream, there aren't multiple versions. On top of that, our task doesn't specify a version anyway.

So, it's easy to just run yum -y install httpd and call it done.

Conclusion

Well, we've gotten the proper packages installed. We can check with yum module list | grep httpd and yum module list | grep postgres to see which ones are enabled. We're done here. Congratulations!