[Linux] CentOS 7 yum repo 변경(EOS)

CentOS 7의 공식 EOS 날짜는 2024년 6월 30일로 종료되면서 기본 저장소가 비활성화되었기 때문에, yum 명령어 실행 시 저장소를 찾지 못해 오류가 발생합니다. CentOS 7 yum repo 변경을 한 후에 문제 해결이 가능합니다.

CentOS 7에서 EOS(End of Support)에 따라 CentOS 7을 처음 설치 시 설정 된 yum 명령어 실행 시

One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

과 같은 오류를 확인할 수 있습니다.

✅ CentOS 7 yum repo 변경 진행

yum 저장소에서 백업 폴더 생성 후 기존 *.repo 파일들을 백업 폴더로 이동 시킵니다.

 ~]# cd  /etc/yum.repos.d/
 yum.repos.d]# ll
합계 40
-rw-r--r--. 1 root root 1664 10월 23  2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 10월 23  2020 CentOS-CR.repo
-rw-r--r--. 1 root root  649 10월 23  2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  630 10월 23  2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 10월 23  2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 10월 23  2020 CentOS-Vault.repo
-rw-r--r--. 1 root root  314 10월 23  2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  616 10월 23  2020 CentOS-x86_64-kernel.repo
 yum.repos.d]# mkdir Backup
 yum.repos.d]# mv CentOS-* Backup/
 yum.repos.d]# ll
합계 0
drwxr-xr-x. 2 root root 220  5월 18 15:20 Backup
 yum.repos.d]# vi CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[base]부터 [centosplus]까지 섹션에서 mirrorlist를 주석 처리하고, baseurl을 vault.centos.org로 변경합니다.

CentOS Vault는 CentOS의 특정 버전의 지원이 종료된 경우 사용자들이 종료된 버전의 패키지를 사용할 수 있도록 과거 패키지들을 지원하는 저장소입니다. 현재와 같은 CentOS 7 yum repo 변경이 필요한 경우에 저장소 설정을 하는 용도로 사용할 수 잇습니다.

✅ yum 명령어 실행

CentOS 7 yum repo 변경 작업 완료 후 yum clean all 명령으로 yum cache를 초기화 한 후에

yum 명령어를 입력하면 정상적으로 작동되는 것을 확인할 수 있습니다.

yum update 
 yum.repos.d]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base                                                                         | 3.6 kB  00:00:00
extras                                                                       | 2.9 kB  00:00:00
updates                                                                      | 2.9 kB  00:00:00
(1/4): base/x86_64/group_gz                                                  | 153 kB  00:00:01
(2/4): extras/x86_64/primary_db                                              | 253 kB  00:00:01
리눅스Linux(회색 배경의 나무 큐브)-CentOS 7 yum repo 변경에 대한 ..

Similar Posts

  • 리눅스 cat 명령어

    리눅스에서 텍스트 파일을 출력하는 간단한 ‘cat 명령어’는 명령어 뒤에 파일명을 적어 표준 출력(Standard Output)을 할 수 있습니다. cat은 “연결시키다”, “연관시키다” 등의 뜻을 가지고 있는 영어단어 “concatenate”에서 유래되었습니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행1. cat 명령어 특징 출력과 비슷한 의미의 단어가 아닌 “concatenate“라는 단어에서 유래된 이유는 “|” pipe 명령어나 “>”…

  • 리눅스 host 명령어 | DNS 조회 명령어

    host 명령어는 DNS(Domain Name System) 조회를 할 때 사용하는 명령어입니다. 호스트 이름에 해당하는 IP 주소를 찾거나, 반대로 IP 주소를 호스트 이름으로 변환하는 데 사용됩니다. 네트워크 연결 문제를 해결하거나 호스트 이름과 IP 주소 간의 매핑을 확인하는 데 유용합니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행✅ host 명령어 사용법 기본 사용 옵션은…

  • 리눅스 심볼릭 링크(Symbolic Link)와 하드 링크(Hard Link)

    리눅스에서 사용하는 심볼릭 링크(Symbolic Link)는 윈도우에서 사용하는 “바로가기”와 같은 기능을 가지고 있습니다. 소프트 링크 or 심링크로도 불리며, 하나의 파일에 여러 이름으로 생성할 수 있습니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행✅ 심볼릭 링크 하드 링크 명령어 [-s 옵션]은 Symbolic Link를 만들어 주는 옵션이며 [-s 옵션]이 빠지게 되면 Hard Link를 생성하게…

  • 리눅스 touch 명령어

    touch 명령어는 파일의 날짜 시간 정보를 변경하는 명령어입니다. 아무 옵션 없이 사용할 경우 파일의 최근 사용 시간, 변경 시간이 서버의 현재 시간으로 변경됩니다. 파일이 없는 파일명을 입력할 경우 새로운 크기가 0인 빈 파일이 생성됩니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행✅ touch 명령어 기본 사용 방법 ✅ touch 명령어 명령어…

  • [Linux] CentOS 7 설치 | VirtualBox 설치

    VirtualBox에 CentOS 7 설치를 진행 해 보겠습니다. 미리 다운로드 받은 ISO 파일로 이미 설정을 완료한 상태입니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행 ✅ CentOS 7 설치 진행 Install CentOS를 선택하고 다음 단계로 넘어갑니다. 언어 선택 화면에서 한국어를 선택합니다. 🔲 KDUMP 설정 KDUMP를 클릭하여, 체크 된 활성화를 비 활성화로 변경합니다….

  • iptables 개념과 설치 | iptables 명령어

    iptables는 netfilter.org에서  C언어로 만들어진 패킷 필터링이며 무료 방화벽 서비스입니다. 리눅스 방화벽의 기본 정책은 필요한 것을 제외한 모든 패킷에 대해 거부하는 것이 방화벽의 기본 정책입니다. 기본 설치 명령어는 다음과 같습니다. 기본 룰 설정 옵션은 다음과 같습니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행 Ⅰ. iptables 용어와 기본 iptables에서는 체인[Chain]이라고 불리는 규칙[Rule]으로…

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

Prove your humanity: 7   +   8   =