- 14.5. Upgrading the System Off-line with ISO and Yum
- How do I apply package updates to my RHEL system?
- Prerequisites
- Registering the system with the Subscription Manager
- Graphical interface
- Command line
- Applying package updates on Red Hat Enterprise Linux 9
- Applying package updates on Red Hat Enterprise Linux 8
- Applying package updates on Red Hat Enterprise Linux 7
- Applying package updates on Red Hat Enterprise Linux 6
- Applying package updates on Red Hat Enterprise Linux 5
14.5. Upgrading the System Off-line with ISO and Yum
For systems that are disconnected from the Internet or Red Hat Network, using the yum update command with the Red Hat Enterprise Linux installation ISO image is an easy and quick way to upgrade systems to the latest minor version. The following steps illustrate the upgrading process:
Create a target directory to mount your ISO image. This directory is not automatically created when mounting, so create it before proceeding to the next step, as root , type:
Replace mount_dir with a path to the mount directory. Typicaly, users create it as a subdirectory in the /media/ directory.
Mount the Red Hat Enterprise Linux 5 installation ISO image to the previously created target directory. As root , type:
mount
-o
loop
iso_name mount_dir
Replace iso_name with a path to your ISO image and mount_dir with a path to the target directory. Here, the -o loop option is required to mount the file as a block device.
head
-n1
mount_dir/.discinfo
The output of this command is an identification number of the ISO image, you need to know it to perform the following step.
Create a new file in the /etc/yum.repos.d/ directory, named for instance new.repo , and add a content in the following form. Note that configuration files in this directory must have the .repo extension to function properly.
[repository] mediaid=media_id name=repository_name baseurl=repository_url gpgkey=gpg_key enabled=1 gpgcheck=1
Replace media_id with the numeric value found in mount_dir/.discinfo . Set the repository name instead of repository_name, replace repository_url with a path to a repository directory in the mount point and gpg_key with a path to the GPG key.
[rhel5-Server] mediaid=1354216429.587870 name=RHEL5-Server baseurl=file:///media/rhel5/Server gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release enabled=1 gpgcheck=1
Update all yum repositories including /etc/yum.repos.d/new.repo created in previous steps. As root , type:
where mount_dir is a path to your mount directory. Also, you can remove the mount directory created in the first step. As root , type:
If you will not use the previously created configuration file for another installation or update, you can remove it. As root , type:
Example 14.1. Upgrading from Red Hat Enterprise Linux 5.8 to 5.9
Imagine you need to upgrade your system without access to the Internet connection. To do so, you want to use an ISO image with the newer version of the system, called for instance RHEL5.9-Server-20121129.0-x86_64-DVD1.iso . You have crated a target directory /media/rhel5/ . As root , change into the directory with your ISO image and type:
~]#mount
-o
loop
RHEL5.9-Server-20121129.0-x86_64-DVD1.iso
/media/rhel5/
~]#head
-n1
/media/rhel5/.discinfo
1354216429.587870
You need this number to configure your mount point as a yum repository. Create the /etc/yum.repos.d/rhel5.repo file and insert the following text into it:
[rhel5-Server] mediaid=1354216429.587870 name=RHEL5-Server baseurl=file:///media/rhel5/Server gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release enabled=1 gpgcheck=1
Update the yum repository, which effectively upgrades your system to a version provided by RHEL5.9-Server-20121129.0-x86_64-DVD1.iso . As root , execute:
When your system is successfully upgraded, unmount the image, remove the target directory and the configuration file:
How do I apply package updates to my RHEL system?
Red Hat Enterprise Linux starting with versions 6.1 and 5.7 introduced a new Red Hat Subscription Management (RHSM) service. Red Hat Network (RHN) has been decommissioned.
Users that are new to Red Hat or would like the enhanced subscription information and improved content access should use RHSM. If you are still using Red Hat Network, we advise you to migrate to RHSM as soon as possible. Customers using older versions of Red Hat Enterprise Linux must continue using RHN Classic. Refer to FAQ for Changes to Red Hat’s Entitlement Platform with RHEL 6.1 and 5.7 and What’s the difference between management services provided by Red Hat Network (RHN) Classic and Red Hat Subscription Management (RHSM)? for more information on benefits of RHSM over RHN.
- For Red Hat Enterprise Linux 9, register the system using RHSM as described in Registering the system with the Subscription Manager. Then update the system according to instructions in Applying package updates on Red Hat Enterprise Linux 9.
- For Red Hat Enterprise Linux 8, register the system using RHSM as described in Registering the system with the Subscription Manager. Then update the system according to instructions in Applying package updates on Red Hat Enterprise Linux 8.
- For Red Hat Enterprise Linux 7, register the system using RHSM as described in Registering the system with the Subscription Manager. Then update the system according to instructions in Applying package updates on Red Hat Enterprise Linux 7.
- For Red Hat Enterprise Linux 6, register the system using RHSM (if RHEL 6.1 or above) as described in Registering the system with the Subscription Manager. Then update the system according to instructions in Applying package updates on Red Hat Enterprise Linux 6.
- For Red Hat Enterprise Linux 5, register the system using RHSM (if RHEL 5.7 or above) as described in Registering the system with the Subscription Manager. After registration, update the system according to instructions in Applying package updates on Red Hat Enterprise Linux 5.
- If your system cannot connect to the Internet directly, our Red Hat Satellite offering may be of interest.
Prerequisites
Registering the system with the Subscription Manager
Graphical interface
Access the Subscription Management GUI client in Red Hat Enterprise Linux 9 via Activities and then Show Applications which is visible in the Favorites dock by default.
Access the Subscription Management GUI client in Red Hat Enterprise Linux 8 via Activities, then select Show Applications and click All. Then select Red Hat Subscription Manager.
In Red Hat Enterprise Linux 7 open Applications -> System Tools -> Red Hat Subscription Manager and in Red Hat Enterprise Linux 6 via System -> Administration -> Red Hat Subscription Manager.
Command line
A system can also be registered via the command line by using the «subscription-manager» command. To register your system, either through the GUI or from the command line, follow the instructions in the Using and Configuring Red Hat Subscription Manager guide.
Make sure that your firewall allows configuring RHSM, for more information see How do I access RHSM (yum) through a firewall?.
General information on RHSM can be found in Red Hat Network Subscription Management, while FAQ for Changes to Red Hat’s Entitlement Platform with RHEL 6.1 and 5.7 provides a quick overview and a comparison with RHN.
Applying package updates on Red Hat Enterprise Linux 9
Before installing an update, make sure all previously released errata relevant to the system have been applied.
To access updates when using Red Hat Enterprise Linux 9, launch the graphical update tool through Applications and then Software which is visible in the Favorites dock (by default).
Within the graphical interface, select Updates.
For a command line interface, use the following command to update the operating system:
To install a specific package, such as vsftpd, use the following command:
To update a specific package, such as bind, use the following command:
To find more information about the command line options available for yum , use the following command:
Applying package updates on Red Hat Enterprise Linux 8
Before installing an update, make sure all previously released errata relevant to the system have been applied.
To access updates when using Red Hat Enterprise Linux 8, launch the graphical update tool through Applications -> Show Applications -> All -> Software, or from the command line via the following command:
Within the graphical interface, select Updates.
For a command line interface, use the following command to update the operating system:
To install a specific package, such as vsftpd, use the following command:
To update a specific package, such as bind, use the following command:
To find more information about the command line options available for yum , use the following command:
Applying package updates on Red Hat Enterprise Linux 7
Before installing an update, make sure all previously released errata relevant to the system have been applied.
To access updates when using Red Hat Enterprise Linux 7, launch the graphical update tool through Applications -> System Tools -> Software Update, or from the command line via the following command:
For a command line interface, use the following command to update the operating system:
To install a specific package, such as vsftpd, use the following command:
To update a specific package, such as bind, use the following command:
To find more information about the command line options available for yum , use the following command:
Applying package updates on Red Hat Enterprise Linux 6
Before installing an update, make sure all previously released errata relevant to the system have been applied.
To access updates when using Red Hat Enterprise Linux 6, launch the graphical update tool through System -> Administration -> Software Update, or from the command line via the following command:
For a command line interface, use the following command to update the operating system:
To install a specific package, such as vsftpd, use the following command:
To update a specific package, such as bind, use the following command:
To find more information about the command line options available for yum , use the following command:
Applying package updates on Red Hat Enterprise Linux 5
Before installing an update, make sure all previously released errata relevant to the system have been applied.
To access updates when using Red Hat Enterprise Linux 5, launch the graphical update tool through Applications -> System Tools -> Software Updater, or from the command line via the following command:
For a command line interface, use the following command to update the operating system:
To install a specific package, such as vsftpd, use the following command:
To update a specific package, such as bind, use the following command:
To find more information about the command line options available for yum , use the following command: