修改为163yum源-mirrors.163.com

1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、进入yum源配置文件所在的文件夹

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

3、查看CentOS系统版本

[root@localhost ~]lsb_release -a

4、下载163的yum源配置文件到上面那个文件夹内

CentOS7

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

CentOS6

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

CentOS5

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

5、运行yum makecache生成缓存

[root@localhost yum.repos.d]# yum makecache

6、这时候再更新系统就会看到以下mirrors.163.com信息

[root@localhost yum.repos.d]# yum -y update
已加载插件:fastestmirror, refresh-packagekit, security
设置更新进程Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com

修改为阿里yum源-mirrors.aliyun.com

1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、查看CentOS系统版本

[root@localhost ~]lsb_release -a

3、下载ailiyun的yum源配置文件到/etc/yum.repos.d/
CentOS7

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

CentOS6

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS5

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

4、运行yum makecache生成缓存

[root@localhost ~]# yum makecache

5、这时候再更新系统就会看到以下mirrors.aliyun.com信息

[root@localhost ~]# yum -y update
已加载插件:fastestmirror, refresh-packagekit, security
设置更新进程Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com

修改linux下yum镜像源为国内镜像的更多相关文章

  1. 配置Docker镜像源为国内镜像源

    镜像加速 /etc/docker/daemon.json 没有这个文件 创建这个文件 vi /etc/docker/daemon.json 按 i 进行插入 { "registry-mirr ...

  2. 更改pip源至国内镜像

    更改pip源至国内镜像   经常在使用Python的时候需要安装各种模块,而pip是很强大的模块安装工具,但是由于国外官方pypi经常被墙,导致不可用,所以我们最好是将自己使用的pip源更换一下,这样 ...

  3. Composer 更换为国内镜像源(Packagist 镜像)

    安装lavavel步骤: 安装composer (需要开启php_openssl扩展,否则报错) (https://getcomposer.org/) 到github下载laravel的最新发行版 ( ...

  4. 转载-让PIP源使用国内镜像,提升下载速度和安装成功率

    让PIP源使用国内镜像,提升下载速度和安装成功率. 对于Python开发用户来讲,PIP安装软件包是家常便饭.但国外的源下载速度实在太慢,浪费时间.而且经常出现下载后安装出错问题.所以把PIP安装源替 ...

  5. Linux下yum安装MySQL

    写这篇文章的原因是:在刚开始使用Linux操作系统时想要搭建LAMP环境,于是开始在Google和百度上各种寻找资料,碰到了不是很多的问题后,我决定写这篇文章总结一下在Linux下yum安装MySQL ...

  6. 【夯实PHP基础系列】linux下yum安装PHP APC

    Alternative PHP Cache(可选PHP缓存),依赖于 PECL扩展库 用源码方式安装,直接yum就行了:首先要安装apc的依赖包:yum install php-pear php-de ...

  7. [转帖]linux 下yum使用技巧

    linux 下yum使用技巧 https://www.cnblogs.com/galengao/p/5750389.html 本文来自我的github pages博客http://galengao.g ...

  8. linux下获取软件源码包 centos/redhat, debian/ubuntu

    linux下获取软件源码包 centos/redhat, debian/ubuntu centos下: 1. yum install yum-utils 主要为了获取yumdownloader 2. ...

  9. linux下yum安装python3

    linux下yum安装python3 linux下yum安装python3yum install python34 -ypython3 --version wget --no-check-certif ...

随机推荐

  1. 前端零基础 --css转换--skew斜切变形 transfor 3d

    前端零基础 --css转换--skew斜切变形 transfor 3d==============重要不紧急! 重要紧急 重要不紧急 不重要紧急 不重要不紧急

  2. AJAX的创建

    20:29:50 创建的步骤: 1.创建异步请求的核心对象 2.设置请求方式和地址 3.设置结果产生的回调函数 4.进行结果的逻辑处理 5.获取结果并处理 6.发送请求 <!DOCTYPE ht ...

  3. vue 数据改变但是视图没更新

    在使用过程中会出现数据改变但是视图没有更新的情况(类型数组或者对象),这里我们就需要用到 $set 如果是对象类型: this.$set(this.userInfo, 'name', 'gionlee ...

  4. Fragment生命周期以及使用时的小问题

    前言- 昨天在写UI的时候用到了FRAGMENT,发现自己对此还不是非常了解,借此机会记录一下 Fragment的生命周期- 官方生命周期图: Fragment每个生命周期方法的意义.作用- onVi ...

  5. 详细QRCode生成二维码和下载实现案例

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using ThoughtWo ...

  6. linux_FTP连接失败

    service vsftpd status vim /etc/vstpd/vsfptd.conf service vsftpd restart service iptables status serv ...

  7. VS2017的MVC和Angular联合开发的配置文件作用

    在通过MVC和Angular联合开发项目时,项目里有几个重要的配置文件,下面列出这几个配置文件的分析和比较: 主要配置文件有appsettings.json,tsconfig.json,package ...

  8. Mysql5.6二进制包安装方法

    1.Download MySQL Community Server 访问mysql官方网站转到下载页https://dev.mysql.com/downloads/mysql/5.6.html#dow ...

  9. RocketMQ4.3.x对顺序消息的理解

    1.RocketMQ消息队列简单介绍 这里简单介绍一下RocketMQ的消息队列的模型 一个topic对应多个队列如下图: 生产者和消费者分别向队列中发送和消费消息,生产者和消费者都可以是多个,通过组 ...

  10. Running Spark Streaming Jobs on a Kerberos-Enabled Cluster

    Use the following steps to run a Spark Streaming job on a Kerberos-enabled cluster. Select or create ...