RHEL - 订阅、注册系统和 Yum Repository(新版界面)

《OpenShift / RHEL / DevSecOps 汇总目录》

演示环境说明

本文需要有 redhat.com 账号以及包含 RHEL 的有效订阅。
演示环境使用了通过 minimal 方式安装的 RHEL 7.6 环境,RHEL 可以访问互联网。
红帽网站 access.redhat.com 针对新用户提供了新版界面,对于较早的客户提供的还是老版界面(界面差异见以下 “查看当前用户的有效订阅” 小节的截图,另外还可参见新老版本对应关系)。

红帽订阅及其相关概念

产品订阅(Subscription)

产品订阅是一种使用 RedHat 软件并获得支持服务的购买模式。

权利(Entitlement)

权利是用户可用合法安装使用软件的数量。

注册和注销 RHEL 系统

  1. 在 RHEL 中执行以下命令查看当前 RHEL 版本和订阅情况。
$ subscription-manager list
+-------------------------------------------+Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.6
Arch:           x86_64
Status:         Unknown
Status Details:
Starts:
Ends:
  1. 查看本地 Yum Repo,确认当前本地没有可用的 Repo,另外配置文件中也无有效内容。
$ yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
repolist: 0$ ll /etc/yum.repos.d/redhat.repo
-rw-r--r--. 1 root root 358 Sep 24 22:51 /etc/yum.repos.d/redhat.repo
  1. 执行以下命令,可将该 RHEL 系统注册到红帽官方。
$ subscription-manager register --username xxx --password yyy
Registering to: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: bc39c292-79d8-4482-ad5d-098506ff9bbe
The registered system name is: rhel-repo

也可在 RHEL 桌面的设置中注册当前系统。
在这里插入图片描述

  1. 可执行以下命令查看当前的系统也没有关联有效订阅。
$ subscription-manager list --consumed
No consumed subscription pools were found.
  1. 再次执行命令,确认 Status 已经从“Unknown” 变为 “Not Subscribed”,这说明系统还没有和订阅关联起来。
$ subscription-manager list
+-------------------------------------------+Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.6
Arch:           x86_64
Status:         Not Subscribed
Status Details:
Starts:
Ends:
  1. 执行命令,确认本地已有 Yum Repo 和可用的 Repo 配置了。注意:缺省 “$releasever” 是 “7Server”。
$ subscription-manager repos --list-enabled
+----------------------------------------------------------+Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled:   1$ ll /etc/yum.repos.d/redhat.repo
-rw-r--r--. 1 root root 336442 Sep 24 22:53 /etc/yum.repos.d/redhat.repo$ yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
rhel-7-server-rpms                                                                        | 3.5 kB  00:00:00
(1/3): rhel-7-server-rpms/7Server/x86_64/group                                            | 631 kB  00:00:08
(2/3): rhel-7-server-rpms/7Server/x86_64/updateinfo                                       | 4.3 MB  00:00:11
(3/3): rhel-7-server-rpms/7Server/x86_64/primary_db                                       |  96 MB  00:00:44
repo id                                           repo name                                                status
rhel-7-server-rpms/7Server/x86_64                 Red Hat Enterprise Linux 7 Server (RPMs)                 33,930
repolist: 33,930
  1. 执行命令可以注销当前的系统。
$ subscription-manager unregister

查看当前用户的有效订阅

  1. 登录 https://access.redhat.com/management,查看当前用户有的红帽订阅。
    在这里插入图片描述
  2. 在 “订阅” 中查看有效订阅。
    在这里插入图片描述
  3. 查看有效订阅详细情况。
    在这里插入图片描述
  4. 可通过命令查看当前用户的有效订阅。
