Red Hat Enterprise 6 x86_64 使用Centos6.8 yum源设置
yum 简单介绍一下
yum 主要功能是更方便的添加/删除/更新RPM 包,自动解决包的倚赖性问题,便于管理大量系统的更新问题。
yum 可以同时配置多个资源库(Repository),简洁的配置文件(/etc/yum.conf),自动解决增加或删除rpm 包时遇到的依赖性问题,保持与RPM 数据库的一致性。
1.删除redhat原有的yum
[root@localhost src]# rpm -aq|grep yum|xargs rpm -e --nodeps
2.下载以下安装包
[root@localhost src]# wget http://soft.8090st.com/redhat/yum/yum-3.2.29-73.el6.centos.noarch.rpm [root@localhost src]# wget http://soft.8090st.com/redhat/yum/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm [root@localhost src]# wget http://soft.8090st.com/redhat/yum/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm [root@localhost src]# wget http://soft.8090st.com/redhat/yum/python-iniparse-0.3.1-2.1.el6.noarch.rpm [root@localhost src]# wget http://soft.8090st.com/redhat/yum/python-urlgrabber-3.9.1-11.el6.noarch.rpm
3.进行安装yum
[root@localhost src]# rpm -ivh --force yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm python-iniparse-0.3.1-2.1.el6.noarch.rpm python-urlgrabber-3.9.1-11.el6.noarch.rpm
4、更改yum源 #我们使用网易的CentOS镜像源
[root@localhost src]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
编辑文件,把文件里面的$releasever全部替换为版本号
[root@localhost yum.repos.d]# sed -i "s/\$releasever/6.8/g" CentOS6-Base-163.repo
5、清理yum缓存
[root@localhost yum.repos.d]# yum clean all
相关文章
为您推荐
各种观点