Linux/傻逼 CentOS & RHEL/RHEL 7

Linux/傻逼 CentOS & RHEL/RHEL 7

需要在 RHEL 官网(免费)注册一个用户。

yum

Register:

subscription-manager register # 使用 Red Hat 官网注册的个人账户和密码登录
subscription-manager attach --auto
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

注:

RHEL 7 环境下遇到过 "subscription-manager attach --auto" 报错 "Unable to find available subscriptions for installed products."。解决方法是手工 attach。首先查看当前用户的 subscription:

[root@localhost ~]# subscription-manager list --available
+-------------------------------------------+
    可用订阅
+-------------------------------------------+
订阅名称: Red Hat Developer Subscription for Individuals
提供:     Red Hat Developer Tools (for RHEL Server for ARM)
           Red Hat Software Collections (for RHEL Server for ARM)
           Red Hat Ansible Engine
           JBoss Enterprise Application Platform from RHUI
           Red Hat CodeReady Linux Builder for IBM z Systems - Extended Update Support
           Red Hat JBoss AMQ Interconnect
           JBoss Enterprise Application Platform
           JBoss Enterprise Web Server from RHUI
           Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
           Red Hat Container Development Kit
           Red Hat Beta
           RHEL for SAP (for IBM Power LE) - Update Services for SAP Solutions
           Red Hat OpenShift Container Platform
           MRG Realtime
           Red Hat JBoss Data Grid
           dotNET on RHEL (for RHEL Server)
           Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
           Red Hat OpenShift Enterprise JBoss A-MQ add-on
           Red Hat OpenShift Application Runtimes Beta
           Red Hat Enterprise Linux High Availability - Update Services for SAP Solutions
           Oracle Java (for RHEL Server)
           Red Hat Enterprise Linux Resilient Storage for x86_64
           Red Hat Software Collections (for RHEL Server)
           Red Hat Enterprise Linux for ARM 64
           JBoss Enterprise Web Platform
           Red Hat Enterprise Linux for Real Time
           Red Hat CodeReady Linux Builder for ARM 64
           Red Hat Developer Tools (for RHEL Server)
           Red Hat Developer Tools Beta (for RHEL Server)
           Red Hat Enterprise Linux for x86_64
           Red Hat Enterprise Linux Resilient Storage for IBM z Systems - Extended Update Support
           Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node)
           Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
           dotNET on RHEL Beta (for RHEL Server)
           Red Hat CodeReady Linux Builder for x86_64
           Red Hat Enterprise Linux for SAP HANA for x86_64
           RHEL for SAP HANA - Update Services for SAP Solutions
           Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support
           RHEL for SAP HANA - Extended Update Support
           Red Hat Container Images Beta
           Red Hat Ansible Automation Platform
           Red Hat Enterprise Linux Atomic Host Beta
           Red Hat JBoss Core Services
           Red Hat Container Images
           Red Hat Enterprise Linux Load Balancer (for RHEL Server)
           Red Hat Developer Suite v.3
           Red Hat CodeReady Workspaces for OpenShift
           Red Hat OpenShift Enterprise JBoss EAP add-on
           Red Hat Openshift Application Runtimes for IBM Power LE
           Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
           Red Hat Enterprise Linux High Availability for x86_64
           Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
           Red Hat Openshift Application Runtimes
           Red Hat Enterprise Linux High Availability (for IBM z Systems) - Extended Update Support
           Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update Support
           Red Hat Enterprise Linux High Availability for x86_64 - Extended Update Support
           Red Hat Enterprise Linux Server - Update Services for SAP Solutions
           Red Hat JBoss Middleware
           Red Hat Migration Toolkit
           Red Hat Enterprise Linux High Performance Networking (for RHEL Server)
           Red Hat Enterprise Linux Scalable File System (for RHEL Server)
           Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support
           Red Hat Enterprise Linux EUS Compute Node
           RHEL for SAP - Update Services for SAP Solutions
           Oracle Java (for RHEL Server) - Extended Update Support
           Red Hat Enterprise Linux Atomic Host
           OpenJDK Java (for Middleware)
           JBoss Operations Network from RHUI
           Red Hat JBoss AMQ Clients
           Red Hat 3scale API Management Platform
           Red Hat Software Collections Beta (for RHEL Server)
           Red Hat Enterprise Linux Server
           Red Hat Enterprise Linux for SAP Applications for x86_64
           Red Hat Enterprise Linux for x86_64 - Extended Update Support
           RHEL for SAP - Extended Update Support
           Red Hat Developer Toolset (for RHEL Server)
           Red Hat Software Collections Beta (for RHEL Server for ARM)
           Red Hat JBoss Core Services from RHUI
           Red Hat Developer Tools Beta (for RHEL Server for ARM)
           Red Hat OpenShift Enterprise JBoss FUSE add-on
           Red Hat Build of Quarkus
           Red Hat OpenShift Enterprise JBoss EAP add-on Beta
SKU:      RH00798
合同:     
池子 Id:  ffffffffffffffffffffffffffffffff
提供管理: 否
可用:     16
推荐的:   1
服务等级: Self-Support
服务类型: 
订阅类型: Standard
结束:     20221022日
系统类型: 物理的

[root@localhost ~]#

然后手工 attach pool id :

subscription-manager attach --pool=ffffffffffffffffffffffffffffffff

Last update: 2021-10-22 07:45:40 UTC