$ subscription-manager list --available
+-------------------------------------------+Available Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Developer Subscription for Individuals
Provides:            Red Hat BetaRed Hat Enterprise Linux EUS Compute NodeRed Hat Enterprise Linux Fast DatapathRed Hat Enterprise Linux for x86_64Red Hat Build of QuarkusRed Hat Developer Tools (for RHEL Server for ARM)Red Hat OpenShift Enterprise JBoss EAP add-on BetaRed Hat Ansible Automation PlatformRed Hat CodeReady Linux Builder for x86_64Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node)Oracle Java (for RHEL Server)Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended UpdateSupportRed Hat CodeReady Linux Builder for x86_64 - Extended Update SupportRed Hat JBoss AMQ ClientsRed Hat Enterprise Linux ServerdotNET on RHEL (for RHEL Server)Red Hat 3scale API Management PlatformRed Hat JBoss Data GridRed Hat Software Collections (for RHEL Server for ARM)Red Hat CodeReady Linux Builder for ARM 64Red Hat Openshift Application RuntimesRed Hat Enterprise Linux Fast Datapath (for RHEL for ARM 64)Red Hat Enterprise Linux High Availability for x86_64Red Hat Enterprise Linux Atomic Host BetaRed Hat Container ImagesRed Hat OpenShift Container Platform for ARM 64Red Hat OpenShift Container PlatformRed Hat Developer Tools Beta (for RHEL Server for ARM)Red Hat Enterprise Linux Resilient Storage for IBM z Systems - Extended Update SupportRed Hat JBoss Core Services from RHUIRed Hat Enterprise Linux Load Balancer (for RHEL Server)Red Hat JBoss MiddlewareOpenJDK Java (for Middleware)Red Hat Enterprise Linux for SAP Solutions for x86_64 - Extended Update SupportRed Hat Enterprise Linux for SAP Applications for x86_64 - Update Services for SAP SolutionsRed Hat Enterprise Linux Atomic HostRed Hat Enterprise Linux High Availability (for IBM z Systems) - Extended Update SupportRed Hat Enterprise Linux High Availability for x86_64 - Extended Update SupportRed Hat Developer Toolset (for RHEL Server)Red Hat CodeReady Workspaces for OpenShiftRed Hat Enterprise Linux for SAP Solutions for x86_64Red Hat AMQ InterconnectRed Hat Enterprise Linux High Performance Networking (for RHEL Server)dotNET on RHEL Beta (for RHEL Server)Red Hat Developer Suite v.3Red Hat Enterprise Linux for SAP Applications for Power LE - Update Services for SAPSolutionsJBoss Enterprise Web Server from RHUIRed Hat Software Collections (for RHEL Server)Red Hat Openshift Application Runtimes for IBM Power LERed Hat Ansible EngineMRG RealtimeRed Hat Enterprise Linux for x86_64 - Update Services for SAP SolutionsRed Hat Container Images BetaRed Hat Developer Tools (for RHEL Server)JBoss Enterprise Application Platform from RHUIRed Hat Developer Tools Beta (for RHEL Server)Red Hat Software Collections Beta (for RHEL Server for ARM)Oracle Java (for RHEL Server) - Extended Update SupportRed Hat Enterprise Linux for SAP Solutions for x86_64 - Update Services for SAP SolutionsRed Hat S-JIS Support (for RHEL Server) - Extended Update SupportRed Hat Software Collections Beta (for RHEL Server)Red Hat CodeReady Linux Builder for IBM z Systems - Extended Update SupportRed Hat Enterprise Linux for IBM z Systems - Extended Update SupportRed Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update SupportRed Hat Enterprise Linux for ARM 64Red Hat Enterprise Linux Fast Datapath Beta for x86_64Red Hat OpenShift Enterprise JBoss EAP add-onRed Hat EUCJP Support (for RHEL Server) - Extended Update SupportJBoss Enterprise Web PlatformRed Hat Enterprise Linux for SAP Applications for x86_64 - Extended Update SupportRed Hat OpenShift Enterprise JBoss A-MQ add-onRed Hat OpenShift Application Runtimes BetaRed Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update SupportRed Hat Enterprise Linux for Real TimeRed Hat Migration ToolkitRed Hat Enterprise Linux Scalable File System (for RHEL Server)Red Hat Enterprise Linux High Availability for x86_64 - Update Services for SAP SolutionsRed Hat OpenShift Enterprise JBoss FUSE add-onJBoss Enterprise Application PlatformRed Hat Enterprise Linux for SAP Applications for x86_64Red Hat JBoss Core ServicesRed Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update SupportRed Hat Enterprise Linux Resilient Storage for x86_64Red Hat Container Development KitRed Hat Enterprise Linux for x86_64 - Extended Update Support
SKU:                 RH00798
Contract:
Pool ID:             2c945dc486db651601870cc2a4351897
Provides Management: No
Available:           16
Suggested:           1
Service Level:       Self-Support
Service Type:
Subscription Type:   Standard
Starts:              03/23/2023
Ends:                03/21/2024
System Type:         PhysicalSubscription Name:   Red Hat Beta Access
Provides:            Red Hat Satellite Capsule BetaRed Hat Enterprise Linux for SAP Applications for IBM z Systems BetaRed Hat Enterprise Linux for SAP Applications for Power, little endian BetaRed Hat Enterprise Linux Fast Datapath Beta for Power, little endianRed Hat Enterprise Linux Resilient Storage BetaRed Hat Enterprise Linux for SAP Applications for x86_64 BetaRed Hat CodeReady Linux Builder for IBM z Systems BetaRed Hat Enterprise Linux for SAP HANA for x86_64 BetaRed Hat Enterprise Linux Advanced Virtualization Beta (for RHEL Server for IBM System Z)Red Hat CodeReady Linux Builder for x86_64 BetaRed Hat Enterprise Linux for SAP HANA for Power, little endian BetaRed Hat Directory Server BetaRed Hat Enterprise Linux for Power, little endian BetaRed Hat Certificate System BetaRed Hat Enterprise Linux for Real Time for NFV BetaRed Hat Enterprise Linux for Real Time BetaRed Hat Satellite BetaRed Hat Enterprise Linux Fast Datapath Beta for x86_64Red Hat Enterprise Linux for x86_64 BetaRed Hat Enterprise Linux for IBM z Systems BetaRed Hat Enterprise Linux for ARM 64 BetaRed Hat CodeReady Linux Builder for ARM 64 BetaRed Hat CodeReady Linux Builder for Power, little endian BetaRed Hat Enterprise Linux High Availability Beta
SKU:                 RH00069
Contract:
Pool ID:             2c94d89286ea780d01870cc2f95b0021
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Level:       Self-Support
Service Type:        L1-L3
Subscription Type:   Standard
Starts:              03/23/2023
Ends:                03/21/2024
System Type:         Physical

