Red Hat Subscription Management

Für Updates und die Installation von Software-Paketen sind auch bei einer Subscription der subscription-manager und yum zuständig. For das Onboarding bei Red Hat sind vier Schritte nötig:

  1. Registrierung des Systems bei Red Hat, damit es Updates erhalten kann:
    subscription-manager register --username=yourusername --password=yourpassword
  2. System an einer Subscription anhängen:
    subscription-manager attach --auto
  3. Software Repos aktivieren. Beispiele:

    # RHEL 8
    subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms --enable rhel-8-for-x86_64-baseos-debug-rpms
    
    # RHEL 7
    subscription-manager repos --enable rhel-7-server-optional-rpms --enable rhel-server-rhscl-7-rpms
    
  4. Review - entweder im Red Hat Customer Portal unter „Subscriptions“ oder im Subscription Asset Manager (SAM)

Die Interaktion geschieht mittels subscription-manager oder unter GNOME per subscription-manager-gui.

EUS-Repos in RHSM bieten genau die Software an, die zur Hardware-Architektur und der Major-Version des Systems passt.

Red Hat Subscription Manager Cheat Sheet

Alles rund um die Registrierung:

# clears old certificate files and currupt data
subscription-manager clean

# you need username and password
subscription-manager register
subscription-manager register --username=yourusername --password=yourpassword

# set a role for your system.
subscription-manager role --set="Red Hat Enterprise Linux Server"

# view available subscriptions
subscription-manager list --available | less

# view consumed subscriptions
subscription-manager list --consumed

# auto-attach a subscription
# after that, enable/disable repos
subscription-manager attach --auto

# unregister
subscription-manager remove --all
subscription-manager unregister

Repositories aktivieren/deaktivieren:

# list available repos
subscription-manager repos --list

# list enabled repos
subscription-manager repos --list-enabled

# activate repo
subscription-manager repos --enable rhel-6-server-optional-rpms

# deactivate repo
subscription-manager repos --disable rhel-6-server-optional-rpms

Troubleshooting

Network error code: 400
subscription-manager clean
subscription-manager register
subscription-manager attach --auto

Siehe https://access.redhat.com/solutions/5187461

Built on 2024-07-16