Warning message

log in to add comments or rate this document

How do I apply package updates to my RHEL system?

Updated 2015-02-27T22:40:33+00:00

Environment considerations

Red Hat Enterprise Linux starting with versions 6.1 and 5.7 introduced a new Red Hat Subscription Management (RHSM) service, which runs in parallel with Red Hat Network (RHN) Classic.

Users that are new to Red Hat or would like the enhanced subscription information and improved content access should use RHSM. Those that are using RHN Classic management functions via the web or RHN Satellite 5.4 and earlier or Red Hat Satellite 5.6 and later should choose RHN Classic for now. 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.

Prerequisites

Registering the system with the Subscription Manager

Access the Subscription Manager GUI client in Red Hat Enterprise Linux 7 via Applications -> System Tools -> Red Hat Subscription Manager and in Red Hat Enterprise Linux 6 via System -> Administration -> Red Hat Subscription Manager. System can also be registered via the command line by using the "subscription-manager" command. To register your system either trough the GUI or form 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.

Registering the system to RHN

Systems must be registered before updates from RHN can be applied. This can be done via System -> Administration -> Software Update and in earlier versions via Applications -> System Tools -> Software Updater. It can also be accessed via the command line by using the "rhn_register" command. Registration requires local root access and a valid RHN login that has an unused Update or Management entitlement for the new system you want to register.

Refer to the "Accessing RHN From a Client Machine" section of How do I access Red Hat Network (RHN) Classic to download software, updates, and security errata?, and the RHN FAQ list for information about registering with RHN, subscribing systems, and other common questions regarding RHN.

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:

# gpk-update-viewer 

For a command line interface, use the following command to update the operating system:

# yum update

To install a specific package, such as vsftpd, use the following command:

# yum install vsftpd

To update a specific package, such as bind, use the following command:

# yum update bind

To find more information about the command line options available for yum, use the following command:

# man yum

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:

# gpk-update-viewer 

For a command line interface, use the following command to update the operating system:

# yum update

To install a specific package, such as vsftpd, use the following command:

# yum install vsftpd

To update a specific package, such as bind, use the following command:

# yum update bind

To find more information about the command line options available for yum, use the following command:

# man yum

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:

# pup

For a command line interface, use the following command to update the operating system:

# yum update

To install a specific package, such as vsftpd, use the following command:

# yum install vsftpd

To update a specific package, such as bind, use the following command:

# yum update bind

To find more information about the command line options available for yum, use the following command:

# man yum

Applying package updates on Red Hat Enterprise Linux 4 and earlier

To access updates from RHN when using Red Hat Enterprise Linux 2.1, 3, and 4, launch the interactive Red Hat Update Agent with the following command:

# up2date

For a command line interface, use up2date-nox. To update non-interactively, use the following command:

# up2date-nox --update

To install a specific package, such as vnc, use the following command:

# up2date vnc

To update a specific package, such as ntp, use the following command:

# up2date -u ntp

To find more information about the command line options available for up2date, use the following command:

# man up2date

Manually selecting updates from the Red Hat Network

It may be necessary to apply only certain updates, for instance, those advisories that are tagged as fixing security issues (RHSA) or bug fixes (RHBA).

To manually select updates:

  1. Log into Red Hat Customer Portal.
  2. On the Subscriptions -> Classic Management -> Registered Systems page, select which system you want to update.
  3. Click the Software tab.
  4. Click the Errata tab.
  5. Select the errata you want to apply.
  6. Click "Apply Errata" at the bottom right of the page.
  7. On the actual system you want to apply these updates to, run the following command (or place it in a cron job):

    # rhn_check
    

This will apply the selected errata from step 5 to the system you selected in step 2.