Questo contenuto non è disponibile nella lingua selezionata.
Chapter 5. Installing RHEL 8 content
In the following sections, learn how to install content in Red Hat Enterprise Linux 8 by using YUM.
5.1. Installing packages Copia collegamentoCollegamento copiato negli appunti!
If a software is not part of the default installation, you can manually install it. YUM automatically resolves and installs dependencies.
Prerequisites
- Optional: You know the name of the package you want to install.
If the package you want to install is provided by a module stream, the respective module stream is enabled. For more information, see Enabling a module stream.
NoteIf the package is provided by a module stream marked as default,
yumautomatically enables that module stream before installing this package.
Procedure
Use one of the following methods to install packages:
To install packages from the repositories, enter:
yum install <package_name_1> <package_name_2> ...
# yum install <package_name_1> <package_name_2> ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you install packages on a system that supports multiple architectures, such as AMD64 and Intel 64, you can specify the architecture of the package by appending it to the package name:
yum install <package_name>.<architecture>
# yum install <package_name>.<architecture>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To install a package if you only know the path to the file the package provides but not the package name, you can use this path to install the corresponding package:
yum install <path_to_file>
# yum install <path_to_file>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To install a local RPM file, enter:
yum install <path_to_RPM_file>
# yum install <path_to_RPM_file>Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the package has dependencies, specify the paths to these RPM files as well. Otherwise, YUM downloads the dependencies from the repositories or fails if they are not available in the repositories.
5.2. Installing package groups Copia collegamentoCollegamento copiato negli appunti!
Package groups bundle multiple packages, and you can use package groups to install all packages assigned to a group in a single step.
Procedure
Use one of the following methods to install a package group:
To install a package group by a group name, enter one of the following commands::
yum group install <group_name> yum install @<group_name>
# yum group install <group_name> # yum install @<group_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To install a package group by the groupID, enter:
yum group install <group_ID>
# yum group install <group_ID>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Enabling a module stream Copia collegamentoCollegamento copiato negli appunti!
If the package you want to install is provided by a module stream, you must enable the respective module stream.
If the package is provided by a module stream marked as default, yum automatically enables that module stream before installing this package.
It is recommended to always select a specific module stream for installation. Always consider each stream’s life cycle.
Note that certain default module streams reach the End of Life status prior to the end of the RHEL major release.
Procedure
Enable the module stream:
yum module enable <module_name>:<stream>
# yum module enable <module_name>:<stream>Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf another stream of the module was previously active because it was default, it becomes inactive.
5.4. Installing modular content Copia collegamentoCollegamento copiato negli appunti!
For certain software, Red Hat provides modules. You can use modules to install a specific version (stream) and set of packages (profiles).
Always consider the module stream’s life cycle.
Prerequisites
- You do not have any packages installed from another stream of the same module.
Procedure
List modules that provide the package you want to install:
yum module list <module_name>
# yum module list <module_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example, to list modules that provide the
postgresql-serverpackage, enter:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output shows that the
postgresqlmodule is available with streams9.6,10,12,13, and15. The default stream is10([d]).Install a selected module stream:
yum module install <module-name>:<stream>/<profile>
# yum module install <module-name>:<stream>/<profile>Copy to Clipboard Copied! Toggle word wrap Toggle overflow If a default profile for a stream is defined, you can omit
/<profile>in the command to install this default profile of the stream.For example, to install the default profile (
server) for stream13of thepostgresqlmodule, enter:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the correct module stream is enabled (
[e]) and the required profile was installed ([i]):Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.5. Specifying package details for installation Copia collegamentoCollegamento copiato negli appunti!
You can specify package details for a precise package installation process. To do so, append the following suffixes to the yum install command to explicitly define how to parse an argument:
-
Use
-nto specify the exact name of the package. -
Use
-nato specify the exact package name and architecture. -
Use
-nevrato specify the exact package name, epoch, version, release, and architecture.
Procedure
Depending on your scenario, use one of the following options to optimize the package installation process:
To install a package by using its exact name, enter:
yum install-n <package_name>
# yum install-n <package_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To install a package by using its exact name and architecture, enter:
yum install-na <package_name>.<architecture>
# yum install-na <package_name>.<architecture>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To install a package by using its exact name, epoch, version, release, and architecture, enter:
yum install-nevra <package_name>-<epoch>:<version>-<release>.<architecture>
# yum install-nevra <package_name>-<epoch>:<version>-<release>.<architecture>Copy to Clipboard Copied! Toggle word wrap Toggle overflow