Using the Subscription Manager

Overview of Subscription Manager

  • Subscription Manager is a tool used to register a system and attach subscriptions within Red Hat Enterprise Linux (RHEL).

Registration Requirement

  • To use RHEL effectively, the system must be registered using Subscription Manager, which is a crucial step to gain access to repositories.

  • Before registration, there is no repository access provided to the user.

  • If registration cannot be completed, the only alternative is to utilize self-provided repositories, as discussed in previous lessons.

Caution on Registration in Learning Environment

  • Important Note: Do not register your system if you are preparing for the RHCSA exam.

    • Registration may disrupt the labs and may not reflect the actual exam environment.

Step-by-Step Registration Process

  1. Command to Register: Use subscription-manager register to begin the registration process.

    • You will be prompted to enter the username associated with your subscription.

  2. Unregistering the System: If necessary, unregister the system with subscription-manager unregister.

  3. After Registration: Upon successful registration:

    • Entitlement certificates are added to specific files within the system.

    • Files include:

      • /etc/pki/product: Indicates installed Red Hat products.

      • Consumer: Identifies the Red Hat account used for registration.

      • Entitlement: Denotes which subscription is currently attached to the system.

  4. Check Current Entitlements: Utilize the command rhc-cd to verify current entitlements associated with the system.

Example Scenario of Registration

  • The registration process outlined above will fail if executed on a practice machine meant for the RHCSA exam.

  • Illustration of Registration Process:

    • After logging in, if the system is not registered, an alert will be displayed stating "system not registered".

    • Registration can be done via the command line with sudo subscription-manager register.

    • Ensure the hostname is appropriate.

    • Change hostname with the command:

    • sudo hostnamectl set-hostname RHCSA3.example.com

    • Execute the registration command:

    • sudo subscription-manager register to contact the directory server and enter your Red Hat username and password when prompted.

    • Upon successful registration, a confirmation message appears confirming that the system is now registered.

Final Advice for Exam Preparation

  • Familiarize yourself with the registration process as it's an important skill in real-world operations.

  • However, focus on practicing skills relevant to the RHCSA exam rather than attempting registration, as it could impact your learning.