Chapter 4. Installing RHEL 8 content

The following sections describe how to install content in Red Hat Enterprise Linux 8.

4.1. Installing a package

This section describes how to install packages.

Procedure

  • Install the package:

    # yum install package
    • If the package is not provided by any module stream, this procedure is identical to the procedure used on previous versions of Red Hat Enterprise Linux.
    • If the package is provided by an module stream that is enabled, the package is installed without any further manipulation.
    • If the package is provided by a module stream marked as default, the yum tool automatically transparently enables that module stream before installing this package.
    • If the package is provided by a module stream that is not active (neither of the above cases), it is not recognized until you manually enable the respective module stream.

4.2. Selecting a stream before installation of packages

Default module streams ensure that users can install packages without caring about the modular features. When the user wants packages with version from a non-default stream, that stream must be enabled before packages provided by it can be installed.

Prerequisites

Procedure

  • Enable the module stream:

    # yum module enable module-name:stream

    Replace module-name and stream with names of the module and stream.

    yum asks for confirmation and the stream is enabled and active. If another stream of the module was previously active because it was default, it is no longer active.

4.3. Installing modular content

This section describes how to install modular content provided by a module stream or a profile.

Prerequisites

Procedure

  • Install an active module stream (the default one or the one you have enabled):

    # yum module install module-name
  • Install a selected module stream:

    # yum module install module-name:stream

    The selected stream is automatically enabled. If a default profile is defined for the stream, this profile is automatically installed.

  • Install a selected profile of the module stream:

    # yum module install module-name:stream/profile

    This enables the stream and installs the recommended set of packages for a given stream (version) and profile (purpose) of the module.

Example 4.1. Installing a non-default stream of an application

This example shows how to install an application from a non-default stream (version).

More specifically, this example shows how to install the PostgreSQL server (package postgresql-server) in version 9.6, while the default stream provides version 10.

Procedure

  1. List modules that provide the postgresql-server package to see what streams are available:

    $ yum module list postgresql
    Name        Stream  Profiles             Summary
    postgresql  9.6     client, server [d]  PostgreSQL server and client module
    postgresql  10 [d]  client, server [d]  PostgreSQL server and client module
    postgresql  12	    client, server [d]  PostgreSQL server and client module
    
    Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

    The output shows that the postgresql module is available with streams 9.6, 10 and 12. The default stream is 10.

  2. Install the packages provided by the postgresql module in stream 9.6:

    # yum module install postgresql:9.6
    Dependencies resolved.
    =====================================================================
     Package           Version                           Repository Size
    =====================================================================
    Installing group/module packages:
     postgresql-server 9.6.10-1.module+el8+2470+d1bafa0e appstream  5.0 M
    Installing dependencies:
     libpq             10.5-1.el8                        appstream  188 k
     postgresql        9.6.10-1.module+el8+2470+d1bafa0e appstream  1.4 M
    Installing module profiles:
     postgresql/server
    Enabling module streams:
     postgresql                 9.6
    
    Transaction Summary
    =====================================================================
    Install  3 Packages
    
    Total download size: 6.6 M
    Installed size: 27 M
    Is this ok [y/N]: y
    (...)
    Complete!

    Because the installation profile was not specified, the default profile server was used.

  3. Verify the installed version of PostgreSQL:

    $ postgres --version
    postgres (PostgreSQL) 9.6.10

4.4. Running installed content

Usually, after you install content from RHEL 8 repositories, new commands will be enabled. If the commands originated from a RPM package or RPM packages enabled by a module the experience of using the command should be no different. To run the new commands use them directly:

$ command

4.5. Commands for installing RHEL 8 content

This section lists commonly used commands for installing RHEL 8 content.

Command list

Install a package
# yum install package

If the package is provided by a module stream, yum resolves the required module stream, and enables it automatically while installing this package. This happens recursively for all package dependencies, too. If more module streams satisfy the requirement, the default ones are used.

Enable a module using its default stream
# yum module enable module-name

Enable the module when you wish to make the packages available to the system but do not, at this time, wish to install any of them.

Some modules may not define default streams. In such case, you must explicitly specify the stream.

Enable a module using a specific stream
# yum module enable module-name:stream

If the module defines a default stream, you can omit the stream and colon.

Install a module using the default stream and profiles
# yum module install module-name

Alternatively:

# yum install @module-name
Caution

Some modules do not define default streams.

Install a module using a specific stream and default profiles
# yum module install module-name:stream

Alternatively:

# yum install @module-name:stream
Install a module using a specific stream and profile
# yum module install module-name:stream/profile

Alternatively:

# yum install @module-name:stream/profile

4.6. Additional resources

Online resources

Installed resources

  • For details of various yum tool commands, see the yum(8) manual page:

    $ man yum