Chapter 5. Installing RHEL 9 content

The following sections describe how to install content in Red Hat Enterprise Linux 9:

5.1. Installing packages

The following procedure describes how to install packages using yum.

Procedure

  • Install the package:

    # yum install package-name

    Replace package-name 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 previous versions of Red Hat Enterprise Linux.
    • If the package is provided by a 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.
  • To install multiple packages and their dependencies simultaneously, use:

    # yum install package-name-1 package-name-2

    Replace package-name-1 and package-name-2 with the names of the packages.

  • When installing packages on a multilib system (AMD64, Intel 64 machine), you can specify the architecture of the package by appending it to the package name:

    # yum install package-name.arch

    Replace package-name.arch with the name and architecture of the package.

  • If you know the name of the binary you want to install, but not the package name, you can use the path to the binary as an argument:

    # yum install /usr/sbin/binary-file

    Replace /usr/sbin/binary-file with a path to the binary file.

    yum searches through the package lists, finds the package which provides /usr/sbin/binary-file, and prompts you as to whether you want to install it.

  • To install a previously-downloaded package from a local directory, use:

    # yum install /path/

    Replace /path/ with the path to the package.

Note that you can optimize the package search by explicitly defining how to parse the argument. See TBD xref:[Specifying a package name in yum input] for more details.

Additional resources

5.2. Installing package groups

The following procedure describes how to install a package group by a group name or by a groupID using yum.

Procedure

  • To install a package group by a group name, use:

    # yum group install group-name

    Replace group-name with the full name of the group or environmental group.

  • To install a package group by a groupID, use:

    # yum group install groupID

    Replace groupID with the ID of the group.

5.3. Installing modular content

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

Default module streams ensure that users can install packages without caring about the modular features. If you want to install a different version of a package from a non-default stream, you must enable the stream before installing the package.

Some modules do not define default streams. In such a case, you must also enable the stream.

Prerequisites

Procedure

  • To enable a 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.

  • Install an active module stream (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.

Additional resources

5.4. Running installed content

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

Procedure

  • To run the new commands use them directly:

    $ command

5.5. Setting module default streams

In RHEL 9, no module default streams are defined in the repository that contains the modules. You can set a default stream by creating a configuration file in the /etc/dnf/modules.defaults.d/ directory.

The following procedure describes how to set the default stream via the /etc/dnf/modules.defaults.d/ directory.

Prerequisites

Procedure

  1. Create a YAML configuration file in the /etc/dnf/modules.defaults.d/ drop-in directory.

    ---
    document: modulemd-defaults
    version: 1
    data:
      module: <module>
      stream: "<stream>"
      profiles:
        <profile>
        <profile>
    …​

    The output above represents the default definition present for the <module> module at the time of this writing.

  2. To set the default stream to 13, the following configuration can be implemented:

    ---
    document: modulemd-defaults
    version: 1
    data:
      module: <module>
      stream: "13"
      profiles:
        <profile>
        <profile>
    …​

5.6. Additional resources