将 RHEL 系统关联和取关订阅

  1. 执行命令确认当前 RHEL 系统没有和订阅关联。
$ subscription-manager list --consumed
No consumed subscription pools were found.
  1. 执行命令,将当前系统和指定 pool 的订阅关联。
$ subscription-manager attach --pool=2c945dc486db651601870cc2a4351897
Successfully attached a subscription for: Red Hat Developer Subscription for Individuals
  1. 查看已被使用的订阅。
$ subscription-manager list --consumed
+-------------------------------------------+Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Developer Subscription for Individuals
Provides:            Red Hat Enterprise Linux High Availability for x86_64 - Update Services for SAP SolutionsRed Hat Enterprise Linux Atomic HostRed Hat CodeReady Linux Builder for IBM z Systems - Extended Update SupportJBoss Enterprise Application Platform from RHUIRed Hat Enterprise Linux Atomic Host BetaJBoss Enterprise Web Server from RHUIRed Hat Developer Tools (for RHEL Server)Red Hat Container ImagesRed Hat Developer Tools Beta (for RHEL Server)Red Hat Container Images BetaRed Hat 3scale API Management PlatformRed Hat OpenShift Enterprise JBoss EAP add-onRed Hat Software Collections (for RHEL Server for ARM)Red Hat Software Collections Beta (for RHEL Server for ARM)Red Hat OpenShift Enterprise JBoss FUSE add-onRed Hat Migration ToolkitRed Hat OpenShift Enterprise JBoss A-MQ add-onRed Hat JBoss Core Services from RHUIRed Hat Enterprise Linux for x86_64Red Hat Enterprise Linux Resilient Storage for x86_64Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update SupportdotNET on RHEL (for RHEL Server)Red Hat Enterprise Linux Scalable File System (for RHEL Server)dotNET on RHEL Beta (for RHEL Server)Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update SupportRed Hat Ansible Automation PlatformRed Hat OpenShift Container Platform for ARM 64Oracle Java (for RHEL Server)Red Hat Enterprise Linux for SAP Solutions for x86_64OpenJDK Java (for Middleware)Red Hat Enterprise Linux for Real TimeRed Hat AMQ InterconnectRed Hat Software Collections (for RHEL Server)Red Hat Enterprise Linux for SAP Applications for x86_64 - Extended Update SupportRed Hat Openshift Application Runtimes for IBM Power LEOracle Java (for RHEL Server) - Extended Update SupportRed Hat Developer Tools (for RHEL Server for ARM)Red Hat Developer Tools Beta (for RHEL Server for ARM)Red Hat Enterprise Linux for SAP Solutions for x86_64 - Extended Update SupportRed Hat S-JIS Support (for RHEL Server) - Extended Update SupportRed Hat Software Collections Beta (for RHEL Server)Red Hat Enterprise Linux Fast Datapath Beta for x86_64Red Hat Enterprise Linux Fast DatapathRed Hat Ansible EngineRed Hat Enterprise Linux ServerRed Hat OpenShift Container PlatformRed Hat Container Development KitMRG RealtimeRed Hat CodeReady Linux Builder for x86_64Red Hat CodeReady Linux Builder for ARM 64Red Hat Developer Toolset (for RHEL Server)Red Hat Enterprise Linux High Performance Networking (for RHEL Server)Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended UpdateSupportRed Hat Enterprise Linux High Performance Networking (for RHEL Compute Node)Red Hat Build of QuarkusRed Hat OpenShift Application Runtimes BetaRed Hat Enterprise Linux EUS Compute NodeRed Hat Enterprise Linux for x86_64 - Extended Update SupportRed Hat Enterprise Linux Fast Datapath (for RHEL for ARM 64)Red Hat Openshift Application RuntimesRed Hat Enterprise Linux for IBM z Systems - Extended Update SupportRed Hat Enterprise Linux for ARM 64Red Hat BetaRed Hat EUCJP Support (for RHEL Server) - Extended Update SupportJBoss Enterprise Application PlatformJBoss Enterprise Web PlatformRed Hat Developer Suite v.3Red Hat Enterprise Linux for SAP Applications for Power LE - Update Services for SAPSolutionsRed Hat Enterprise Linux High Availability (for IBM z Systems) - Extended Update SupportRed Hat Enterprise Linux for x86_64 - Update Services for SAP SolutionsRed Hat Enterprise Linux for SAP Applications for x86_64 - Update Services for SAP SolutionsRed Hat Enterprise Linux for SAP Applications for x86_64Red Hat Enterprise Linux Resilient Storage for IBM z Systems - Extended Update SupportRed Hat JBoss AMQ ClientsRed Hat Enterprise Linux for SAP Solutions for x86_64 - Update Services for SAP SolutionsRed Hat OpenShift Enterprise JBoss EAP add-on BetaRed Hat CodeReady Linux Builder for x86_64 - Extended Update SupportRed Hat JBoss MiddlewareRed Hat CodeReady Workspaces for OpenShiftRed Hat JBoss Data GridRed Hat JBoss Core ServicesRed Hat Enterprise Linux High Availability for x86_64Red Hat Enterprise Linux High Availability for x86_64 - Extended Update SupportRed Hat Enterprise Linux Load Balancer (for RHEL Server)Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
SKU:                 RH00798
Contract:
Account:             6317226
Serial:              5165834853842457511
Pool ID:             2c945dc486db651601870cc2a4351897
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Self-Support
Service Type:
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              03/23/2023
Ends:                03/21/2024
System Type:         Physical
  1. 执行命令可以将当前的 RHEL 系统取关订阅。
