안녕하세요.
오늘은 CentOS7은 이미 EOL되었습니다.
yum 커맨드를 사용 하더라도 아래처럼 에러 메시지가 표시 되면서 yum 커맨드를 사용 할 수 없습니다.
could not resolve host: mirrorlist.centos.org
CentOS 7은 2024년 6월 30일부로 EOL(End of Life) 되었기 때문에,
공식 미러 서버(mirrorlist.centos.org)가 더 이상 서비스되지 않습니다.
그래서 yum 명령 시 아래와 같은 오류가 뜨게 됩니다 👇
repo를 변경해서 해결 할수 있습니다.
1. 기존 repo 백업
| sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup |
2. 새 repo 파일 생성
| sudo vi /etc/yum.repos.d/CentOS-Base.repo |
3. 아래 내용 복사 후 붙여넣기
| # CentOS-Base.repo for CentOS 7 Vault [base] name=CentOS-7 - Base 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-7 - Updates 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-7 - Extras baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 |
4. 캐시 정리 및 업데이트 테스트
| sudo yum clean all sudo yum makecache sudo yum update |
| [root@localhost ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base extras updates Cleaning up list of fastest mirrors Other repos take up 368 M of disk space (use --verbose for details) [root@localhost ~]# [root@localhost ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors base | 3.6 kB 00:00 extras | 2.9 kB 00:00 updates | 2.9 kB 00:00 (1/10): base/x86_64/group_gz | 153 kB 00:00 (2/10): base/x86_64/primary_db | 6.1 MB 00:01 (3/10): extras/x86_64/filelists_db | 305 kB 00:00 (4/10): extras/x86_64/other_db | 154 kB 00:00 (5/10): base/x86_64/other_db | 2.6 MB 00:00 (6/10): base/x86_64/filelists_db | 7.2 MB 00:02 (7/10): extras/x86_64/primary_db | 253 kB 00:01 (8/10): updates/x86_64/filelists_db | 15 MB 00:05 (9/10): updates/x86_64/other_db | 1.6 MB 00:00 (10/10): updates/x86_64/primary_db | 27 MB 00:07 Metadata Cache Created [root@localhost ~]# ---- 저는 이미 yum update명령어를 사용해서 업데이트 해서 더 이상 없데이트 할꺠 없습니다. -- [root@localhost ~]# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile No packages marked for update [root@localhost ~]# |
위에 처럼 에러 메시지가 발생하지 않습니다.
httpd를 설치 해보겠습니다. 아래처럼 에러 없이 잘 동작합니다.
| [root@localhost ~]# yum install httpd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.4.6-99.el7.centos.1 will be installed --> Processing Dependency: httpd-tools = 2.4.6-99.el7.centos.1 for package: httpd-2.4.6-99.el7.centos.1.x86_64 --> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-99.el7.centos.1.x86_64 --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-99.el7.centos.1.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-99.el7.centos.1.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-7.el7 will be installed ---> Package apr-util.x86_64 0:1.5.2-6.el7_9.1 will be installed ---> Package httpd-tools.x86_64 0:2.4.6-99.el7.centos.1 will be installed ---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: httpd x86_64 2.4.6-99.el7.centos.1 updates 2.7 M Installing for dependencies: apr x86_64 1.4.8-7.el7 base 104 k apr-util x86_64 1.5.2-6.el7_9.1 updates 92 k httpd-tools x86_64 2.4.6-99.el7.centos.1 updates 94 k mailcap noarch 2.1.41-2.el7 base 31 k Transaction Summary ================================================================================ Install 1 Package (+4 Dependent packages) Total download size: 3.0 M Installed size: 10 M Is this ok [y/d/N]: |
지금까지 [CentOS7][#2]- centos7 EOL yum update 하기 글을 읽어주셔서 감사합니다.
'리눅스 > CentOS7' 카테고리의 다른 글
| [CentOS7][#3]- ssh 서버 설치 (0) | 2025.10.18 |
|---|---|
| [CentOS7][#1]- IP 수동 설정 (0) | 2025.10.18 |