方法一:添加epel阿里云
1、 首先卸載以前裝的epel 以免影響:
? rpm -e epel-release
2、 下載阿里提供的epel 舀奶。
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo
3、yum clean all
4、yum makecache
? 好了繁扎,? 現(xiàn)在你要裝epel源的軟件的時(shí)候 不再慢吞吞了。
方法二:全部改成阿里云的源的方法
1糊闽、rm -rf /etc/yum.repos.d/*? ? (執(zhí)行此操作的時(shí)候記得事先裝好wget? ? 不然 你就得掛載光盤用rpm裝wget了梳玫。)
2、wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo http://mirrors.aliyun.com/repo/Centos-6.repo
這個(gè)時(shí)候右犹,執(zhí)行 yum repolist的結(jié)果如下
[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