在 阿里巴巴镜像站页面,在centos 操作的帮助,有介绍 wgetcurl 2种方式来下载CentOS-Base.repo

  1. 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
  1. 下载新的CentOS-Base.repo 到/etc/yum.repos.d/

2.1. CentOS-Base.repo 在阿里巴巴镜像站的链接

CentOS 5: http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6: http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7: http://mirrors.aliyun.com/repo/Centos-7.repo

使用 wget 软件进行下载

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo #CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo #CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo #CentOS 7

或者使用 curl 软件进行下载

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo #CentOS 5
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo #CentOS 6
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo #CentOS 7

或者直接下载 对应版本的CentOS-Base.repo文件,在本地使用编辑器打开,将本地打开的CentOS-Base.repo文件所有内容都复制到 centos的/etc/yum.repos.d/CentOS-Base.repo文件中去

  1. 运行 yum makecache 命令生成缓存
References
  1. 阿里巴巴镜像站页面 点击列表的centos行的操作列,点击"帮助" 就会弹出设置教程咧

Centos yum的源 设置为阿里云源的更多相关文章

  1. 更改CentOS 6.3 yum源为国内 阿里云源

    将CentOS的 yum源 更换为 阿里云源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.b ...

  2. centos下将系统预置yum源更换为阿里云源

    参考:http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD 步骤1:备份/etc/yum.repos.d/下的Cen ...

  3. Centos将yum源设置为阿里云的镜像源

    第一步:备份原有镜像源 mv /etc/yum.repo.d/Centos-Base.repo /etc/yum.repo.d/Centos-Base.repo.bak 第二步:下载阿里云的镜像源 w ...

  4. 将Centos的yum源更换为阿里云源

    阿里云Linux安装软件镜像源 阿里云是最近新出的一个镜像源.得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源.阿里云Linux安装镜像源地址:http://mirrors.aliyun. ...

  5. Linux将yum源设置为阿里云的镜像源

    第一步:备份原有镜像源 mv /etc/yum.repo.d/Centos-Base.repo /etc/yum.repo.d/Centos-Base.repo.bak 第二步:下载阿里云的镜像源 w ...

  6. 设置centos7.3的YUM源为国内阿里云源

     CentOS系统更换软件安装源 第一步:备份你的原镜像文件,以免出错后可以恢复. mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cent ...

  7. Centos修改镜像为国内的阿里云源或者163源等国内源

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

  8. Centos的yum源更换为阿里云源

    1.备份 # mv /etc/yum.repos.d/CentOS-Base.repo # /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS- ...

  9. linux 更新yum源 改成阿里云源

    1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS-Base ...

随机推荐

  1. Python3.5-20190530-unittest模块

    >>> dir(unittest) #所有的属性和方法 ['BaseTestSuite', 'FunctionTestCase', 'SkipTest', 'TestCase', ' ...

  2. 20_1.Condition

    import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public clas ...

  3. The Constructor with No Arguments

    If a class supplies at least one constructor but does not supply a no-argument constructor, it is il ...

  4. git基础常用命令

    常用命令 git init //初始化本地git环境 git clone XXX//克隆一份代码到本地仓库 git pull //把远程库的代码更新到工作台 git pull --rebase ori ...

  5. linux学习-常用文本处理命令

    1.文本处理命令 (1) tr 转换或删除字符 tr [OPTION]...SET1 SET2 选项: -c 取SET1字符串的补集 -d 删除属于SET1中的字符 -s 把连续重复出现的字符以单独一 ...

  6. 英语单词collaboration

    collaboration 来源——github网站 https://guides.github.com/activities/hello-world/ GitHub is the best way ...

  7. 透明的UITableView

    // // ViewController.m // 透明table // // Created by LiuWei on 2018/4/23. // Copyright © 2018年 xxx. Al ...

  8. div中粘贴图片并上传服务器 div中拖拽图片文件并上传服务器

    应用简介:此文主要是描述如何在前端div中直接ctrl+v 粘贴图片,并上传到服务器,包括拖拽图片文件到div中 应用场景描述:用QQ或者其它切图软件截图,在指定的div中ctrl+v 粘贴并显示,点 ...

  9. Oracle数据库之触发器(一)

    触发器trigger是数据库提供给程序员和数据分析员来保证数据完整性的一种方法,它是与表事件相关的特殊的存储过程,它的执行不是由程序调用,也不是手工启动,而是由事件来触发.比如当对一个表进行操作(in ...

  10. Bugku | Easy_vb

    载入ida,直接搜‘ctf’就有了,坑点是不要交“MCTF{XXX}”,要交“flag{XXXX}”