hanim·2022년 8월 16일

개요

인터넷이 연결이 될지 않는 상황에서 yum 사용하기위한 Local yum repository 를 만든다.

1.마운트

  1. iso 파일을 통째로 넣었을때

    rhel-8.2-x86_64-dvd.iso 파일을 /root에 복사

    mount -t iso9660 -o loop /root/rhel-8.2-x86_64-dvd.iso /media

2.iodd 나 CD 롬에 이미지를 넣었을때 

또는 # mount /dev/sr0 /media -> iodd 나 CD 롬에 이미지를 넣었을때 방법

mkdir /repository -> 폴더를 생성하고
cp -a /media/* /repository/ -> 마운트 시킨 내용을 repository 에 복사
vi /etc/yum.repos.d/Centos8.repo -> repo 생성 후 하기 내용 삽입

[MyBase]
name=MyBase
baseurl=file:///media/BaseOS/
gpgcheck=0

[MyAppStream]
name=MyAppStream
baseurl=file:///media/AppStream/
gpgcheck=0

[root@localhost yum.repos.d]# dnf clean all -> dnf클린 (8버전부터는 yum 말고 dnf 를 씁니다.)

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.

0 files removed

[root@localhost yum.repos.d]# subscription-manager clean -> redhat 만 진행 (Centos 는 필요 없음)

로컬 데이터가 모두 삭제되었습니다

[root@localhost yum.repos.d -> yum grouplist 로 확인

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.

CentOS Linux 8 - BaseOS 222 MB/s | 2.3 MB 00:00

CentOS Linux 8 - AppStream 121 MB/s | 5.8 MB 00:00

profile
개발자가 되려는 개발자

0개의 댓글