How to register server in Red Hat portal and enable repos.

by admin February 28, 2020 at 6:38 pm

In below, I have explained with examples to register in Red Hat Portal and enable the repositories using subscription manager.

To Register server :

[root@rhel7 ~]# subscription-manager register
Registering to:
Username: ramesh_msr
The system has been registered with ID: cec19594-17c6-4325-9054-d7936dd97e68
The registered system name is:

To list available subscriptions for registered account :

[root@rhel7 ~]# subscription-manager list --available
    Available Subscriptions
Subscription Name:   Red Hat Developer Subscription
Provides:            dotNET on RHEL Beta (for RHEL Server)

From above output make a note of the pool id for the susbscription going to attach

[root@rhel7 ~]# subscription-manager attach --pool=""
Successfully attached a subscription for: Red Hat Developer Subscription

Below command list the repos available for attached subsciption from which enable the repo to download the patches or apply in the server

[root@rhel7 ~]# subscription-manager repos

root@rhel7 ~]# subscription-manager repos --enable=rhel-7-server-rpms
Repository 'rhel-7-server-rpms' is enabled for this system.

Once you enabled the repo then you can verify it by running yum repolist command.

[root@rhel7 yum.repos.d]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                                                                                                                   | 3.5 kB  00:00:00     
(1/3): rhel-7-server-rpms/7Server/x86_64/group                                                                                                                                       | 773 kB  00:00:00     
(2/3): rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                                  | 3.5 MB  00:00:01     
(3/3): rhel-7-server-rpms/7Server/x86_64/primary_db                                                                                                                                  |  66 MB  00:00:15     
repo id                                                                                        repo name                                                                                              status
rhel-7-server-rpms/7Server/x86_64                                                              Red Hat Enterprise Linux 7 Server (RPMs)                                                               27,012
repolist: 27,012
[root@rhel7 yum.repos.d]# 

Add Comment