How to use RHN Certificate-Based Subscription Management in RHEL 6.1

Prominent change in the new Red Hat Enterprise Linux 6.1 is brand new subscription management. While RHEL 6.1 still include the classic RHN tools and commands (rhn_register, rhnreg_ks and others), it is also possible to use the new RHN Certificate-Based Subscription Management. In this article, I am going to go through all the required steps of sucessful registration and subscription of a RHEL 6.1 system.

First of all make sure you did not use the classic RHN before you procced with the tutorial. To unregister a machine, just delete this file:

# rm /etc/sysconfig/rhn/systemid

You can also log in to the RHN site and delete the system there. Now, we are going to subscribe using the new method.

If you do have a graphical desktop on the machine you can use subscription-manager-gui tool which has pretty sleek interface and provides you with all the required steps. My primary target is to show process of registering using command line tool subscription-manager.

The first step is to register a machine. The following command identifies our system to the subscription service:

# subscription-manager register

You are asked for your RHN login credentials (username and password). You can also provide some additional options like name (custom system name instead of hostname), autosubscribe (to automatically subscribe) or force (to unregister machine if it was already registered). We won't use any options in our tutorial.

You can now login to the site and visit brand new section Subscriptions - CERTIFICATE-BASED MANAGEMENT to see the system (consumer in the terms of RHN).

Let's display all of the subscriptions that are compatible with the machine, either subscriptions that are actually consumed by the machine or unused subscriptions that are available to the machine:

# subscription-manager list

The next step is to consume a subscription. You need to provide pool id using the pool argument, or auto option to determine subscription according to the installed system. In our case the command would be:

# subscription-manager subscribe --auto

We are done, the system is registered and yum should deliver packages and updates via new Red Hat Content Delivery Network, resulting in significantly faster download speeds. You can also disable the classic RHN yum plugin if you want by editing /etc/yum/pluginconf.d/rhnplugin.conf and setting enabled to 0.

For more info read the Red Hat Network Certificate-based Subscription Management user guide (PDF link).
27 August 2011 | redhat | katello | rhn