《OpenShift / RHEL / DevSecOps 汇总目录》
本文需要有 redhat.com 账号以及包含 RHEL 的有效订阅。
演示环境使用了通过 minimal 方式安装的 RHEL 7.6 环境,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:
$ 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
$ 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
$ subscription-manager list --consumed
No consumed subscription pools were found.
$ 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:
$ 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
$ subscription-manager unregister
$ subscription-manager list --available
+-------------------------------------------+
Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Developer Subscription for Individuals
Provides: Red Hat Beta
Red Hat Enterprise Linux EUS Compute Node
Red Hat Enterprise Linux Fast Datapath
Red Hat Enterprise Linux for x86_64
Red Hat Build of Quarkus
Red Hat Developer Tools (for RHEL Server for ARM)
Red Hat OpenShift Enterprise JBoss EAP add-on Beta
Red Hat Ansible Automation Platform
Red Hat CodeReady Linux Builder for x86_64
Red 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 Update
Support
Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
Red Hat JBoss AMQ Clients
Red Hat Enterprise Linux Server
dotNET on RHEL (for RHEL Server)
Red Hat 3scale API Management Platform
Red Hat JBoss Data Grid
Red Hat Software Collections (for RHEL Server for ARM)
Red Hat CodeReady Linux Builder for ARM 64
Red Hat Openshift Application Runtimes
Red Hat Enterprise Linux Fast Datapath (for RHEL for ARM 64)
Red Hat Enterprise Linux High Availability for x86_64
Red Hat Enterprise Linux Atomic Host Beta
Red Hat Container Images
Red Hat OpenShift Container Platform for ARM 64
Red Hat OpenShift Container Platform
Red Hat Developer Tools Beta (for RHEL Server for ARM)
Red Hat Enterprise Linux Resilient Storage for IBM z Systems - Extended Update Support
Red Hat JBoss Core Services from RHUI
Red Hat Enterprise Linux Load Balancer (for RHEL Server)
Red Hat JBoss Middleware
OpenJDK Java (for Middleware)
Red Hat Enterprise Linux for SAP Solutions for x86_64 - Extended Update Support
Red Hat Enterprise Linux for SAP Applications for x86_64 - Update Services for SAP Solutions
Red Hat Enterprise Linux Atomic Host
Red Hat Enterprise Linux High Availability (for IBM z Systems) - Extended Update Support
Red Hat Enterprise Linux High Availability for x86_64 - Extended Update Support
Red Hat Developer Toolset (for RHEL Server)
Red Hat CodeReady Workspaces for OpenShift
Red Hat Enterprise Linux for SAP Solutions for x86_64
Red Hat AMQ Interconnect
Red Hat Enterprise Linux High Performance Networking (for RHEL Server)
dotNET on RHEL Beta (for RHEL Server)
Red Hat Developer Suite v.3
Red Hat Enterprise Linux for SAP Applications for Power LE - Update Services for SAP
Solutions
JBoss Enterprise Web Server from RHUI
Red Hat Software Collections (for RHEL Server)
Red Hat Openshift Application Runtimes for IBM Power LE
Red Hat Ansible Engine
MRG Realtime
Red Hat Enterprise Linux for x86_64 - Update Services for SAP Solutions
Red Hat Container Images Beta
Red Hat Developer Tools (for RHEL Server)
JBoss Enterprise Application Platform from RHUI
Red Hat Developer Tools Beta (for RHEL Server)
Red Hat Software Collections Beta (for RHEL Server for ARM)
Oracle Java (for RHEL Server) - Extended Update Support
Red Hat Enterprise Linux for SAP Solutions for x86_64 - Update Services for SAP Solutions
Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
Red Hat Software Collections Beta (for RHEL Server)
Red Hat CodeReady Linux Builder for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux Fast Datapath Beta for x86_64
Red Hat OpenShift Enterprise JBoss EAP add-on
Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
JBoss Enterprise Web Platform
Red Hat Enterprise Linux for SAP Applications 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 Scalable File System (for RHEL Server) - Extended Update Support
Red Hat Enterprise Linux for Real Time
Red Hat Migration Toolkit
Red Hat Enterprise Linux Scalable File System (for RHEL Server)
Red Hat Enterprise Linux High Availability for x86_64 - Update Services for SAP Solutions
Red Hat OpenShift Enterprise JBoss FUSE add-on
JBoss Enterprise Application Platform
Red Hat Enterprise Linux for SAP Applications for x86_64
Red Hat JBoss Core Services
Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update Support
Red Hat Enterprise Linux Resilient Storage for x86_64
Red Hat Container Development Kit
Red 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: Physical
Subscription Name: Red Hat Beta Access
Provides: Red Hat Satellite Capsule Beta
Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
Red Hat Enterprise Linux Resilient Storage Beta
Red Hat Enterprise Linux for SAP Applications for x86_64 Beta
Red Hat CodeReady Linux Builder for IBM z Systems Beta
Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
Red Hat Enterprise Linux Advanced Virtualization Beta (for RHEL Server for IBM System Z)
Red Hat CodeReady Linux Builder for x86_64 Beta
Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
Red Hat Directory Server Beta
Red Hat Enterprise Linux for Power, little endian Beta
Red Hat Certificate System Beta
Red Hat Enterprise Linux for Real Time for NFV Beta
Red Hat Enterprise Linux for Real Time Beta
Red Hat Satellite Beta
Red Hat Enterprise Linux Fast Datapath Beta for x86_64
Red Hat Enterprise Linux for x86_64 Beta
Red Hat Enterprise Linux for IBM z Systems Beta
Red Hat Enterprise Linux for ARM 64 Beta
Red Hat CodeReady Linux Builder for ARM 64 Beta
Red Hat CodeReady Linux Builder for Power, little endian Beta
Red 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
$ subscription-manager list --consumed
No consumed subscription pools were found.
$ subscription-manager attach --pool=2c945dc486db651601870cc2a4351897
Successfully attached a subscription for: Red Hat Developer Subscription for Individuals
$ 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 Solutions
Red Hat Enterprise Linux Atomic Host
Red Hat CodeReady Linux Builder for IBM z Systems - Extended Update Support
JBoss Enterprise Application Platform from RHUI
Red Hat Enterprise Linux Atomic Host Beta
JBoss Enterprise Web Server from RHUI
Red Hat Developer Tools (for RHEL Server)
Red Hat Container Images
Red Hat Developer Tools Beta (for RHEL Server)
Red Hat Container Images Beta
Red Hat 3scale API Management Platform
Red Hat OpenShift Enterprise JBoss EAP add-on
Red 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-on
Red Hat Migration Toolkit
Red Hat OpenShift Enterprise JBoss A-MQ add-on
Red Hat JBoss Core Services from RHUI
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux Resilient Storage for x86_64
Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update Support
dotNET 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 Support
Red Hat Ansible Automation Platform
Red Hat OpenShift Container Platform for ARM 64
Oracle Java (for RHEL Server)
Red Hat Enterprise Linux for SAP Solutions for x86_64
OpenJDK Java (for Middleware)
Red Hat Enterprise Linux for Real Time
Red Hat AMQ Interconnect
Red Hat Software Collections (for RHEL Server)
Red Hat Enterprise Linux for SAP Applications for x86_64 - Extended Update Support
Red Hat Openshift Application Runtimes for IBM Power LE
Oracle Java (for RHEL Server) - Extended Update Support
Red 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 Support
Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
Red Hat Software Collections Beta (for RHEL Server)
Red Hat Enterprise Linux Fast Datapath Beta for x86_64
Red Hat Enterprise Linux Fast Datapath
Red Hat Ansible Engine
Red Hat Enterprise Linux Server
Red Hat OpenShift Container Platform
Red Hat Container Development Kit
MRG Realtime
Red Hat CodeReady Linux Builder for x86_64
Red Hat CodeReady Linux Builder for ARM 64
Red 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 Update
Support
Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node)
Red Hat Build of Quarkus
Red Hat OpenShift Application Runtimes Beta
Red Hat Enterprise Linux EUS Compute Node
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux Fast Datapath (for RHEL for ARM 64)
Red Hat Openshift Application Runtimes
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for ARM 64
Red Hat Beta
Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
JBoss Enterprise Application Platform
JBoss Enterprise Web Platform
Red Hat Developer Suite v.3
Red Hat Enterprise Linux for SAP Applications for Power LE - Update Services for SAP
Solutions
Red Hat Enterprise Linux High Availability (for IBM z Systems) - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Update Services for SAP Solutions
Red Hat Enterprise Linux for SAP Applications for x86_64 - Update Services for SAP Solutions
Red Hat Enterprise Linux for SAP Applications for x86_64
Red Hat Enterprise Linux Resilient Storage for IBM z Systems - Extended Update Support
Red Hat JBoss AMQ Clients
Red Hat Enterprise Linux for SAP Solutions for x86_64 - Update Services for SAP Solutions
Red Hat OpenShift Enterprise JBoss EAP add-on Beta
Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
Red Hat JBoss Middleware
Red Hat CodeReady Workspaces for OpenShift
Red Hat JBoss Data Grid
Red Hat JBoss Core Services
Red Hat Enterprise Linux High Availability for x86_64
Red Hat Enterprise Linux High Availability for x86_64 - Extended Update Support
Red 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
$ subscription-manager remove --serial=5165834853842457511
1 local certificate has been deleted.
The entitlement server successfully removed these serial numbers:
5165834853842457511
$ 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
$ 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 M
replacing iwl7265-firmware.noarch 22.0.7.0-69.el7
kernel 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 M
NetworkManager 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 Packages
Total download size: 303 M
Is this ok [y/d/N]: N
$ 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
$ 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
$ 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
$ 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 M
NetworkManager 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 Packages
Total download size: 277 M
Is this ok [y/d/N]: N
$ subscription-manager release --unset
Release preference has been unset
$ subscription-manager release --show
Release not set
$ yum clean all -v
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Cleaning repos: rhel-7-server-rpms
$ 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
...
$ 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 Packages
Total download size: 136 M
Is this ok [y/d/N]: N
$ subscription-manager repos --list
$ 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
$ 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/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