RHEL Subscriptions

To be able to use YUM on an RHEL server you need to register it with the RedHat servers.
NB: You can do this with a Developer account, which is free!

First register the system
# subscription-manager register

Next attach a subscription
# subscription-manager list --available | awk '/Pool/ { system ("subscription-manager attach --pool="$3) }'
or
# subscription-manager attach --auto

Once you are done, you can remove the subscription and server from their systems.

To remove a system from a RHEL subscription you first have to run,
# subscription-manager list --consumed
to get the serial number. Then pass that serial number to the remove command
# subscription-manager remove --serial=XXXXXXX
OR

you can run this command, which does both
# subscription-manager list --consumed | awk '/Serial:/ { system ("subscription-manager remove --serial="$2) }'

Leave a Reply

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.