How to register and subscribe a system to the Red Hat Customer Portal using Red Hat Subscription-Manager
Overview
Red Hat Subscription Manager is a local service that tracks installed products and subscriptions on a local system to help manage subscription assignments. It communicates with the backend subscription service (the Customer Portal or an on-premise server such as Subscription Asset Manager) and works with content management tools such as yum.
Red Hat Subscription and Registration Process
A properly registered and attached product is eligible for support and errata updates. To be properly registered, the system needs to both be attached to your account and then attached to a subscription. Attaching your system to a subscription consumes one or more entitlements from a valid subscription depending on the type of system that it is.
Red Hat Customer Portal
With Red Hat products, you can manage your subscriptions with different applications depending on your organization’s needs. Red Hat Subscription Manager is an on-premise application that sends information back to the Red Hat Customer Portal about your subscription usage. Login to your customer account using Red Hat login or email and check the total subscription status.
In my customer account, there are 14 active subscriptions and only one physical server is subscribed. If you want to check how many types of subscriptions are available then click on Active Subscriptions. It will give you your current active inventory.
In the Systems tab, you will see how many servers are managed by your subscriptions.
Here, the Client is the hostname that is managed by that subscription. If you click on the hostname, you can see all subscription-related information available for this system.
Operating System Overlook
Lab Environment
Server Information | |
OS Release | Red Hat Enterprise Linux Server release 7.3 (Maipo) |
Kernel | 3.10.0-514.el7.x86_64 |
IP Address | 192.168.201.112 |
Host Name | rhel73 |
User Name | Admin |
Log in to the system and check the subscription status.
rony:~ rony$ ssh Admin@192.168.201.112[Admin@rhel73 ~]$ sudo subscription-manager status
So, it is clear to us my system is not registered with the subscription manager.
Register and Subscribe
With Red Hat Subscription-Manager, registration and utilization of a subscription is actually a two-part process.
First, register a system, then apply for a subscription.
1. Register
Use the following command to register the system, then automatically associate any available subscription matching that system:
[Admin@rhel73 ~]$ sudo subscription-manager register --username MyRedHatUser --password SuperSecretPassword --auto-attachThis single-line command will add subscriptions and certificates to the system. It showed my system is successfully Subscribed.
It is also possible to use the below command.
[Admin@rhel73 ~]$ sudo subscription-manager register --username <redhat_login_username> --password <redhat_login_password>[Admin@rhel73 ~]$ sudo subscription-manager role --set="Red Hat Enterprise Linux Server"[Admin@rhel73 ~]$ sudo subscription-manager service-level --set="Self-Support or Standard"[Admin@rhel73 ~]$ sudo subscription-manager usage --set="Development/Test or Production"[Admin@rhel73 ~]$ sudo subscription-manager attach --auto --servicelevel Premium
[Admin@rhel73 ~]$ sudo subscription-manager attach
2. Attach
Check the available pool,
[Admin@rhel73 ~]$ sudo subscription-manager list --available --all | grep 'Pool ID'Pool ID: 2c94a8fe843469ef0184vf4a35585b6d
Pool ID: 8a85f9997e6ecdc9017fr4ea767e256e
Pool ID: 8a85f99b7c18bf35017o9i2a0fe13fb7
Pool ID: 8a85f99f7922d80ty6795fe1b5f34f14
Pool ID: 8a85f99f7922d8030179h761b6804f18
I have four pools. Attach a suitable pool for you,
[Admin@rhel73 ~]$ sudo subscription-manager attach --pool 8a85f99f7922d8030179h761b6804f183. Check
Also, we can check by the ‘subscription-manager status’ command.
[Admin@rhel73 ~]$ sudo subscription-manager statusIf the command is unable to attach a subscription, it will indicate that in the output. Then, you can attach the subscription from the Customer Portal, instead (see the next section).
Check Subscription Status In the Customer Portal
Log in to the customer portal and click on the System tab as shown in Figure 01. At first, there has only one system in my portal. Right now there have another one and the hostname of the newly added system is ‘rhel73’.
So, it is clearly illustrated our newly is under the subscription manager. Click on the newly added system we can see the details subscription informations.
In the Subscriptions section, we can see our system is properly subscribed.
Unregistering a system
Log in to the system and check the subscription status.
rony:~ rony$ ssh Admin@192.168.201.112[Admin@rhel73 ~]$ sudo subscription-manager status
[Admin@rhel73 ~]$ sudo subscription-manager remove --all
[Admin@rhel73 ~]$ sudo subscription-manager unregister
[Admin@rhel73 ~]$ sudo subscription-manager clean
The ‘subscription-manager remove –all’ command will successfully remove both subscriptions and certificates from the system.
Conclusion
This tutorial helps you How to register and subscribe to a system to the Red Hat Customer Portal using the Red Hat Subscription-Manager step by step. If have any queries please comment on us.
References
In this tutorial, I follow the official docs as reference Red Hat Administration Guide.
Comments
Post a Comment