$ subscription-manager remove --serial=5165834853842457511
1 local certificate has been deleted.
The entitlement server successfully removed these serial numbers:5165834853842457511

操作 Yum Repository

使用指定版本的 Repo

使用缺省的 Repo 版本

  1. 执行命令,确认当前没有指定特定版本。说明:如果没有指定版本,缺省 “$releasever” 是 “7Server”。
$ subscription-manager release --show
Release not set
$ subscription-manager repos --list-enabled
+----------------------------------------------------------+Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled:   1
  1. 执行命令,根据提示确认当前的系统将升级到 RHEL 7.9(注意:正式升级前退出命令。说明:3.10.0-1160 是 RHEL 7.9 的版本号)。
$ yum update
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                        | 3.5 kB  00:00:00
(1/3): rhel-7-server-rpms/7Server/x86_64/group                                            | 631 kB  00:00:03
(2/3): rhel-7-server-rpms/7Server/x86_64/updateinfo                                       | 4.3 MB  00:00:08
(3/3): rhel-7-server-rpms/7Server/x86_64/primary_db                                       |  96 MB  00:00:49
Resolving Dependencies
--> Running transaction check
...
...
Dependencies Resolved=================================================================================================================Package                                   Arch      Version                         Repository             Size
=================================================================================================================
Installing:iwl7260-firmware                          noarch    25.30.13.0-80.el7_9             rhel-7-server-rpms    6.1 Mreplacing  iwl7265-firmware.noarch 22.0.7.0-69.el7kernel                                    x86_64    3.10.0-1160.99.1.el7            rhel-7-server-rpms     52 M
Updating:GeoIP                                     x86_64    1.5.0-14.el7                    rhel-7-server-rpms    1.5 MNetworkManager                            x86_64    1:1.18.8-2.el7_9                rhel-7-server-rpms    1.9 M
...
...
Transaction Summary
=================================================================================================================
Install    2 Packages (+12 Dependent packages)
Upgrade  214 PackagesTotal download size: 303 M
Is this ok [y/d/N]: N

