首先去https://developers.redhat.com 注册一个开发者账号,注册完毕后使用注册的账号和密码执行下面的命令进行系统注册。
subscription-manager register --username <username> --password <password> --auto-attach
执行完出现下面的提示:
Registering to: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: xxxxxxxxxxxxxxx
The registered system name is: localhost.localdomain
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Subscribed
查看注册状态:
subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux for x86_64
Product ID: 479
Version: 8.0
Arch: x86_64
Status: Subscribed
Status Details:
Starts: 07/11/2018
Ends: 07/11/2019
执行 yum update 或者是 dnf upda