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.mzph.cn/pingmian/24466.shtml

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

相关文章

建构信任基石:揭秘Web3的去中心化信任体系

在传统的互联网时代,信任往往建立在中心化的机构和第三方平台之上,而这种中心化的信任体系往往面临着数据泄露、信息滥用等问题。然而,随着区块链技术的发展,Web3时代正在向我们展示一种全新的信任体系,即去中心化的信…

离散数学---树

目录 1.基本概念及其相关运用 2.生成树 3.有向树 4.最优树 5.前缀码 1.基本概念及其相关运用 (1)无向树:连通而且没有回路的无向图就是无向树; 森林就是有多个连通分支,每个连通分支都是树的无连通的无向图&…

给Mac添加右键菜单「使用 VSCode 打开」的方法

用 macOS 系统的苹果电脑用户都知道,macOS 某些地方确实没 Windows 方便,比如右键菜单,没有复制粘贴之类的菜单,刚开始还有点使用不方便,今天我介绍两种方法来实现一个用右键通过 VSCode 打开文件和文件夹的方法&#…

day40--Redis(二)实战篇

实战篇Redis 开篇导读 亲爱的小伙伴们大家好,马上咱们就开始实战篇的内容了,相信通过本章的学习,小伙伴们就能理解各种redis的使用啦,接下来咱们来一起看看实战篇我们要学习一些什么样的内容 短信登录 这一块我们会使用redis共…

php探针代码怎么写

创建php文件并输入代码,访问文件查看php版本、环境和系统配置信息,可使用ini_set()函数定制输出,但注意在生产环境中使用时要注重安全,因为它会泄露敏感信息。 PHP探针代码撰写指南 PHP探针代码是一种脚本,可提供关于…

Qt/C++音视频开发76-获取本地有哪些摄像头名称/ffmpeg内置函数方式

一、前言 上一篇文章是写的用Qt的内置函数方式获取本地摄像头名称集合,但是有几个缺点,比如要求Qt5,或者至少要求安装了多媒体组件multimedia,如果没有安装呢,或者安装的是个空的呢,比如很多嵌入式板子&am…

C语言小例程10/100

题目&#xff1a;要求输出国际象棋棋盘。 程序分析&#xff1a;国际象棋棋盘由64个黑白相间的格子组成&#xff0c;分为8行*8列。用i控制行&#xff0c;j来控制列&#xff0c;根据ij的和的变化来控制输出黑方格&#xff0c;还是白方格。 #include<stdio.h>int main() {…

SAP 服务提供者 (Services Provider)接口测试笔记

文章目录 SAP 服务提供者 &#xff08;Services Provider&#xff09;接口测试笔记设置Content-Type授权SAP接口测试-SoapUI参数配置 SAP 服务提供者 &#xff08;Services Provider&#xff09;接口测试笔记 现在我在SAP里面公布了一些查询接口&#xff0c;现在就是要用SoapU…

【AIGC+CAD】革新建筑、室内设计与建模领域的GenAI产品

一、产品定位 Augrade,一款专为建筑、室内设计和建模行业打造的AI CAD自动化工具。它凭借先进的AI技术,将2D蓝图迅速转化为精确的3D CAD模型,同时提供设计、成本分析的自动化以及全面的文档生成服务。Augrade致力于简化设计流程,确保技术可行性,并促进跨团队、跨工具的协…

Java Web学习笔记19——Ajax介绍

Ajax: 概念&#xff1a;Asynchronous JavaScript And XML 异步的JavaScript和XML。 作用&#xff1a; 1&#xff09;数据交换&#xff1a;通过Ajax可以给服务器发送请求&#xff0c;并获得服务器的响应数据。 2&#xff09;异步交互&#xff1a;可以在不重新加载页面的情况…

Hadoop+Spark大数据技术 实验11 Spark 图

