공유할 서비스 선택

TECH


TECH

OS Red Hat Subscription-Manager 사용법에 대해 알아보겠습니다~

페이지 정보

작성자 OSworker 아이디로 검색 전체게시물 댓글 0건 조회 2,017회 좋아요 0회 작성일 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을 삭제하고 다시 등록하는 과정을 거치면 정상적으로 작동되는것을 알수있을것입니다. 

 

 

 

참고링크:

https://access.redhat.com/solutions/265523

https://access.redhat.com/ko/solutions/1135673

댓글목록

등록된 댓글이 없습니다.

TECH 목록
번호 제목 작성자 작성일 조회수
184 OS OSworker 아이디로 검색 전체게시물 12-30 236
Red Hat z-stream 패키지를 어떻게 구분하나요? 또 z-stream이란 무엇인가요?

카테고리 : OS

236 0
작성자 : OSworker 23/12/30
183 OS OSworker 아이디로 검색 전체게시물 12-24 332
[issue] RHEL8 버전 설치시 swap 이 최대 128G 까지만 된다?

카테고리 : OS

332 0
작성자 : OSworker 23/12/24
182 Middleware 미들웨어 아이디로 검색 전체게시물 12-22 278
(오픈소스 활용-24) 리눅스 java, python 우선순위 설정방법 - (update-alternatives 명령어)

카테고리 : Middleware

278 0
작성자 : 미들웨어 23/12/22
181 OS OSworker 아이디로 검색 전체게시물 12-17 839
OS 모니터링 하실 때 많이 사용되는 SAR에 대해 아시죠?

카테고리 : OS

839 0
작성자 : OSworker 23/12/17
180 Middleware 미들웨어 아이디로 검색 전체게시물 12-07 537
(Apache) Apache 2.4.37 & Weblogic-14 연동방법 (mod_wl_24.so 활용)

카테고리 : Middleware

537 0
작성자 : 미들웨어 23/12/07
179 OS OSworker 아이디로 검색 전체게시물 11-27 812
요즘 이슈인 SUSE Liberty VS Red Hat Enterprise Linux 에 대해 들어보셨나요?

카테고리 : OS

812 0
작성자 : OSworker 23/11/27
178 Middleware 미들웨어 아이디로 검색 전체게시물 11-23 910
(Tmax) JEUS 21 다운로드 및 Master 설치 및 기동해보기

카테고리 : Middleware

910 0
작성자 : 미들웨어 23/11/23
177 OS OSworker 아이디로 검색 전체게시물 11-20 429
레드햇, RHEL 9.3 공개 - Podman 컨테이너 관리 기능 강화

카테고리 : OS

429 0
작성자 : OSworker 23/11/20
176 OS OSworker 아이디로 검색 전체게시물 11-12 1762
레드햇 자격증에 대해 쉽게 설명드리고자 합니다.

카테고리 : OS

1,762 0
작성자 : OSworker 23/11/12
175 Middleware 미들웨어 아이디로 검색 전체게시물 11-08 914
(오픈소스 활용-23) (부하테스트 Tool) Jmeter 설치 및 구성 가이드

카테고리 : Middleware

914 0
작성자 : 미들웨어 23/11/08
Total 204건
게시물 검색

주식회사 클럭스| 대표 : 이찬호| 사업자등록번호 : 107-87-27655
주소 : 서울특별시 영등포구 국회대로 800, 여의도파라곤
E-mail : sales@chlux.co.kr
Copyright © 클럭스 www.chlux.co.kr All rights reserved.
상단으로Top