# IT #/Linux

# redhat 8.x local repo 설정방법 / Centos 8 local repo#

국철 2020. 8. 13. 15:36
반응형

redhat 8 버전부터 local repo 적용하는게 변경되었습니다.

 

 

[local 레포지터리 생성 ]

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

mount -t iso9660 -o loop /root/rhel-8.2-x86_64-dvd.iso /media          -> iso 파일을 통째로 넣었을때 마운트 방법

 

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

 

mkdir /repository          -> 폴더를 생성하고

cp -a /media/* /repository/                -> 마운트 시킨 내용을 repository 에 복사

vi /etc/yum.repos.d/Centos8.repo             -> repo 생성 후 하기 내용 삽입

[InstallMedia-BaseOS]
name=CentOS Linux 8 - BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///repository/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[InstallMedia-AppStream]
name=CentOS Linux 8 - AppStream
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///repository/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

 

 

[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]#
[root@localhost yum.repos.d]# subscription-manager clean                  -> redhat 만 진행 (Centos 는 필요 없음)
로컬 데이터가 모두 삭제되었습니다
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# yum grouplist                 -> 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
사용 가능한 환경 그룹 :
서버
최소 설치
워크스테이션
사용자 정의 운영 체제
가상화 호스트
설치된 환경 그룹 :
서버 - GUI 사용
설치된 그룹 :
컨테이너 관리
개발용 툴
헤드리스 관리
사용 가능한 그룹 :
레거시 UNIX 호환성
.NET 코어 개발
그래픽기반 관리 툴
네트워크 서버
RPM 개발 툴
과학기술 지원
보안 툴
스마트카드 지원
시스템 툴

 

완료.

반응형