方法1:用固定配置指定使用的 Repo 版本

  1. 执行命令,查看当前 RHEL 有哪些发行版。注意1:“7Server” 将等同于最后一个小版本。
$ subscription-manager release --list
+-------------------------------------------+Available Releases
+-------------------------------------------+
7.0
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8
7.9
7Server

注意2:如果不执行前面的 subscription-manager attach 命令关联有效订阅,此步将没有返回结果。

  1. 执行命令,使用特定发行版。当前本地 Repo 的配置已经使用 7.7 版本了。
$ subscription-manager release --set=7.7
Release set to: 7.7$ subscription-manager release --show
Release: 7.7$ subscription-manager repos --list-enabled
+----------------------------------------------------------+Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel/server/7/7.7/$basearch/os
Enabled:   1
  1. 为了使用新版本的 Repo,需要先清除本地已有 Repo 资源,执行完后确认 “enabled repos” 为 “0”。说明:如果命令没有指定删除的版本,将使用缺省的 7Server 版本。
$ yum clean all -v
Not loading "rhnplugin" plugin, as it is disabled
Loading "product-id" plugin
Loading "search-disabled-repos" plugin
Loading "subscription-manager" plugin
Updating Subscription Management repositories.
Config time: 5.335
Yum version: 3.4.3
Cleaning repos: rhel-7-server-rpms
Operating on /var/cache/yum/x86_64/7Server (see CLEAN OPTIONS in yum(8) for details)
Disk usage of /var/cache/yum/*/* after cleanup:
0      enabled repos
0      disabled repos
0      untracked repos
36     other data:36     /var/cache/yum/x86_64/7Server/timedhosts
36     total
  1. 再执行升级,确认此次操作会将系统升级到 Kernel 为 3.10.0-1062 的 RHEL 7.7 版本。
$ yum update
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                        | 3.5 kB  00:00:00
(1/3): rhel-7-server-rpms/x86_64/group                                                    | 767 kB  00:00:07
(2/3): rhel-7-server-rpms/x86_64/updateinfo                                               | 3.6 MB  00:00:13
(3/3): rhel-7-server-rpms/x86_64/primary_db                                               |  68 MB  00:12:49
Resolving Dependencies
...
...
Dependencies Resolved=================================================================================================================Package                                   Arch      Version                         Repository             Size
=================================================================================================================
Installing:kernel                                    x86_64    3.10.0-1062.18.1.el7            rhel-7-server-rpms     50 M
Updating:GeoIP                                     x86_64    1.5.0-14.el7                    rhel-7-server-rpms    1.5 MNetworkManager                            x86_64    1:1.18.0-5.el7_7.2              rhel-7-server-rpms    1.9 M
...
...
Transaction Summary
=================================================================================================================
Install    1 Package  (+4 Dependent packages)
Upgrade  176 PackagesTotal download size: 277 M
Is this ok [y/d/N]: N

方法2:用临时配置指定使用的 Repo 版本

  1. 取消版本设置。
$ subscription-manager release --unset
Release preference has been unset$ subscription-manager release --show
Release not set
  1. 清除本地已有 Repo 资源。说明:如果没有指定特定次要版本,将使用指定主版本的最新次版本,即 7Server。
$ yum clean all -v
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Cleaning repos: rhel-7-server-rpms
  1. 清除本地已有指定版本的 Repo 资源。
$ yum clean all --releasever=7.7 --verbose
Not loading "rhnplugin" plugin, as it is disabled
Loading "product-id" plugin
Loading "search-disabled-repos" plugin
Loading "subscription-manager" plugin
Updating Subscription Management repositories.
Config time: 6.953
Yum version: 3.4.3
Cleaning repos: rhel-7-server-rpms
Operating on /var/cache/yum/x86_64/7.7 (see CLEAN OPTIONS in yum(8) for details)
Disk usage of /var/cache/yum/*/* after cleanup:
0      enabled repos
0      disabled repos
0      untracked repos
...
  1. 执行升级命令,并在其中指定使用的版本。说明:Kernel 为 3.10.0-957 是 RHEL 7.6 版本。
