인터넷을 사용할수 없는 상황에서 yum 을 사용하기 위해
iso파일을 이용하여 local yum repository를 만들어 yum을 사용한다.
mount -t iso9660 -o loop /root/rhel-8.2-x86_64-dvd.iso /media
2.iodd 나 CD 롬에 이미지를 넣었을때
mount /dev/sr0 /media
media 폴더에 mount 된 상태로 사용하거나
추가적으로 dir 를 생성하여 사용한다.
mkdir /repository -> 폴더를 생성하고
cp -a /media/* /repository/ -> 마운트 시킨 내용을 repository 에 복사
vi /etc/yum.repos.d/Centos8.repo
Centos8.repo 내부 작성내용
[LocalBase]
name=LocalBase
baseurl=file:///media/BaseOS/
gpgcheck=0
[LocalAppStream]
name=LocalAppStream
baseurl=file:///media/AppStream/
gpgcheck=0
[root@localhost yum.repos.d]# dnf clean all
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
로컬 데이터가 모두 삭제되었습니다
[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