1.9 使用CentOS YUM进行更新

Posted justdocument

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1.9 使用CentOS YUM进行更新相关的知识,希望对你有一定的参考价值。

1. 删除原有的RHEL yum

$ rpm -aq | grep yum|xargs rpm --erase –-nodeps

2. 下载 CentOS 5 yum

2.1 i386:

wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm
wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/i386/CentOS/python-iniparse-0.2.3-6.el5.noarch.rpm

2.2 x86_64:

wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-6.el5.noarch.rpm

3. 安装 CentOS5 yum

3.1 i386:

rpm -ivh python-iniparse-0.2.3-6.el5.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-4.el5.i386.rpm
rpm -ivh yum-3.2.22-40.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm (Must install both at the same time.)

3.2 x86_64:

rpm -ivh python-iniparse-0.2.3-6.el5.noarch.rpm (如果有冲突,先把已经安装的删除后再安装)
rpm -ivh yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
rpm -ivh yum-3.2.22-40.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

4. 下载 CentOS6-Base-163.repo 到 /etc/yum.repos.d

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo

5. 替换‘$releasever’ 为 ’5′;替换$basesearch为x86_64在 CentOS6-Base-163.repo

vi CentOS6-Base-163.repo
#6. 最后

yum clean all
yum makecache
yum search vim #测试

以上是关于1.9 使用CentOS YUM进行更新的主要内容,如果未能解决你的问题,请参考以下文章

python之 centos6.7下 python 3.5.2 源码Django-1.9 安装

CentOS yum 命令出现 [Errno 14] curl#6 - "Couldn't resolve host ..." 的解决方法(代码片段

CentOS使用yum更新系统,但不更新内核的方法!

CentOS下让yum定时自动更新

SnippetsLab for Mac 1.9 中文共享版 – 强大的代码收藏管理工具

CentOS镜像使用帮助--yum更新