天天看点

redhat6使用163 yum源

来自:https://blog.csdn.net/indexman/article/details/80640803

1.切换到yum源存放目录

[[email protected] ~]# cd /etc/yum.repos.d/

2.wget方式下载网易Centos yum源

[[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

3.修改文件名,备份自带redhat源

[[email protected] yum.repos.d]# mv rhel-source.repo rhel-source.repo.bak

[[email protected] yum.repos.d]# mv CentOS6-Base-163.repo rhel-source.repo

4.修改repo文件中的版本号

[[email protected] yum.repos.d]# sed -i “s;$releasever;6;g” rhel-source.repo

5.清除原有缓存

[[email protected] yum.repos.d]# yum clean all

6.获取yum列表

[[email protected] yum.repos.d]# yum makecache

作者:indexman

来源:CSDN

原文:https://blog.csdn.net/indexman/article/details/80640803

版权声明:本文为博主原创文章,转载请附上博文链接!

继续阅读