国外的yum源由于众所周知的GFW原因,有的被墙,有的很慢,阿里云依靠强大的技术优势建立了国内的开源镜像。
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/

第一步:备份你的原镜像文件,以免出错后可以恢复。

备份(如有配置其他epel源)

1 mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
2 mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup

第二步:下载新repo 到/etc/yum.repos.d/

1 epel(RHEL 7)
2 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
3              
4 epel(RHEL 6)
5 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
6              
7 epel(RHEL 5)
8 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo

第三步:运行yum makecache生成缓存,先清除掉老缓存,然后重建缓存

1 yum clean all && yum makecache

centos更换yum源为aliyun源的更多相关文章

  1. Centos更换yum源

    Centos更换yum源 步骤如下: 备份原始源 cd /etc/yum.repos.d/ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/ ...

  2. centos 更换yum源 (解决下载慢的问题)

    先看有没有安装wget         wget -V 如果没有执行   yum -y install wget    进行安装 然后进行配置的备份 mv /etc/yum.repos.d/CentO ...

  3. Centos更换yum源,安装ssh server

    先连上网,然后更换yum源 1. 新建的用户没有sudo权限,所以首先切换到root用户su -输入密码 2. 备份之前的yum源mv /etc/yum.repos.d/CentOS-Base.rep ...

  4. CentOS 更换yum源为aliyun yum源

    CentOS自带的yum源为官方的源,由于墙的原因,经常无法访问,国内也有不错的源,这里讲一下使用aliyun的源替换原yam源. 第一种方法 1.安装base reop源 cd /etc/yum.r ...

  5. centos 更换 yum源

    阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/ CentOS系统更换软件安装源第一步:备份你的原镜像文件,以免出错后可以恢复. mv /etc/yum.repos ...

  6. Centos更换yum库镜像

    首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-B ...

  7. redhat7 配置使用centos的yum源

    新安装了redhat7.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription Man ...

  8. CentOS更换源

    这里介绍如何把CentOS默认镜像源更换为阿里云镜像源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.r ...

  9. redhat 7.5 更换 yum源

    因为 redhat 的 yum 是收费,所以需要换成 Centos 的 yum 才可以 首先,卸载 redhat 的 yum 软件 sudo rpm -qa|grep yum 其次,下载 Centos ...

随机推荐

  1. 链表有环判断,快慢指针两种方法/合并链表/删除重复元素/二分递归和while

    public static boolean hasCycle(ListNode head) { if (head == null || head.next == null) { return fals ...

  2. Linux下tomcat运行命令

    tomcat启动 [root@master webapps]# /usr/local/tomcat7.0/bin/catalina.sh start startup.sh的源代码,其实就是执行   c ...

  3. unity 获取网络时间

    http://cgi.im.qq.com/cgi-bin/cgi_svrtime public int year, mouth, day, hour, min, sec; public string ...

  4. python机器学习一:KNN算法实现

    所谓的KNN算法,或者说K最近邻(kNN,k-NearestNeighbor)分类算法是数据挖掘分类技术中最简单的方法之一.所谓K最近邻,就是k个最近的邻居的意思,说的是每个样本都可以用它最接近的k个 ...

  5. python 深拷贝、浅拷贝、引用

    (1)直接赋值,传递对象的引用而已,原始列表改变,被赋值的b也会做相同的改变(2)copy浅拷贝,没有拷贝子对象,所以原始数据改变,子对象会改变(3)深拷贝,包含对象里面的子对象的拷贝,所以原始对象的 ...

  6. python判断任务是CPU密集型还是IO密集型

    目前已经知道,在需要并发执行任务的时候,需要使用多线程或者多进程;如果是IO密集型任务,使用多线程,如果是CPU密集型任务,使用多进程;但问题是,经常我们会遇到一种情况就是:需要被执行的任务既有IO操 ...

  7. 阿里云栖大会 所有ppt

    https://github.com/Alimei/hangzhouYunQi2017ppt

  8. mysql 触发器介绍

    create trigger triggerName   after/before insert/update/delete on tableName  for each row   --这句话在my ...

  9. base64 压缩图片

    //图片处理 afterimg(err, photos) { var _this = this; if(err && err != null && err != '') ...

  10. opencv矩阵操作

    1.初始化矩阵: 方式一.逐点赋值式: CvMat* mat = cvCreateMat( 2, 2, CV_64FC1 ); cvZero( mat ); cvmSet( mat, 0, 0, 1 ...