2012년 초까지만 CentOS 4.x yum mirror 서버가 운영되고 중단되었다.
이제 CentOS 4.x는 아래와 같이 적용해야 yum 업데이트가 가능하다.
config파일 수정
vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/4.9/os/$basearch/
gpgcheck=0
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#released updates
[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://vault.centos.org/4.9/updates/$basearch/
gpgcheck=0
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
baseurl=http://vault.centos.org/4.9/addons/$basearch/
gpgcheck=0
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://vault.centos.org/4.9/extras/$basearch/
gpgcheck=0
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=http://vault.centos.org/4.9/centosplus/$basearch/
gpgcheck=0
enabled=0
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=2
protect=1
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
baseurl=http://vault.centos.org/4.9/contrib/$basearch/
gpgcheck=0
enabled=0
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=2
protect=1
그래도 안된다면,
* 만약 위와 같이 지정하고 실행했는데도 yum 업데이트가 안된다면 원인은 두가지가 될 수 있다.
1. yum cache 로 인한 문제.
2. vault.centos.org 사이트마저 CentOS 4.x 미러서버 지원 끝
1번 문제는 간단히 해결이 가능하다.
쉘에서 해당 디렉토리 밑의 캐쉬 데이터들을 지운다.
rm -rf /var/cache/yum/*
2번 문제 확인은 아래 링크를 따라 들어갔을때 디렉토리와 파일들이 보이면 미러서버가 유지중인 것임
http://vault.centos.org/4.9