Installing RPMs in the operating system installation package
Use this procedure to install the RPMs that are included in the RHEL
installation package.
Procedure
- Create a repository
for the RPMs that are available in the operating system package.
- To create a yum repository on a RHEL system, create a
.repo file in the /etc/yum.repos.d/
directory.For example, if you create a repository for the Red Hat Enterprise Linux™ installation DVD, you might name your file RedHatDVD.repo. The following example shows the contents of a sample .repo file for the RHEL operating system.
[rhdvd] enabled=1 name=Red Hat Installation DVD baseurl=file:///media/RHEL_8.10%20x86_64%20DVD/Server/ gpgcheck=1
Important: Thebaseurl
value must point to the location of the Server subdirectory of the operating system installation DVD directory. Ensure that you use the value %20 for any spaces in the file name.
- To create a yum repository on a RHEL system, create a
.repo file in the /etc/yum.repos.d/
directory.
-
To install the required RPMs, enter the following command:
command-name install rpm-name
where command-name is dnf for RHEL. For rpm-name, enter only the name of the RPM. Do not enter the RPM file name or add the RPM version. You can include multiple RPM names on one line separated by a space.The following example shows the command for installing the gcc-c++ RPM on a RHEL system:dnf install gcc-c++