RedHat cannot use the official update source. Therefore, you have to replace the RedHat official source with the CentOS open source. The procedure is as follows:
1. Replace the RedHat yum program:
[Plain] view plaincopy
- [Root @ leekwen] # cat/etc/issue
- RedHatEnterpriseLinuxServerrelease5.5 (Tikanga)
- Kernel \ ronan \ m
- [Root @ leekwen] # rpm-qa | grepyum
- [Root @ leekwen] # rpm-eyum-3.2.22-20.el5 -- nodeps
- [Root @ leekwen] # rpm-eyum-updatesd-0.9-2.el5 -- nodeps
- [Root @ leekwen] # rpm-eyum-security-1.1.16-13.el5 -- nodeps
- [Root @ leekwen] # rpm-eyum-metadata-parser-1.1.2-3.el5 -- nodeps
- [Root @ leekwen] # rpm-eyum-rhn-plugin-0.5.4-13.el5 -- nodeps
2. Download The CentOS yum Program (My 32bit server is here. If the 64-bit server is used, modify the download path on your own ):
[Plain] view plaincopy
- [Root @ leekwen] # wget-chttp: // logs
- [Root @ leekwen] # wget-chttp: // logs
- [Root @ leekwen] # wget-chttp: // logs
3. Install the CentOS yum program:
[Plain] view plaincopy
- [Root @ leekwen] # rpm-ivhyum-3.2.22-40.el5.centos.noarch.rpmyum-fastestmirror-1.1.16-21.el5.centos.noarch.rpmyum-metadata-parser-1.1.2-4.el5.i386.rpm
4. Modify the yum source of CentOS:
[Plain] view plaincopy
- [Root @ leekwen] # cd/etc/yum. repos. d/
- [Root @ leekwen] # cprhel-debuginfo.reporhel-debuginfo.repo.bak
- [Root@leekwenyum.repos.d] # echo> rhel-debuginfo.repo
- [Root@leekwenyum.repos.d] # catrhel-debuginfo.repo
- [Base]
- Name = CentOS-5-Base
- Repo = OS
- Baseurl = http://centos.ustc.edu.cn/centos/5/ OS /?basearch/
- Gpgcheck = 1
- Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
- [Update]
- Name = CentOS-5-Updates
- Baseurl = http://centos.ustc.edu.cn/centos/5/updates/?basearch/
- Gpgcheck = 1
- Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
- [Addons]
- Name = CentOS-5-Addons
- Baseurl = http://centos.ustc.edu.cn/centos/5/addons/?basearch/
- Gpgcheck = 1
- Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
- [Extras]
- Name = CentOS-5-Extras
- Baseurl = http://centos.ustc.edu.cn/centos/5/extras/?basearch/
- Gpgcheck = 1
- Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
- [Centosplus]
- Name = CentOS-5-Plus
- Baseurl = http://centos.ustc.edu.cn/centos/5/centosplus/?basearch/
- Gpgcheck = 1
- Enabled = 0
- Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
- [Contrib]
- Name = CentOS-5-Contrib
- Baseurl = http://centos.ustc.edu.cn/centos/5/contrib/?basearch/
- Gpgcheck = 1
- Enabled = 0
- Gpgkey = http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
- ###################
5. Execute the yum upgrade:
[Plain] view plaincopy
- [Root @ leekwen] # yumupdate