$ yum update --releasever=7.6
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                        | 3.4 kB  00:00:00
(1/3): rhel-7-server-rpms/7.6/x86_64/group                                                | 773 kB  00:00:04
(2/3): rhel-7-server-rpms/7.6/x86_64/updateinfo                                           | 3.2 MB  00:00:10
(3/3): rhel-7-server-rpms/7.6/x86_64/primary_db                                           |  58 MB  00:02:59
Resolving Dependencies
--> Running transaction check
...
...Dependencies Resolved=================================================================================================================Package                                    Arch       Version                      Repository              Size
=================================================================================================================
Installing:kernel                                     x86_64     3.10.0-957.27.2.el7          rhel-7-server-rpms      48 M
Updating:NetworkManager                             x86_64     1:1.12.0-10.el7_6            rhel-7-server-rpms     1.7 M
...
...Transaction Summary
=================================================================================================================
Install   1 Package
Upgrade  76 PackagesTotal download size: 136 M
Is this ok [y/d/N]: N

启用和关闭 Repo

  1. 以下命令可以列出当前订阅包含的所有 Repo。
$ subscription-manager repos --list
  1. 以下命令只列出当前使用的 Repo。
$ subscription-manager repos --list-enabled
+----------------------------------------------------------+Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled:   1
  1. 执行命令启动和关闭指定 Repo。
$ subscription-manager repos --enable=rhel-ha-for-rhel-7-server-rpms
$ subscription-manager repos --diseble=rhel-ha-for-rhel-7-server-rpms

参考

https://access.redhat.com/labs/registrationassistant/
https://access.redhat.com/solutions/29269
https://access.redhat.com/solutions/238533
https://access.redhat.com/articles/433903
https://access.redhat.com/solutions/23016
https://access.redhat.com/solutions/7019225
https://access.redhat.com/solutions/3176811
https://access.redhat.com/solutions/45956
https://www.redhat.com/en/blog/red-hat-subscription-management-simple-content-access-explained
https://access.redhat.com/articles/simple-content-access
https://access.redhat.com/sites/default/files/attachments/subscriptionandentitlementaccounting-v1.1.pdf

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/343797.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

vue3+vite插件开发

