[1] 首先备份
/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

[2] 进入yum源配置文件所在文件夹

[root@localhost yum.repos.d]# cd /etc/yum.repos.d/

[3] 下载163的yum源配置文件,放入/etc/yum.repos.d/

[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

 操作前请做好相应备份

CentOS 5

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

CentOS 6

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

CentOS 7

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

[4] 运行yum makecache生成缓存

[root@localhost yum.repos.d]# yum makecache
[root@localhost yum.repos.d]# yum install epel-release -y

[5] 更新系统

[root@localhost yum.repos.d]# yum -y update

[6] 安装vim编辑器

[root@localhost ~]# yum -y install vim*

Centos7 更改yum源与更新系统的更多相关文章

  1. Centos7更改yum源与更新系统

    [1] 首先备份 /etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cen ...

  2. CentOS 7更改yum源与更新系统

    在CentOS 7下更改yum源与更新系统. [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo cp /etc/yum.repos.d/CentOS-Base.rep ...

  3. 在CentOS 7下更改yum源与更新系统

    在CentOS 7下更改yum源与更新系统. [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo cp /etc/yum.repos.d/CentOS-Base.rep ...

  4. CentOS更改yum源与更新系统

    [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cent ...

  5. CentOS 更改yum源与更新系统

    FROM:http://www.cnblogs.com/lightnear/archive/2012/10/03/2710952.html [1] 首先备份/etc/yum.repos.d/CentO ...

  6. [转]CentOS更改yum源与更新系统

    [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cent ...

  7. centos 7更新yum源与更新系统

    1.备份/etc/yum.repos.d/下的原有文件(假如你想保留原系统的yum源的话),举例 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos ...

  8. 配置Ubuntu16.04第02步:更改镜像源,更新系统

    Ubuntu 16.04下载软件速度有点慢,因为默认的是从国外下载软件,那就更换到国内比较好的快速更新源(就是这些软件所在的服务器),一般直接百度Ubuntu更新源就能出来一大堆,这时候最好是找和自己 ...

  9. Centos7更改yum源

    每次都要百度一番,还不如自己做个记录,简单粗暴,哈哈哈哈 cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.old wget http: ...

随机推荐

  1. docker mac 命令行登录报错处理 : Error saving credentials: error storing credentials - err: exit status 1

    参考:https://blog.csdn.net/xufwind/article/details/88756557 比较新版本的docker命令行登录会出现以下错误: Error saving cre ...

  2. selenium 开启开发者工具(F12)

    selenium 开启开发者工具(F12) options = webdriver.ChromeOptions(); options.add_argument("--auto-open-de ...

  3. JavaScript 之 Array 对象

    Array 对象 之前已经了解了 Array(数组)的定义和基本操作.数组的基本操作. 下面来学习更多的方法. 检测一个对象是否是数组 instanceof // 看看该变量是否是该对象的实例 Arr ...

  4. 英语rubyspinel红尖晶石rubyspinel单词

    红尖晶石(rubyspinel或Red spinel)其红色是因含铬而致^像红宝石和红色石榴子石一样,红 尖晶石也曾被叫作红玉,这就造成了红色宝石的混乱,因为世界上一些最大的著名“红宝 石”,如英国王 ...

  5. Java梗概

    Java平台:J2SE(桌面).J2ME(逐渐被android取代).J2EE(企业级针对web程序) Java是在JVM虚拟机上运行,跨平台本质是在不同平台上运行JVM虚拟机 JRE = JVM+核 ...

  6. Java8新特性。

    常用函数接口: 函数式接口: 函数式接口在Java中是指:有且仅有一个抽象方法的接口(可以含其他方法). 而Java中的函数式编程的体现就是Lambda. @FunctionalInterface 注 ...

  7. java项目路径总结,java.io.File支持的路放方式

    1.直接输入路径 已maven项目为例,直接输入路径的4种方式,即是File类支持的方式: /** * FileOutpurStream以字节数组方式写入文件 * @throws IOExceptio ...

  8. 纯数据结构Java实现(7/11)(SegmentTree)

    欢迎访问我的自建博客: CH-YK Blog.

  9. 前端模板引擎artTemplate.js

    . 关于artTemplate模板引擎的详细原理请移步高性能JavaScript模板引擎原理解析,本文只探讨如何使用.初学前端的人一般对于绑定数据都是使用原生js或者jquery来拼接字符串,此为ha ...

  10. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect date value

    Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect date value: '154 ...