Search

Chapter 7. Registering the System and Managing Subscriptions

download PDF

The subscription service provides a mechanism to handle Red Hat software inventory and allows you to install additional software or update already installed programs to newer versions using the yum package manager. In Red Hat Enterprise Linux 7 the recommended way to register your system and attach subscriptions is to use Red Hat Subscription Management.

Note

It is also possible to register the system and attach subscriptions after installation during the initial setup process. For detailed information about the initial setup see the Initial Setup chapter in the Installation Guide for Red Hat Enterprise Linux 7. Note that the Initial Setup application is only available on systems installed with the X Window System at the time of installation.

7.1. Registering the System and Attaching Subscriptions

Complete the following steps to register your system and attach one or more subscriptions using Red Hat Subscription Management. Note that all subscription-manager commands are supposed to be run as root.

  1. Run the following command to register your system. You will be prompted to enter your user name and password. Note that the user name and password are the same as your login credentials for Red Hat Customer Portal.

    subscription-manager register
  2. Determine the pool ID of a subscription that you require. To do so, type the following at a shell prompt to display a list of all subscriptions that are available for your system:

    subscription-manager list --available

    For each available subscription, this command displays its name, unique identifier, expiration date, and other details related to your subscription. To list subscriptions for all architectures, add the --all option. The pool ID is listed on a line beginning with Pool ID.

  3. Attach the appropriate subscription to your system by entering a command as follows:

    subscription-manager attach --pool=pool_id

    Replace pool_id with the pool ID you determined in the previous step.

    To verify the list of subscriptions your system has currently attached, at any time, run:

    subscription-manager list --consumed

For more details on how to register your system using Red Hat Subscription Management and associate it with subscriptions, see the designated solution article. For comprehensive information about subscriptions, see the Red Hat Subscription Management collection of guides.

7.2. Managing Software Repositories

When a system is subscribed to the Red Hat Content Delivery Network, a repository file is created in the /etc/yum.repos.d/ directory. To verify that, use yum to list all enabled repositories:

yum repolist

Red Hat Subscription Management also allows you to manually enable or disable software repositories provided by Red Hat. To list all available repositories, use the following command:

subscription-manager repos --list

The repository names depend on the specific version of Red Hat Enterprise Linux you are using and are in the following format:

rhel-version-variant-rpms
rhel-version-variant-debug-rpms
rhel-version-variant-source-rpms

Where version is the Red Hat Enterprise Linux system version (6 or 7), and variant is the Red Hat Enterprise Linux system variant (server or workstation), for example:

rhel-7-server-rpms
rhel-7-server-debug-rpms
rhel-7-server-source-rpms

To enable a repository, enter a command as follows:

subscription-manager repos --enable repository

Replace repository with the name of the repository to enable.

Similarly, to disable a repository, use the following command:

subscription-manager repos --disable repository

Section 9.5, “Configuring Yum and Yum Repositories” provides detailed information about managing software repositories using yum.

If you want to update the repositories automatically, you can use the yum-cron service. For more information, see Section 9.7, “Automatically Refreshing Package Database and Downloading Updates with Yum-cron”.

7.3. Removing Subscriptions

To remove a particular subscription, complete the following steps.

  1. Determine the serial number of the subscription you want to remove by listing information about already attached subscriptions:

    subscription-manager list --consumed

    The serial number is the number listed as serial. For instance, 744993814251016831 in the example below:

    SKU:        ES0113909
    Contract:     01234567
    Account:      1234567
    Serial:      744993814251016831
    Pool ID:      8a85f9894bba16dc014bccdd905a5e23
    Active:      False
    Quantity Used:   1
    Service Level:   SELF-SUPPORT
    Service Type:   L1-L3
    Status Details:
    Subscription Type: Standard
    Starts:      02/27/2015
    Ends:       02/27/2016
    System Type:    Virtual
  2. Enter a command as follows to remove the selected subscription:

    subscription-manager remove --serial=serial_number

    Replace serial_number with the serial number you determined in the previous step.

To remove all subscriptions attached to the system, run the following command:

subscription-manager remove --all

7.4. Additional Resources

For more information on how to register your system using Red Hat Subscription Management and associate it with subscriptions, see the resources listed below.

Installed Documentation

  • subscription-manager(8) — the manual page for Red Hat Subscription Management provides a complete list of supported options and commands.

See Also

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.