插件开发目的:由于我司使用的前端技术栈为vue3tsvite2.Xaxios,在前端代码框架设计初期,做了把axios挂载到proxy对象上的操作,具体可见我的另一篇文章vue3TS自动化封装全局api_ts 封装腾讯位置api-CSDN博客 现在可以实现vue2的类似this.$api.xxx去调用接口,但是vue2源码使用的是…

【CS.AI】GPT-4o:重新定义人工智能的新标杆

文章目录 1 序言2 GPT-4o的技术亮点3 GPT-4o与前代版本的对比3.1 热门AI模型对比表格GPT-3.5GPT-4GPT-4oBERTT5 3.2 其他 4 个人体验与感受5 结论 1 序言 嘿,大家好!今天要聊聊一个超级酷的AI新突破——GPT-4o!最近,OpenAI发布了…

MTK联发科MT6897(天玑8300)5G智能移动处理器规格参数

天玑 8300 采用台积电第二代 4nm 制程,基于 Armv9 CPU 架构,八核 CPU 包含 4 个 Cortex-A715 性能核心和 4 个 Cortex-A510 能效核心,CPU 峰值性能较上一代提升 20%,功耗节省 30%。 此外,天玑 8300 搭载 6 核 GPU Mal…

kafka-重试和死信主题(SpringBoot整合Kafka)

文章目录 1、重试和死信主题2、死信队列3、代码演示3.1、appication.yml3.2、引入spring-kafka依赖3.3、创建SpringBoot启动类3.4、创建生产者发送消息3.5、创建消费者消费消息 1、重试和死信主题 kafka默认支持重试和死信主题 重试主题:当消费者消费消息异常时&…

android中调用onnxruntime框架

创建空白项目 安装Android Studio及创建空白项目参考:【安卓Java原生开发学习记录】一、安卓开发环境的搭建与HelloWorld(详细图文解释)_安卓原生开发-CSDN博客 切记:build configuration language 一定选择Groovy!官…

Java——IO流(一)-(1/8):File、IO流概述、File文件对象的创建(介绍、实例演示)

目录 File IO流概述 File文件对象的创建 介绍 实例演示 File 存储数据的方案 变量 double money 9999.5 数组 int[] age new int[100];对象 Student s new Student()集合 List<Student> students new ArrayList<>()…

Chrome 源码阅读:跟踪一个鼠标事件的流程

我们通过在关键节点打断点的方式&#xff0c;去分析一个鼠标事件的流程。 我们知道chromium是多进程模型&#xff0c;那么&#xff0c;我们可以推测&#xff1a;一个鼠标消息先从主进程产生&#xff0c;再通过跨进程通信发送给渲染进程&#xff0c;渲染进程再发送给WebFrame&a…

L45---506.相对名次(java)--排序

1.题目描述 2.知识点 &#xff08;1&#xff09;String.join(" ", words) 是 Java 中的一个语法&#xff0c;用于将数组或集合中的元素连接成一个单独的字符串&#xff0c;连接时使用指定的分隔符。这里的 " " 是作为分隔符使用的一个空格字符串。 Strin…

4、后端本地环境搭建

后端本地环境搭建 4.1 安装jdk 下载完成后双击安装的 jdk &#xff0c;点下一步&#xff0c;选择安装目录&#xff0c;一直点下一步&#xff0c;直到结束。 安装完成后同样需要配置环境变量 window s 搜索查看高级系统设置—— 高级 —— 环境变量 —— 系统变量 1、新建一…

API接口测试工具:jmeter的安装、汉化、Jmeter桌面快捷图标和基本使用

文章目录 测试工具&#xff1a;JmeterJmeter安装和配置Jmeter汉化设置中文语言&#xff1a;永久方式设置中文语言&#xff1a;临时方式 设置Jmeter桌面快捷图标jmeter基本用法Jmeter无法保存测试问题解决 测试工具&#xff1a;Jmeter Jmeter依赖于JDK&#xff0c;所以必须确保…

第十一届蓝桥杯C++青少年组中/高级组国赛2020年10月真题解析

