Red Hat Enterprise Linux 7.9 DVD 버전 설치 후는 repolist가 0건?

linux Linux

rhel-server-7.9-x86_64-dvd.iso를 가지고 Red Hat Enterprise Linux 7.9를 최소 설치했을 때 기본으로 등록되어있는 Repository(소프트웨어 저장소)는 다음과 같이 0건입니다.

$ yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
repolist: 0

PostgreSQL 같은 소프트웨어를 추가로 설치하고자 한다면 OS 설치 DVD 미디어에 있는 Repository라도 등록해야 합니다. 여기에서는 OS 설치 미디어의 Repository를 등록하는 방법을 소개합니다.

참고로 1년에 99달러를 내고 Red Hat Enterprise Linux Developer Suite에 개인 개발자로 등록하여 인터넷을 경유하는 Redhat의 모든 배포판과 최신의 소프트웨어 패키지를 이용할 수 있습니다. 만약 가입할 수 있다면 이 글을 Skip하고 아래 “RedHat 패키지 저장소(Repository)사용을 위한 Subscription Manager 등록하기” 글을 참조 하십시오.

눈깨비 정보창고 - 분기탱천
마우스 영역 지정 이미지 캡처를 문자 인식 및 번역하기 버튼 클릭 만으로  을 실행 해 주는 소프트웨어를 작성 했습니다. 자세한 도움말은 여기를 참조 하십시오. 웹 서비스 구축 눈깨비가 본업으로 하고 있는 기술적인 ...

DVD 마운트 하기

rhel-server-7.9-x86_64-dvd.iso를 가상 머신(VMware등)의 에 등록해 /dev/cdrom로 인식하게 만듭니다. 그리고 다음 명령으로 디렉토리 /mnt/disc에 mount합니다.

$ su - root
Password: yourpassword
# mkdir -p /mnt/disc
# mount /dev/cdrom /mnt/disc
mount: /dev/sr0 is write-protected, mounting read-only

InstallMedia 패키지 저장소(Repository) 추가하기

mount한 폴더에서 media.repo 파일을 찾아 /etc/yum.repos.d/ 폴더에 복사합니다. Repository 리스트에는 표시되지만 아직 비활성 상태입니다.

# cp /mnt/disc/media.repo /etc/yum.repos.d/rhel7dvd.repo
# chmod 644 /etc/yum.repos.d/rhel7dvd.repo
# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
repo id        repo name                     status
InstallMedia   Red Hat Enterprise Linux 7.9  disabled
repolist: 0

InstallMedia Repository를 활성화하기

rhel7dvd.repo 파일을 열어 gpgcheck0에서 1로 변경하고 enabled=1 등을 3줄 추가 합니다.

# vi /etc/yum.repos.d/rhel7dvd.repo

수정 전

[InstallMedia]
name=Red Hat Enterprise Linux 7.9
mediaid=1600369739.509793
metadata_expire=-1
gpgcheck=0
cost=500

수정 후

[InstallMedia]
name=Red Hat Enterprise Linux 7.9
mediaid=1600369739.509793
metadata_expire=-1
gpgcheck=1
cost=500
enabled=1
baseurl=file:///mnt/disc/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

yum clean all’ 명령으로 캐시를 지우고 InstallMedia(DVD 저장소)에서 패키지 목록을 가져올 수 있는지 확인합니다.

# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Cleaning repos: InstallMedia

# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
InstallMedia                 | 2.8 kB  00:00:00
(1/2): InstallMedia/group    | 628 kB  00:00:00
(2/2): InstallMedia/primary  | 2.1 MB  00:00:00
InstallMedia              5230/5230
repo id         repo name                       status
InstallMedia    Red Hat Enterprise Linux 7.9   enabled: 5,230
repolist: 5,230

이용 가능한 소프트웨어(예:PostgreSQL) 확인

# yum list postgresql
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Available Packages
postgresql.i686    9.2.24-4.el7_8  InstallMedia
postgresql.x86_64  9.2.24-4.el7_8  InstallMedia
제목과 URL을 복사했습니다