Exercise 1.6 - Managing Software in an Application Stream

Return to Workshop


Application streams are new to RHEL 8 and provide access to the latest tools, languages and libraries, without affecting core system components. This capability gives users access to multiple versions of packages, with a known period of support. These application streams, usually provided as modules, can be thought of as package groups that represent an application, a set of tools, or runtime languages.

Section 1: Stream Availability

Step 1: Check to see what PostgreSQL streams are available

As root, use yum to see what streams are available, for PostgreSQL:

sudo yum module list postgresql

There are three versions of postgresql available as modules in the Application Stream, versions 9.6, 10 and 12.

PostgreSQL version 10 is set as the default, meaning if someone installed postgresql with no specific options or arguments, version 10 would be the one installed.

Section 2: Install software managed as an application stream

Step 1: Install PostgreSQL 9.6

To support the web application deployed on this machine, install postgresql version 9.6:

sudo yum -y module install postgresql:9.6

Step 2: Verify installation

After the installation is complete, verify that postgresql version 9.6 is installed on the system.

sudo yum module list postgresql

Notice that version 9.6 is now marked as [e]nabled under the Stream column and is flagged as [i]nstalled in the Profiles column of the listing for postgresql.

Step 3: Run PostgreSQL

Finally, run the postgres command to inspect the version it reports:

postgres --version

Section 3: Remove a stream

Now imagine an update to a web application running on this system requires features available in postgresql version 10. To accomplish this you will ultimately remove postgresql 9.6 and install postgresql 10, however, there are some additional Application Stream settings to apply to the system configuration as well.

Step 1: Remove PostgreSQL 9.6

To start off with, remove PostgreSQL 9.6:

sudo yum -y module remove postgresql:9.6

Step 2: Verify removal

Take a look at the Application Stream information for the machine to validate the removal:

sudo yum module list postgresql

Verify that postgresql version 9.6 is no longer flagged as [i]nstalled.

Section 4: Change to a different version of a stream

Step 1: Disable a stream

Prior to installing an available newer version of postgresql, first disable the older (now removed) version of the software:

sudo yum -y module disable postgresql:9.6

Step 2: Enable a stream

Likewise, while the newer version is the default, it should be enabled:

sudo yum -y module enable postgresql:10

Step 3: Verify enablement

Take a look at the Application Stream information to verify that postgresql version 10 is now the enabled version:

sudo yum module list postgresql

The [e]nabled flag is now present for postgresql version 10.

Section 5: Install PostgreSQL 10

Step 1: Install the stream

Now that the Postgres version 10 stream is enabled, install it on the system:

sudo yum -y module install postgresql:10

Step 2: Verify installation

The Postgres 10 stream should now be listed as [i]nstalled:

sudo yum module list postgresql

Step 3: Check version

Finally, check the version reported by the postgres command:

postgres --version

Section 6: Show all streams

Lastly, inspect all software managed as application streams:

sudo yum module list

Workshop Details

Domain Red Hat Logo
Student ID

Return to Workshop