[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

  • 리눅스 which whereis locate: 3가지 위치(경로) 확인 명령어

    리눅스 which와 whereis 명령어 명령어의 위치를 알 수 있는 명령어는 find 명령어를 이용해서 파일을 찾을 수 있지만 find 명령어는 시간이 소요되는 단점도 존재합니다. locate 명령어는 파일명을 빠르게 검색할 때 사용할 수 있습니다. 리눅스 기본 명령어 3가지에 대해 알아 보겠습니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행✅ 리눅스 which 명령어 ‘어느’,…

  • [Linux] 리눅스 일반 사용자 root 권한 부여 방법

    리눅스 일반 사용자 root 권한 부여 방법입니다. ‘testid’라는 계정을 임시로 만들었습니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행✅ 리눅스 일반 사용자 root 권한 부여하기 1. /etc/sudoers 2. /etc/passwd 수정 3. /etc/group 수정 ✅ 최종 확인 정상적으로 권한이 부여 되었는지 확인 해 봅니다.

  • [Linux] ifcfg: IP 네트워크 인터페이스 구성(이더넷) | CentOS 7 ver.

    레드헷 계열 리눅스에서 네트워크 구성은 /etc/sysconfig/network-scripts/ifcfg-* 파일에서 설정합니다. ifcfg(interface configuration)는 “이더넷” 장치를 어떻게 네트워크에 연결할지 설정하는 게 ifcfg-* 파일의 목적입니다. 네트워크 인터페이스는 컴퓨터가 네트워크에 연결되는 물리적 또는 가상 장치입니다. 유선(이더넷 카드), 무선(Wi-Fi 어댑터) 등이 이에 해당합니다. 리눅스에서는 eth0, wlan0, enp0s3 등 이름으로 식별하며 고유하게 관리합니다. 네트워크 인터페이스를 통해 데이터가 송수신 되어 인터넷이나 로컬…

  • 리눅스 퍼미션(4,2,1)과 소유권 | chmod, chown, umask 명령어 | 스티키 비트

    리눅스 퍼미션(Permission)은 권한(&허가)을 의미합니다. 유닉스 계열 운영 체제들은 MS-DOS 계열의 운영 체제들은 멀티 테스킹 시스템이 아니며 멀티 유저 시스템 역시 아닙니다. 보통 컴퓨터는 하나의 키보드와 모니터를 가지고 한 명이 사용하지만 멀티 유저 시스템인 리눅스는 한 명 이상이 사용할 수 있다는 것을 의미합니다. 유닉스 계열의 멀티 유저 시스템은 운영 체제 설계 초기부터 깊게 내장된…

  • 리눅스 uniq 명령어

    리눅스 uniq 명령어는 “unique”의 약자이며, 텍스트 파일에서 중복된 행을 제거하고 하나의 행만 출력하는데 사용됩니다. 중복된 텍스트 데이터를 제거하고 몇 번의 반복이 있었는지 등을 확인할 때 매우 유용하게 사용할 수 있습니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행✅ 리눅스 uniq 명령어 기본 사용법 INPUT 파일은 대상 파일로써 표준 입력에서 읽은 후…

  • 리눅스 free 명령어: 메모리 상태 확인

    리눅스 free 명령어는 서버의 메모리 사용량과 여유 사용량을 확인할 수 있는 명령어로 /proc/meminfo의 메모리 정보를 가져와 보여줍니다. 목차✅ CentOS 7 yum repo 변경 진행✅ yum 명령어 실행✅ 리눅스 free 명령어 옵션 1. free -h 설명 2. 옵션 활용 ✅ 스왑(SWAP)메모리란? ✅ 명목 메모리 사용량 계산법 free(1239384)는 실제로 사용되지 않은 메모리 용량이며 100% 사용…

답글 남기기

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

Prove your humanity: 3   +   10   =