OS Red Hat Subscription-Manager 사용법에 대해 알아보겠습니다~
페이지 정보
작성자 OSworker 아이디로 검색 전체게시물 댓글 0건 조회 5,694회 좋아요 1회 작성일 23-09-30 20:59본문
안녕하세요 ~~
오늘은 "Red Hat Subscription-Manager"에 대해 알아보겠습니다.
많은 분들이 사실 실 운영서버에 Subscription-Manager통해 Subscription을 등록안하고 사용하는것으로 알고있습니다.
하지만, 개발 서버나 테스트 할때는 필요한것이 사실입니다. (모든 repository를 등록할 수 없고, 어떤 repository가 필요한지 아직 모르니깐요...)
그래서 제가 간단하게 사용하는 방법과 필요한 명령어들을 알려드리려 합니다.
1. Subscription 등록하기
- 다음 명령어를 사용하여 시스템을 등록하면 해당 시스템에 사용가능한 서브스크립션이 자동으로 연결됩니다.
# subscription-manager register --username <username> --password <password> --auto-attach
또는
# subscription-manager register
> 등록 테스트
[root@rh# subscription-manager register --auto-attach
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: *******
Password: *******
The system has been registered with ID: ****-****-*****-****
The registered system name is: rh
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status: Subscribed
> 등록확인
[root@rh]# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux for x86_64
Product ID: ***
Version: 8.8
Arch: x86_64
Status: Subscribed
Status Details:
Starts: 01/01/2023
Ends: 01/01/2029
2. 사용 가능한 Repository 연결
> 현재 연결된 Repository
- 아래와 같이 기본적으로 baseos, AppStream를 사용할수 있습니다.
[root@rh]# yum repolist
Updating Subscription Management repositories.
repo id repo name
epel Extra Packages for Enterprise Linux 8 - x86_64
rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
3. 특정한 pool 에 등록하기
- 시스템 등록한 후에 다음 명령을 사용하여 특정 pool 에서 서브스크립션을 연결할 수 있습니다.
(여기서 말하는 pool 은 내가 사용하고자 하는 repository라고 생각하시면 됩니다. )
# subscription-manager attach --pool=<POOL_ID>
하지만, 내 서브스크립션에 어떤 서브 스크립션들이 사용가능한지 모를땐 이렇게 확인합니다.
# subscription-manager list --available --all
여기서 내가 사용하고자 하는 제품을 등록하면 됩니다.
예를 들어)
# subscription-manager list --available --all
.......생략.......
Subscription Name: Red Hat OpenStack Platform for Service Providers
Provides: Red Hat Beta
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux Fast Datapath
Red Hat CodeReady Linux Builder for x86_64
Oracle Java (for RHEL Server)
Red Hat Enterprise Linux Advanced Virtualization (for RHEL Server for IBM Power LE) EUS
Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
Red Hat OpenStack Director Deployment Tools Beta for IBM Power LE
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux Advanced Virtualization Beta
Red Hat Service Telemetry Framework
Red Hat Enterprise Linux Server - TUS
Red Hat OpenStack for IBM Power
Red Hat Software Collections Beta (for RHEL Server for IBM Power 9)
Red Hat Enterprise Linux High Availability for x86_64
Red Hat Single Sign-On
Red Hat OpenStack Director Deployment Tools for IBM Power LE
Red Hat Enterprise Linux for Real Time for NFV for x86_64 - 4 years of updates
Cinderlib for IBM Power LE
Red Hat Developer Tools (for RHEL Server for IBM Power 9)
Red Hat Enterprise Linux High Availability for x86_64 - Telecommunications Update Service
Red Hat Enterprise Linux Advanced Virtualization EUS
Red Hat Enterprise Linux for Real Time for x86_64 - 4 years of updates
Red Hat Enterprise Linux Load Balancer (for RHEL Server)
Red Hat OpenStack
Red Hat OpenStack Beta
Red Hat Enterprise Linux High Availability for x86_64 - Extended Update Support
Red Hat OpenStack - Extended Life Cycle Support
Red Hat Enterprise MRG Messaging
Red Hat Ceph Storage OSD
Red Hat Ceph Storage Calamari
Red Hat Software Collections (for RHEL Server)
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat CloudForms
Red Hat OpenStack Beta for IBM Power LE
Red Hat Enterprise Linux Advanced Virtualization
Red Hat Ceph Storage MON
Red Hat Ansible Engine
Red Hat Enterprise Linux for x86_64 - Update Services for SAP Solutions
Red Hat OpenStack 13 - Extended Life Cycle Support
Red Hat Developer Tools (for RHEL Server)
Red Hat Developer Tools Beta (for RHEL Server)
Red Hat Software Collections Beta (for RHEL Server)
Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
Red Hat Enterprise Linux Fast Datapath Beta for x86_64
Red Hat Developer Tools Beta (for RHEL Server for IBM Power 9)
Red Hat Enterprise Linux Resilient Storage for x86_64 - 4 years of updates
Red Hat Ceph Storage
Red Hat Enterprise Linux High Availability for x86_64 - Update Services for SAP Solutions
Red Hat Enterprise Linux for x86_64 - Extended Update Support
SKU: ********
Contract: ********
Pool ID: 8a85f9a07db4828b017dc51b9f88090c <-----이것을 등록하면 위 제품들을 다 사용 가능하게 됩니다.
Provides Management: No
Available: *****
Suggested: 1
Service Type: L1-L3
Roles:
Service Level: .......
Usage:
Add-ons:
Subscription Type: Standard
Starts: 01/01/2023
Ends: 01/01/2029
Entitlement Type: Physical
[root@rh]# subscription-manager attach --pool=8a85f9a07db4828b017dc51b9f88090c
Successfully attached a subscription for: Red Hat OpenStack Platform for Service Providers
1 local certificate has been deleted
이렇게 등록을 마치게되면, yum으로 사용가능한 repository 채널이 많이짐을 알게됩니다.
[root@rh]# subscription-manager repos --list
+----------------------------------------------------------+
Available Repositories in /etc/yum.repos.d/redhat.repo <------- 이 파일안에 내용들이 다 있습니다.
+----------------------------------------------------------+
Repo ID: satellite-client-6-for-rhel-8-x86_64-e4s-source-rpms
Repo Name: Red Hat Satellite Client 6 for RHEL 8 x86_64 - Update Services for SAP Solutions (Source RPMs)
Repo URL: https://cdn.redhat.com/content/e4s/rhel8/$releasever/x86_64/sat-client/6/source/SRPMS
Enabled: 0
Repo ID: rh-sso-7.5-for-rhel-8-x86_64-source-rpms
Repo Name: Single Sign-On 7.5 for RHEL 8 x86_64 (Source RPMs)
Repo URL: https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/rh-sso/7.5/source/SRPMS
Enabled: 0
Repo ID: openstack-15-devtools-for-rhel-8-x86_64-source-rpms
Repo Name: Red Hat OpenStack Platform 15 Developer Tools for RHEL 8 x86_64 (Source RPMs)
Repo URL: https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/openstack-devtools/15/source/SRPMS
Enabled: 0
Repo ID: rhv-4-tools-beta-for-rhel-8-x86_64-source-rpms
Repo Name: Red Hat Virtualization 4 Tools Beta for RHEL 8 x86_64 (Source RPMs)
Repo URL: https://cdn.redhat.com/content/beta/layered/rhel8/x86_64/rhv-tools/4/source/SRPMS
Enabled: 0
.............생략..................
여기서 Repository를 활성화 하는 방븝은 위 파일을 수정하는 것과 Repo ID 를 추가하는 2가지 방법이 있습니다.
1) 파일 수정
Repo ID: openstack-15-devtools-for-rhel-8-x86_64-source-rpms
Repo Name: Red Hat OpenStack Platform 15 Developer Tools for RHEL 8 x86_64 (Source RPMs)
Repo URL: https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/openstack-devtools/15/source/SRPMS
Enabled: 0 --> 1로 수정
2) 명령어로 추가
# subscription-manager repos --enable=openstack-15-devtools-for-rhel-8-x86_64-source-rpms
==> Disable는 반대로 진행하면 됩니다.
# subscription-manager repos --disable=openstack-15-devtools-for-rhel-8-x86_64-source-rpms
[root@rh]# subscription-manager repos --enable=openstack-15-devtools-for-rhel-8-x86_64-source-rpms
Repository 'openstack-15-devtools-for-rhel-8-x86_64-source-rpms' is enabled for this system.
- 이렇게 등록된 Repository는 아래 명령어를 통해 추가된것을 확인할수있습니다.
추가된 Repository를 통해 필요한 패키지를 설치 할 수있습니다.
[root@rh]# yum repolist
Updating Subscription Management repositories.
repo id repo name
epel Extra Packages for Enterprise Linux 8 - x86_64
openstack-15-devtools-for-rhel-8-x86_64-source-rpms Red Hat OpenStack Platform 15 Developer Tools for RHEL 8 x86_64 (Source RPMs)
rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
3. 시스템에 등록 취소하기
[root@rh]# subscription-manager remove --all
0 subscriptions removed at the server.
[root@rh]# subscription-manager unregister
Unregistering from: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.
[root@rh]# subscription-manager clean
All local data removed
혹시, 사용하다가 정상적으로 작동이 안할때는 Subscription을 삭제하고 다시 등록하는 과정을 거치면 정상적으로 작동되는것을 알수있을것입니다.
참고링크:
댓글목록
등록된 댓글이 없습니다.