Search

Chapter 4. Installing RHEL 8 content

download PDF

In the following sections, learn how to install content in Red Hat Enterprise Linux 8:

4.1. Installing a package

To install a package, complete the following steps.

Procedure

  • Install a package:

    # yum install package

    Replace package with the name of the package.

    • If the package is not provided by any module stream, this procedure is identical to the procedure used on earlier 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, yum automatically enables that module stream before installing this package.

      Important

      It is recommended to always select a specific module stream for installation instead of relying on the default stream. Certain default module streams reach the End of Life status prior to the end of the RHEL major release. Always consider each stream’s lifecycle.

  • 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

It is recommended to always select a specific module stream for installation. Always consider each stream’s life cycle.

Important

Certain default module streams reach the End of Life status prior to the end of the RHEL major release.

To install packages from a non-default stream, enable the stream first.

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.

    Note

    If another stream of the module was previously active because it was default, it is no longer active.

4.3. Installing modular content

To install modular content provided by a module stream or a profile, complete the following steps.

Prerequisites

Procedure

  • To install a selected module stream, use:

    # yum module install module-name:stream

    By running this command, you automatically enable selected stream. Note that if a default profile is defined for the stream, this profile is automatically installed.

    Important

    Always consider the module stream’s life cycle.

  • To install a selected profile of the module stream, use:

    # yum module install module-name:stream/profile

    By running this command, you enable the stream and install 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

The following is an example of how to install an application from a non-default stream (version), namely, the PostgreSQL server (the postgresql-server package) in version 13. The default stream provides version 10.

Procedure

  1. List modules that provide the postgresql-server package to see which 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
    postgresql  13      client, server [d]  PostgreSQL server and client module
    postgresql  15      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, 12, 13, and 15. The default stream is 10.

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

    # yum module install postgresql:13
    ...
    Dependencies resolved.
    ===================================================================================================================
     Package                  Architecture  Version                                        Repository             Size
    ===================================================================================================================
    Installing group/module packages:
     postgresql-server        x86_64        13.10-1.module+el8.7.0+18279+1ca8cf12          rhel-AppStream        5.6 M
    Installing dependencies:
     libicu                   x86_64        60.3-2.el8_1                                   rhel                  8.8 M
     libpq                    x86_64        13.5-1.el8                                     rhel-AppStream        198 k
     postgresql               x86_64        13.10-1.module+el8.7.0+18279+1ca8cf12          rhel-AppStream        1.5 M
    Installing module profiles:
     postgresql/server
    Enabling module streams:
     postgresql                             13
    
    Transaction Summary
    ===================================================================================================================
    Install  4 Packages
    
    Total download size: 16 M
    Installed size: 61 M
    Is this ok [y/N]: y
    
    ...
    
    Installed:
      libicu-60.3-2.el8_1.x86_64
      libpq-13.5-1.el8.x86_64
      postgresql-13.10-1.module+el8.7.0+18279+1ca8cf12.x86_64
      postgresql-server-13.10-1.module+el8.7.0+18279+1ca8cf12.x86_64
    
    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) 13.10

4.4. Running installed content

New commands are usually enabled after you install content from RHEL 8 repositories. If the commands originated from RPM packages that were enabled by a module, the experience of using these command should be no different.

Procedure

  • To run the new commands, enter them directly:

    $ command

    Replace command with the name of the command you want to run.

Note

In RHEL 8, GCC Toolset is packaged as a Software Collection. To run a command from a component packaged as a Software Collection, use:

$ scl enable collection 'command'

Replace collection with the name of the Software Collection.

For more information, see Using GCC Toolset.

4.5. Commands for installing RHEL 8 content

The following are the commonly used commands for installing Red Hat Enterprise Linux 8 content.

CommandDescription

yum install package

Install a 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 also happens recursively for all package dependencies. If more module streams satisfy the requirement, the default ones are used.

yum module enable module-name:stream

Enable a module by using a specific stream.

Always consider the module stream’s life cycle.

yum module install module-name:stream

yum install @module-name:stream

Install a module by using a specific stream and default profiles

yum module install module-name:stream/profile

yum install @module-name:stream/profile

Install a module by using a specific stream and profile.

4.6. Additional resources

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.