How to Register and Enable Red Hat Subscription, Repositories and Updates for RHEL 7.0 Server

After the last tutorial on minimal installation of Red Hat Enterprise 7.0, it’s time to register your system to Red Hat Subscription Service and enable your system repositories and perform a full system update.

Register RHEL 7 in Red Hat

Enable Red Hat Subscription, Reposiories and Updates

A subscription service has the role to identify registered systems with the products installed on them. Local Subscription Manager service tracks down the installed software products, available and used subscriptions and communicates with the Red Hat Customer Portal through tools like YUM.


  1. Red Hat Enterprise Linux 7.0 Minimal Installation

This tutorial guides you on how we can perform tasks like registering new RHEL 7.0, how to active subscription and repositories before actually be able to update our system.

Step 1: Register and Active Red Hat Subscription

1. To register your system to Customer Portal Subscription Management use the following command followed by the credentials used to login to Red Hat Customer Portal.

# subscription-manager register --username your_username --password your_password
Register RHEL 7 Subscription

Register RHEL 7 Subscription

NOTE: After the system is successfully authenticated an ID will be displayed on your prompt for your system.

2. To unregister your system use unregister switch, which will remove the system’s entry from the subscription service and all subscriptions, and will deletes its identity and subscription certificates on local machine.

# subscription-manager unregister

3. To get a list of all your available subscriptions use list switch and note down your Subscription Pool ID that you want to active it on your system.

# subscription-manager list -available
List Red Hat Subscriptions

List Red Hat Subscriptions

4. To active it a subscription use the Subscription Pool ID, but be aware that when purchase one, it is valid for a specified period of time, so make sure you buy a new period of time before expiring. Because this system is for tests, I only use the 30 Day Self-Supported RHEL free subscription. To activate a subscription use the following command.

# subscription-manager subscribe --pool=Pool ID number
Red Hat Subscription Pool ID

Red Hat Subscription Pool ID

5. To get a status of your consumed subscriptions use the following command.

# subscription-manager list –consumed
Verify Red Hat Subscription Status

Verify Red Hat Subscription Status

6. To check your enabled subscriptions use the below command.

# subscription-manager list
Check Enabled Red Hat Subscription Lists

Check Enabled Red Hat Subscription Lists

7. If you want to remove all your active subscriptions use –all argument or just provide a subscription serial if you want to remove a specific pool only.

# subscription-manager remove --all
# subscription-manager unsubscribe --serial=Serial number
Remove Red Hat Subscriptions

Remove Red Hat Subscriptions

8. To list the available service levels on your RHEL 7.0 system use the following command and if you want to set a your desired level use the switch –set on service-level command.

# subscription-manager service-level --list
# subscription-manager service-level --set=self-support
List RHEL Available Service Levels

List RHEL Available Service Levels

Step 2: Enable Yum Repositories

9. After you system has been registered to Red Hat Customer Portal and a Subscription has been activated in your system you can start listing and enabling system Repositories. To get a list of all your provided repositories through a certain subscription use the next command.

# subscription-manager repos --list
Enable Repositories on RHEL 7

Enable Yum Repositories on RHEL

NOTE: A long repositories list should appear and you can status to see if certain repositories are enabled (the ones with 1 on Enabled).

10. A more simple output the command yum repolist all should generate through, and you can, also, verify if certain repos are enabled.

# yum repolist all
List All RHEL Repositories

List All RHEL Repositories

Verify Enabled Repositories on RHEL

Verify Enabled Repositories on RHEL

11. To view only the enabled system repositories use the following command.

# yum repolist
View System Enabled Repositories

View System Enabled Repositories

12. Now if you want to enable a certain repo on you system, open /etc/yum.repos.d/redhat.repo file and make sure you change the line enabled from 0 to 1 on every specific repo you want to activate.

 # vi /etc/yum.repos.d/redhat.repo
Enable Certian Repositories on RHEL

Enable Certian Repositories on RHEL

NOTE: Here I’ve enabled RHEL 7 Server Optional RPMs repositories which I will need later to install some important PHP moduleson a LAMP server.

13. After you edited the file and enabled all your needed Repositories using the procedure above, run yum repolist all or just yum repolist, again to verify repos status like in the screenshots below.

# yum repolist all
Verify All Repo Status

Verify All Repo Status

List All Enabled Repositories

List All Enabled Repositories

Step 3: Full Update RHEL 7.0

14. After everything concerning subscriptions and repositories has been set, upgrade your system to make sure your system has the latest packages, kernels and security patches up to date, issuing the following command.

# yum update
Update RHEL 7

Update RHEL 7

That’s all! Now your system is up to date and you can start perform other important task like starting to build a complete web environment for productions by installing all the necessary software packages, which will be covered in future tutorials.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

19 Responses

  1. Hein Htet Ko says:

    how I can exit from black screen?

  2. Roman Gherta says:

    Matei in Centos we were receiving this error.

    “User cannot register with any organizations”
    until we executed
    subscription-manager register –username your_username –password your_password –auto-attach

    • Ravi Saive says:


      It seems you don’t have a RedHat subscription, means you can’t register your system to RedHat network repository.

      • Roman Gherta says:

        I actually had a username registered but still got that error. It wasn’t until I used the –auto-attach parameter that it worked as expected.

        • Ravi Saive says:


          I didn’t noticed that –auto-attach parameter in the command you posted, anyways thats great it worked for you finally..:)

  3. Poonam says:

    I know it’s away from topic but can you tell me the way to install graphics header file in red hat,

  4. poonam says:

    After 1st step it is showing

    my_username cannot register to any organizations.

    what’s the problem

  5. Nic says:

    There is an error in the code for listing all the services

    you have “-available” but in the print screen you have “–available”

    Please look into resolving that – Cheers.

    Great blog otherwise.

  6. patrick says:

    do you have to register the core edition of centos 7? I used the minimal installation disk from the online centos source page. it does not a redhat any where in the boot up. is that still consider redhat to..

    • Ravi Saive says:


      Only RedHat distributions needs to be registered to RedHat subscription to get package updates, CentOS distributions is free and doesn’t required any registration to get package updates..

  7. dilshath says:

    For this subscription, Redhat will deduct the amount?

    • Ravi Saive says:


      Yes, they have yearly RedHat subscription plans, you need check out official RedHat subscription page to know more about it..

  8. Theluli says:

    Hi Matei nice tutorial, l have redhat 7.2 and l need repos for rhscl for installing php55, but seems not to find them, can you help me how to get those repository ?

  9. Matei Cezar says:

    Simple as that, no! The packages will remain installed on your system forever and ever, unless you manually choose to uninstall them! Feel free to upgrade the system, but after that month support, you wont be able to upgrade packages anymore!

  10. Rinshad says:

    Hi Matei,

    Thank you for the detailed post. If I subscribe 30 Day Self-Supported RHEL free subscription, can I upgrade my system to latest version? and what will happen after one month? all the packages that I have installed in system will lost?

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.