17周期末考试 重点从第五章 scala语言开始 比如&#xff1a;映射&#xff08;匿名函数&#xff09; 11.3.1创建属性图 import org.apache.spark.graphx._ import org.apache.spark.rdd.RDD //创建一个顶点集的RDD val users: RDD[(VertexId ,(String,String))] sc.paralle…

基于思通数科大模型的设备隐患智能检测:图像处理与声音分析的融合应用

在现代工业生产中&#xff0c;设备的稳定运行对保障生产效率和产品质量至关重要。然而&#xff0c;设备的老化、磨损以及异常状态的检测往往需要大量的人力和物力。思通数科大模型结合图像处理技术和声音分析技术&#xff0c;为设备隐患检测提供了一种自动化、高效的解决方案。…

Docker 管理 | 代理配置、内网共享和 Harbor 部署

唠唠闲话 在现代软件开发和运维中&#xff0c;容器技术已经成为构建、部署和管理应用程序的标准工具。然而&#xff0c;在实际操作中&#xff0c;我们常常需要面对一些常见的挑战&#xff0c;如容器访问外部资源的代理配置、内网环境下的镜像共享以及企业级镜像管理。 本教程…

关键字、保留字、标识符

关键字 关键字是被 Java 赋予了特定含义的英文单词。 关键字的字母全部小写。 保留字 现有的 Java 版本尚未使用&#xff0c;但是以后版本可能会作为关键字使用。自己命名标识符时需要避免使用这些保留字。 保留字有&#xff1a;byValue, cast, future, generic, inner, op…

Spring Boot整合WebSocket和Redis实现直播间在线人数统计功能

&#x1f604; 19年之后由于某些原因断更了三年&#xff0c;23年重新扬帆起航&#xff0c;推出更多优质博文&#xff0c;希望大家多多支持&#xff5e; &#x1f337; 古之立大事者&#xff0c;不惟有超世之才&#xff0c;亦必有坚忍不拔之志 &#x1f390; 个人CSND主页——Mi…

高精度加法的实现

这是C算法基础-基础算法专栏的第七篇文章&#xff0c;专栏详情请见此处。 引入 在C语言中&#xff0c;int的可存储数据范围是-2147483648~2147483647&#xff0c;long long的可存储数据范围是-9223372036854775808~9223372036854775807&#xff0c;但是如果一些数据比long long…

Qt下调用Snap7库与西门子PLC通信

文章目录 前言一、Snap7源码下载二、Snap7的dll常用函数功能介绍三、Snap7Lib.pri模块的封装四、下载链接总结 前言 本文主要讲述了在Qt下调用Snap7库与西门子PLC进行通信&#xff0c;在这里将Snap7的源码与动态库整合在一起封装了一个自己的Snap7Lib.pri子模块&#xff0c;方…

【Python】读取文件夹中所有excel文件拼接成一个excel表格 的方法

我们平常会遇到下载了一些Excel文件放在一个文件夹下&#xff0c;而这些Excel文件的格式都一样&#xff0c;这时候需要批量这些文件合并成一个excel 文件里。 在Python中&#xff0c;我们可以使用pandas库来读取文件夹中的所有Excel文件&#xff0c;并将它们拼接成一个Excel表…

尝试使用blazor(一)吐槽blazor,未开始之前,先吐为敬

为什么要写一点关于blazor的文章呢?其实是没什么人看的&#xff0c;我知道blazor目前在国内使用的人数&#xff0c;恐怕一辆大巴车都坐不满。非常冷门&#xff0c;我刚用blazor遇到问题&#xff0c;花钱找人解决&#xff0c;找了国内几个著名的平台&#xff0c;几乎没人会blaz…

【docker】centos7配置docker镜像阿里云加速

国内从 DockerHub 拉取镜像有时会遇到困难&#xff0c;由于网络原因&#xff0c;下载一个Docker官方镜像可能会需要很长的时间&#xff0c;甚至下载失败。此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。 测试了几次阿里云的加速是最快的。 …