end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

rhel8試用に伴う Red Hat サブスクリプションの有効化

Red Hat Enterprise Linux 8 を試用しますが、今後もきっと、忘れるので、メモ

rhel8の初期状態では、repositoryを参照できず、yum を使用できません

$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.4 (Ootpa)

$ sudo yum install samba

Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

以下のコマンドにより、Red Hat の サブスクリプション & repository の有効化

ブラウザで redhatへ、アクセスすることでも可能なようですが、試していません

$ sudo subscription-manager register
[sudo] password for end0tknr: 
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: end0tknr
Password: 
The system has been registered with ID: 74cc7463-bffe-4e49-b8c6-f97088a30def
The registered system name is: rhel8.a5.jp
[end0tknr@rhel8 tmp]$ sudo subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        8.4
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not supported by a valid subscription.
Starts:         
Ends:           

$ sudo subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Developer Subscription for Individuals
Provides:            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
Contract:            
Pool ID:             2c9280817a7d8db6017ab9bdb6281e5b
Provides Management: No
Available:           16
Suggested:           1
Service Type:        
Roles:               Red Hat Enterprise Linux Server
                     Red Hat Enterprise Linux Workstation
                     Red Hat Enterprise Linux Compute Node
Service Level:       Self-Support
Usage:               Development/Test
Add-ons:             
Subscription Type:   Standard
Starts:              07/18/2021
Ends:                07/18/2022
Entitlement Type:    Physical

Subscription Name:   60 Day Product Trial of Red Hat Enterprise Linux Server with Smart
                     Management, Monitoring, and all Add-Ons, Self-Supported (Physical or
                     Virtual Nodes)
Provides:            dotNET on RHEL Beta (for RHEL Server)
                     Red Hat Satellite
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux Scalable File System (for RHEL Server) -
                     Extended Update Support
                     Red Hat Container Images Beta
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Container Images
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Beta
                     Red Hat Enterprise Linux High Availability for x86_64
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended
                     Update Support
                     dotNET on RHEL (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64 - 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
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux Resilient Storage for x86_64
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Satellite Capsule
                     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
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Enterprise Linux for x86_64 - Extended Update Support
                     Red Hat Developer Toolset (for RHEL Server)
SKU:                 RH00066
Contract:            12738638
Pool ID:             8a85f99f7aaf7dc9017ab861e8f33915
Provides Management: Yes
Available:           2
Suggested:           1
Service Type:        
Roles:               Red Hat Enterprise Linux Server
Service Level:       Self-Support
Usage:               Development/Test
Add-ons:             
Subscription Type:   Instance Based
Starts:              07/18/2021
Ends:                09/16/2021
Entitlement Type:    Physical

$ sudo subscription-manager subscribe --pool=8a85f99f7aaf7dc9017ab861e8f33915
※ subscribeは attach だったかも
Successfully attached a subscription for: 60 Day Product Trial of Red Hat Enterprise Linux Server with Smart Management, Monitoring, and all Add-Ons, Self-Supported (Physical or Virtual Nodes)

$ sudo subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        8.4
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         07/18/2021
Ends:           09/16/2021

以上により、yum が可能になります

$ sudo yum install samba
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)      17 MB/s |  34 MB     00:02    
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)   16 MB/s |  31 MB     00:01    
Dependencies resolved.
==========================================================================================
 Package               Arch      Version           Repository                        Size
==========================================================================================
Installing:
 samba                 x86_64    4.13.3-3.el8      rhel-8-for-x86_64-baseos-rpms    846 k
Installing dependencies:
 avahi-libs            x86_64    0.7-20.el8        rhel-8-for-x86_64-baseos-rpms     62 k
 cups-libs             x86_64    1:2.2.6-38.el8    rhel-8-for-x86_64-baseos-rpms    433 k
 libicu                x86_64    60.3-2.el8_1      rhel-8-for-x86_64-baseos-rpms    8.8 M
 libwbclient           x86_64    4.13.3-3.el8      rhel-8-for-x86_64-baseos-rpms    119 k
 samba-client-libs     x86_64    4.13.3-3.el8      rhel-8-for-x86_64-baseos-rpms    5.4 M
 samba-common          noarch    4.13.3-3.el8      rhel-8-for-x86_64-baseos-rpms    218 k
 samba-common-libs     x86_64    4.13.3-3.el8      rhel-8-for-x86_64-baseos-rpms    171 k
 samba-common-tools    x86_64    4.13.3-3.el8      rhel-8-for-x86_64-baseos-rpms    498 k
 samba-libs            x86_64    4.13.3-3.el8      rhel-8-for-x86_64-baseos-rpms    168 k

Transaction Summary
==========================================================================================
Install  10 Packages

Total download size: 17 M
Installed size: 58 M
Is this ok [y/N]: y
Downloading Packages:
<以降、省略>