Bookmark this page

Chapter 14. Installing and Updating Software Packages

Abstract

Goal Download, install, update, and manage software packages from Red Hat and Yum package repositories.
Objectives
  • Register a system to your Red Hat account and assign it entitlements for software updates and support services using Red Hat Subscription Management.

  • Explain how software is provided as RPM packages, and investigate the packages installed on the system with Yum and RPM.

  • Find, install, and update software packages using the yum command.

  • Enable and disable use of Red Hat or third-party Yum repositories by a server.

  • Explain how modules allow installation of specific versions of software, list, enable, and switch module streams, and install and update packages from a module.

Sections
  • Registering Systems for Red Hat Support (and Quiz)

  • Explaining and Investigating RPM Software Packages (and Quiz)

  • Installing and Updating Software Packages with Yum (and Guided Exercise)

  • Enabling Yum Software Repositories (and Guided Exercise)

  • Managing Package Module Streams (and Guided Exercise)

Lab

Installing and Updating Software Packages

Registering Systems for Red Hat Support

Objectives

After completing this section, you should be able to register a system to your Red Hat account and assign it entitlements for software updates and support services using Red Hat Subscription Management.

Red Hat Subscription Management

Red Hat Subscription Management provides tools that can be used to entitle machines to product subscriptions, allowing administrators to get updates to software packages and track information about support contracts and subscriptions used by the systems. Standard tools such as PackageKit and yum can obtain software packages and updates through a content distribution network provided by Red Hat.

There are four basic tasks performed with Red Hat Subscription Management tools:

  • Register a system to associate that system to a Red Hat account. This allows Subscription Manager to uniquely inventory the system. When no longer in use, a system may be unregistered.

  • Subscribe a system to entitle it to updates for selected Red Hat products. Subscriptions have specific levels of support, expiration dates, and default repositories. The tools can be used to either auto-attach or select a specific entitlement. As needs change, subscriptions may be removed.

  • Enable repositories to provide software packages. Multiple repositories are enabled by default with each subscription, but other repositories such as updates or source code can be enabled or disabled as needed.

  • Review and track entitlements that are available or consumed. Subscription information can be viewed locally on a specific system or, for an account, in either the Red Hat Customer Portal Subscriptions page or the Subscription Asset Manager (SAM).

Registering a System

There are a number of different ways to register a system with Red Hat Customer Portal. There is a graphical interface that you can access with a GNOME application or through the Web Console service, and there is a command-line tool.

To register a system with the GNOME application, launch Red Hat Subscription Manager by selecting Activities. Type subscription in the Type to search... field and click on Red Hat Subscription Manager. Enter the appropriate password when prompted to authenticate. This displays the following Subscriptions window:

Figure 14.1: The main window of Red Hat Subscription Manager

To register the system, click the Register button in the Subscriptions window. This displays the following dialog:

Figure 14.2: The service location and account information dialog of Red Hat Subscription Manager

This dialog box registers a system with a subscription server. By default, it registers the server to Red Hat Customer Portal. Provide the Login and Password for the Red Hat Customer Portal account to which the system should be registered, and click the Register button.

When registered, the system automatically has a subscription attached if one is available.

After the system is registered and a subscription has been assigned, close the Subscriptions window. The system is now properly subscribed and ready to receive updates or install new software from Red Hat.

Registration from the Command Line

Use the subscription-manager(8) command to register a system without using a graphical environment. The subscription-manager command can automatically attach a system to the best-matched compatible subscriptions for the system.

  • Register a system to a Red Hat account:

    [user@host ~]$ subscription-manager register --username=yourusername \
    --password=yourpassword
    
  • View available subscriptions:

    [user@host ~]$ subscription-manager list --available | less
    
  • Auto-attach a subscription:

    [user@host ~]$ subscription-manager attach --auto
    
  • Alternatively, attach a subscription from a specific pool from the list of available subscriptions:

    [user@host ~]$ subscription-manager attach --pool=poolID
  • View consumed subscriptions:

    [user@host ~]$ subscription-manager list --consumed
    
  • Unregister a system:

    [user@host ~]$ subscription-manager unregister
    

Note

subscription-manager can also be used in conjunction with activation keys, allowing registration and assignment of predefined subscriptions, without using a username or password. This method of registration can be very useful for automated installations and deployments. Activation keys are often issued by an on-premise subscription management service, such as Subscription Asset Manager or Red Hat Satellite, and are not discussed in detail in this course.

Entitlement certificates

An entitlement is a subscription that has been attached to a system. Digital certificates are used to store current information about entitlements on the local system. Once registered, entitlement certificates are stored in /etc/pki and its subdirectories.

  • /etc/pki/product contains certificates indicating which Red Hat products are installed on the system.

  • /etc/pki/consumer contains certificates identifying the Red Hat account to which the system is registered.

  • /etc/pki/entitlement contains certificates indicating which subscriptions are attached to the system.

The certificates can be inspected with the rct utility directly, but the subscription-manager tools provide easier ways to examine the subscriptions attached to the system.

References

subscription-manager(8) and rct(8) man pages

Get started with Red Hat Subscription Management

Revision: rh124-8.2-df5a585