码迷,mamicode.com
首页 > 其他好文 > 详细

centos 6 切换base源

时间:2017-10-10 14:37:49      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:backup   安装   -o   tin   导入   bind   apr   ora   help   

切换为阿里云源:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo && yum makecache

 备份旧源-->下载新源-->生成缓存

 

切换为网易源:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.ali && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo && yum clean all && yum makecache

 

切换为epel源:

安装epel,centos6选6,5就选5

32位系统选择:

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

rpm -ivh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

64位系统选择:

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

导入key:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5

如果用比较新的软件,用epel-test.repo这个文件就行了

别忘了安装yum install yum-priorities

[root@localhost yum.repos.d]# ls |grep epel
epel.repo
epel-testing.repo

 

centos 6 切换base源

标签:backup   安装   -o   tin   导入   bind   apr   ora   help   

原文地址:http://www.cnblogs.com/netsa/p/7645136.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!