Blog >> Linux >> Whitepapers.

CentOS 7.9 yum 에러 150 150 phobe

CentOS 7.9 yum 에러

CentOS 7은 2024년 6월 30일부로 공식 지원(EOL)이 완전히 종료되었기 때문에, 기존에 바라보던 기본 yum 미러(Mirror) 서버들이 모두 닫혀서 그대로 사용하면 저장소를 찾을 수 없다는 에러가 발생한다.
패키지 파일들 자체는 레드햇의 보관소(Vault) 서버로 모두 안전하게 옮겨져 있다. 따라서 yum 설정 파일의 주소만 Vault로 바꿔주면 기존처럼 정상적으로 설치가 가능.

가장 확실하고 깔끔한 방법은 꼬여있는 기존 저장소 파일을 무시하고, Vault(보관소) 주소로 세팅된 깨끗한 설정 파일로 덮어쓰는 것

CentOS-Base.repo 파일 덮어쓰기

~]# cat << 'EOF' > /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF

YUM 캐시 재 설정

~]# yum clean all
~]# yum makecache
base                                                                                                                                                                                                              | 3.6 kB  00:00:00     
epel/x86_64/metalink                                                                                                                                                                                              | 3.8 kB  00:00:00     
epel                                                                                                                                                                                                              | 4.3 kB  00:00:00     
extras                                                                                                                                                                                                            | 2.9 kB  00:00:00     
https://mirror.kku.ac.th/mariadb/yum/10.11/centos/7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



 One of the configured repositories failed (MariaDB),
 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:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=mariadb ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable mariadb
        or
            subscription-manager repos --disable=mariadb

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=mariadb.skip_if_unavailable=true

failure: repodata/repomd.xml from mariadb: [Errno 256] No more mirrors to try.
https://mirror.kku.ac.th/mariadb/yum/10.11/centos/7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
~]#

대략 마리아 디비 repo가 문제라고…
그래서 마리아 repo를 지우고. clean, makecache. 그리고 설치할 패키지 설치.

~]# mv /etc/yum.repos.d/MariaDB.repo /etc/yum.repos.d/MariaDB.repo.bak
~]# yum clean all
Cleaning repos: base epel extras remi-php74 remi-safe updates
[root@server ~]# yum makecache
base                                     | 3.6 kB  00:00:00     
epel/x86_64/metalink                     | 3.8 kB  00:00:00     
epel                                     | 4.3 kB  00:00:00     
extras                                   | 2.9 kB  00:00:00     
remi-php74                               | 3.0 kB  00:00:00     
remi-safe                                | 3.0 kB  00:00:00     
updates                                  | 2.9 kB  00:00:00     
(1/22): base/7/x86_64/group_gz           | 153 kB  00:00:00     
(2/22): base/7/x86_64/filelists_db       | 7.2 MB  00:00:00     
(3/22): base/7/x86_64/other_db           | 2.6 MB  00:00:00     
(4/22): base/7/x86_64/primary_db         | 6.1 MB  00:00:01     
(5/22): epel/x86_64/group                | 399 kB  00:00:01     
(6/22): epel/x86_64/prestodelta          |  592 B  00:00:01     
(7/22): extras/7/x86_64/filelists_db     | 305 kB  00:00:00     
(8/22): extras/7/x86_64/primary_db       | 253 kB  00:00:00     
(9/22): epel/x86_64/primary_db           | 8.7 MB  00:00:01     
(10/22): extras/7/x86_64/other_db        | 154 kB  00:00:00     
(11/22): remi-php74/filelists_db         | 194 kB  00:00:01     
(12/22): epel/x86_64/updateinfo          | 1.0 MB  00:00:03     
(13/22): remi-php74/other_db             |  57 kB  00:00:00     
(14/22): remi-php74/primary_db           | 268 kB  00:00:01     
(15/22): epel/x86_64/other_db            | 4.1 MB  00:00:04     
(16/22): updates/7/x86_64/filelists_db   |  15 MB  00:00:01     
(17/22): updates/7/x86_64/primary_db     |  27 MB  00:00:02     
(18/22): updates/7/x86_64/other_db       | 1.6 MB  00:00:00     
(19/22): remi-safe/filelists_db          | 2.1 MB  00:00:09     
(20/22): epel/x86_64/filelists_db        |  15 MB  00:00:14     
(21/22): remi-safe/other_db              | 678 kB  00:00:12     
(22/22): remi-safe/primary_db            | 2.6 MB  00:00:16     
Metadata Cache Created

~]# yum install fail2ban fail2ban-firewalld
  • apache log 관리 150 150 phobe apache log 관리