一、单选题 第1题 在数组中&#xff0c;数组名表示&#xff08; &#xff09;. A:数组第1个元素的首地址 B:数组第2个元素的首地址 C:数组所有元素的首地址&#xff0c; D:数组最后1个元素的首地址 答案&#xff1a;A 数组名是一个地址&#xff0c;指向第一个元素 第2题 …

中继器、集线器、网桥、交换机、路由器和网关

目录 前言一、中继器、集线器1.1 中继器1.2 集线器 二、网桥、交换机2.1 网桥2.1.1 认识网桥2.1.2 网桥的工作原理2.1.3 生成树网桥 2.2 交换机2.2.1 交换机的特征2.2.2 交换机的交换模式2.2.3 交换机的功能 三、路由器、网关3.1 路由器的介绍3.2 路由器的工作过程3.2.1 前置知…

多客圈子论坛系统 httpGet 任意文件读取漏洞复现

0x01 产品简介 多客圈子论坛系统是一种面向特定人群或特定话题的社交网络&#xff0c;它提供了用户之间交流、分享、讨论的平台。在这个系统中&#xff0c;用户可以创建、加入不同的圈子&#xff0c;圈子可以是基于兴趣、地域、职业等不同主题的。用户可以在圈子中发帖、评论、…

17- Redis 中的 quicklist 数据结构

在 Redis 3.0 之前&#xff0c;List 对象的底层数据结构是双向链表或者压缩列表&#xff0c;然后在 Redis 3.2 的时候&#xff0c;List 对象的底层改由 quicklist 数据结构实现。 其实 quicklist 就是【双向链表 压缩列表】组合&#xff0c;因为一个 quicklist 就是一个链表&…

【产品研发】NPDP价值作用概述

导读&#xff1a;本文结合个人实践和思考对NPDP的价值和作用做了概述说明&#xff0c;对于产品经理而言掌握NPDP的知识体系并且应用到实际工作中&#xff0c;这是非常有必要的。走出以往狭隘的产品研发工作认知&#xff0c;以开放心态学习国际化产品创新开发流程将极大提升产品…

深度学习的舌象诊断:从舌头上了解系统性疾病!

首先 深度学习算法能否解决东方医学中依靠医生经验的诊断问题&#xff1f;而要实现这个目标&#xff0c;需要什么呢&#xff1f; 用舌头诊断被称为口腔健康的指标&#xff0c;但在东方医学中&#xff0c;舌头也被用来评估全身的状况。换句话说&#xff0c;通过分析舌头的图像…

Java学习-JDBC(一)

JDBC 概念 JDBC(Java Database Connectivity)Java数据库连接JDBC提供了一组独立于任何数据库管理系统的APIJava提供接口规范&#xff0c;由各个数据库厂商提供接口的实现&#xff0c;厂商提供的实现类封装成jar文件&#xff0c;也就是我们俗称的数据库驱动jar包JDBC充分体现了…

C#上位机开发

目录 一、上位机简介二、C#语法三、新建VS工程四、WinForm控件4.1 属性4.2 事件4.3 窗体方法4.4 常用控件4.5 布局 五、Serial上位机5.1 UI界面设计5.2 功能设计 六、项目打包成安装包6.1 前提准备6.2 打包步骤 一、上位机简介 在单片机项目开发中&#xff0c;上位机也是一个很…

SwiftUI六组合复杂用户界面

代码下载 应用的首页是一个纵向滚动的地标类别列表&#xff0c;每一个类别内部是一个横向滑动列表。随后将构建应用的页面导航&#xff0c;这个过程中可以学习到如果组合各种视图&#xff0c;并让它们适配不同的设备尺寸和设备方向。 下载起步项目并跟着本篇教程一步步实践&a…

【C语言训练题库】扫雷->简单小游戏!

&#x1f525;博客主页&#x1f525;&#xff1a;【 坊钰_CSDN博客 】 欢迎各位点赞&#x1f44d;评论✍收藏⭐ 目录 1. 题目 2. 解析 3. 代码 4. 小结 1. 题目 小sun上课的时候非常喜欢玩扫雷。他现小sun有一个初始的雷矩阵&#xff0c;他希望你帮他生成一个扫雷矩阵。 扫雷…