Abstract
| Goal | Download, install, update, and manage software packages from Red Hat and Yum package repositories. |
| Objectives |
|
| Sections |
|
| Lab |
Installing and Updating Software Packages |
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 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 . Type subscription in the field and click on Red Hat Subscription Manager. Enter the appropriate password when prompted to authenticate. This displays the following Subscriptions window:
![]() |
To register the system, click the button in the Subscriptions window. This displays the following dialog:
![]() |
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 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.
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
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.
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.
subscription-manager(8)
and rct(8) man pages