centos更换阿里yum源和epel
centos6.XX更换阿里云的源
1,安装wget:yum install -y wget
2,备份原来的yum源: mv /etc/yum.repos.d /etc/yum.repos.d_bk
1、删除现有的源:rm -rf /etc/yum.repos.d/*
2、下载阿里yum源文件:wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo http://mirrors.aliyun.com/repo/Centos-6.repo
3,清理缓存:yum clean all
这个时候,执行 yum repolist的结果如下
[root@di02 ~]# yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
-——————————
还没有评论,来说两句吧...