Subscribe to Red Hat 7 Repositories

Registering System for Red Hat Software

I know this is an easy one but here we go anyway. After installing Red Hat you will need to register the system. Simply do the following:

# subscription-manager register

Registering to: Username: <username> Password: <password> The system has been registered with ID: fdeb626a-xxxx-xxxx-xxx-xxxxxxxxxxxx The registered system name is: rh8vm.local

One important note is your username is used not the email if that’s what you are using to login with. You can get this by clicking on your name at the top of the Red Hat page and selecting “Profile”

If you happen to get the following notice when you try and do an update:

# yum update -y

Updating Subscription Management repositories.
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Error: There are no enabled repos.

Then do the following:

# subscription-manager attach --auto

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status: Subscribed

Subscribing to Additional Repos

Below is an example of some additional repos that are available. These contain various apps and software including docker.

# subscription-manager repos --enable=rhel-7-server-rpms
# subscription-manager repos --enable=rhel-7-server-extras-rpms
# subscription-manager repos --enable=rhel-7-server-optional-rpms

Listing Repo’s & Contents

Listing the repos that are currently registered

# yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
repo id repo name status
rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 7 Server - Extras (RPMs) 1,275
rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 21,020
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 28,756
repolist: 51,051

Listing What is Available for Install

# yum list available
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
Available Packages
389-ds-base.x86_64 rhel-7-server-rpms
389-ds-base-devel.x86_64 rhel-7-server-optional-rpms
389-ds-base-libs.x86_64 rhel-7-server-rpms
389-ds-base-snmp.x86_64 rhel-7-server-optional-rpms
Cython.x86_64 0.19-5.el7 rhel-7-server-optional-rpms
ElectricFence.i686 2.2.2-39.el7 rhel-7-server-rpms
ElectricFence.x86_64 2.2.2-39.el7 rhel-7-server-rpms

Official Red Hat Yum Cheat sheet