这个其实并不难,更新下yum源就行了

vi /etc/yum.repos.d/CentOS-Base.repo

将源文件内的所有内容删除,并更换为如下内容。(谨慎些的话可以先将CentOS-Base.repo备份,个人觉得没必要,反正原来的用不了)

# CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client.  You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.##[base]name=CentOS-6.10 - Base - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6#released updates[updates]name=CentOS-6.10 - Updates - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-6.10 - Extras - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6.10 - Plus - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-6.10 - Contrib - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6


©著作权归作者所有:来自51CTO博客作者N九的原创作品,谢绝转载,否则将追究法律责任

更多相关文章

  1. 接口的基本属性
  2. 接口联动
  3. CentOS 6.5 用光盘镜像制作本地yum源
  4. 函数的声明与定义
  5. android编译系统(一):GUN Make简介
  6. Android程序设计逻辑分析之用户事件响应-回调函数的使用
  7. Android/JAVA快速入门笔记
  8. Android资源文件-Shape
  9. Android中如何给layout资源文件分类 在layout下创建子文件夹

随机推荐

  1. php echo什么意思
  2. 如何下载php开源代码
  3. USDT PHP开发包OmniTool简介
  4. php中什么是魔术引号
  5. php如何设置日期
  6. php之日期时间操作一箩筐
  7. wampserver怎么下载
  8. PHP如何实现短网址
  9. php适合做微服务么
  10. php array_chunk函数怎么用