- RHEL7에서 CentOS repo를 이용한 yum 사용.
RHEL 7버전에서 CentOS 7 버전의 repository가 호환된다.
100% 된다고는 장담을 못하니… 특히 kernel관련.
kernel과 같이 크리티컬하지 않은 곳에 적절히 이용해야한다.
참조 : http://isoredirect.centos.org/centos/7/isos/x86_64/
Centos Repo 주소는 /7/os/x86_64
– repo 파일을 생성하여 Centos repo를 연결하도록 설정
vi /etc/yum.repo.d/centos.repo
[base]
name=CentOS-$releasever-Base
baseurl=http://ftp.daum.net/centos/7/os/$basearch
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever-Updates
baseurl=http://ftp.daum.net/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever-Extras
baseurl=http://ftp.daum.net/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever-Plus
baseurl=http://ftp.daum.net/centos/7/centosplus/$basearch/
gpgcheck=1
gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7
[debug]
name=centos7-debug
baseurl=http://debuginfo.centos.org/7/x86_64/
**주소는 상기 링크를 참조하여 변경가능.
- Media ISO를 사용하여 Repo 생성
일반적으로 RHEL의 경우 RHN register을 하지 않으면 yum을 정상적으로 사용 할 수 없다.
외부 인터넷이 차단되어있는 폐쇄사이트의 경우에도 유용한 방안이다.
7.5 -> 7.9등으로 kernel 업데이트가 필요한데 인터넷이 차단된 환경일때도 유용하다.
ISO/DVD를 임시 마운트하여 전체 내용을 복사하기를 권장.
ISO파일을 마운트해서 쓰는 경우, 임시사용하거나 fstab에 포함 필요.
-Media ISO를 마운트하여 내용을 복사. repo 설정
# mount -o loop rhel-server-7.4x86_64-dvd.iso /mnt/media
# cp -rp /mnt/media/* /root/rhel74/
# vi /etc/yum.repos.d/media.repo
[InstallMedia]
name=DVD for Red Hat Enterprise Linux 7.4 Server
#mediaid=1359576196.686790
#metadata_expire=-1
gpgcheck=0
#cost=500
enabled=1
baseurl=file:///root/rhel74
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
** RHEL 8 버전은 ISO 미디어의 BaseOS까지 AppStream까지 지정
# vi /etc/yum.repos.d/media.repo
[InstallMedia-BaseOS]
name=DVD for Red Hat Enterprise Linux 8.4 Server
gpgcheck=0
enabled=1
baseurl=file:///root/rhel84/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[InstallMedia-AppStream]
name=DVD for Red Hat Enterprise Linux 8.4 Server
gpgcheck=0
enabled=1
baseurl=file:///root/rhel84/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release