一、源列表

aliyun源

#各系统版本repo文件对应的下载操作
CentOS
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

163源

#各系统版本repo文件对应的下载操作
CentOS
wget -O /etc/yum.repos.d/CentOS5-Base-.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
CentOS
wget -O /etc/yum.repos.d/CentOS6-Base-.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
CentOS
wget -O /etc/yum.repos.d/CentOS7-Base-.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

二、配置源

  我用的是CentOS 7,以163源为例,操作如下:

[lz@mail lcap-0.0.]$ cat /etc/redhat-release
CentOS Linux release 7.3. (Core)
[lz@mail lcap-0.0.]$ sudo wget -O /etc/yum.repos.d/CentOS7-Base-.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
[sudo] password for lz:
---- ::-- http://mirrors.163.com/.help/CentOS7-Base-163.repo
正在解析主机 mirrors..com (mirrors..com)... 59.111.0.251
正在连接 mirrors..com (mirrors..com)|59.111.0.251|:... 已连接。
已发出 HTTP 请求,正在等待回应... OK
长度: (.5K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/CentOS7-Base-.repo” %[=========================================================================================================================================================================>] , --.-K/s 用时 0s -- :: (89.9 MB/s) - 已保存 “/etc/yum.repos.d/CentOS7-Base-.repo” [/])

三、源缓存

Step 1 : 清除旧的源缓存:

[lz@mail lcap-0.0.]$ yum clean all
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repodata is over weeks old. Install yum-cron? Or run: yum makecache fast
正在清理软件源: base epel extras mysql-connectors-community mysql-tools-community mysql56-community updates
Cleaning up everything

Step 2 : 构建新的源缓存:(只展示一部分)

[lz@mail lcap-0.0.]$ yum makecache
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repodata is over weeks old. Install yum-cron? Or run: yum makecache fast
base | 3.6 kB ::
epel/x86_64/metalink | 5.2 kB ::
epel | 3.2 kB ::
extras | 3.4 kB ::
mysql-connectors-community | 2.5 kB ::
mysql-tools-community | 2.5 kB ::
mysql56-community | 2.5 kB ::
updates | 3.4 kB ::
(/): base//x86_64/group_gz | kB ::
(/): epel/x86_64/group_gz | kB ::
(/): epel/x86_64/updateinfo
...
(/): updates//x86_64/filelists_db | 2.3 MB ::
(/): updates//x86_64/primary_db | 4.2 MB ::
Determining fastest mirrors
* base: mirrors..com
* epel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors..com
* updates: mirrors..com
epel /
epel /
epel /
元数据缓存已建立

  之后再使用yum安装软件,速度就可以起飞了。

CentOS配置源的更多相关文章

  1. CentOS配置源、wget、ifconfig基础环境

    执行命令: curl http://10.200.0.14:8000/portal.cgi -X POST -d 'username=lishuai&password=test@cetc38& ...

  2. centos yum源配置 与yum配置文件

    参考博客 http://www.cnblogs.com/mchina/archive/2013/01/04/2842275.html 1.centos . yum配置文件在目录 /etc/yum.re ...

  3. CentOS配置yum源(补充)

    这是对yum命令的补充 Yum命令 一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yu ...

  4. CentOS配置本地yum源/阿里云yum源/163yuan源,并配置yum源的优先级

    一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yum源替换成aliyun的yum源或者 ...

  5. RHEL6配置CentOS yum源

    RHEL6配置CentOS yum源

  6. CentOS、RHEL、Asianux、Neokylin、湖南麒麟、BC Linux、普华、EulerOS请参考“1.1 CentOS本地源配置”;

      本文档适用于CentOS.RHEL.Asianux.Neokylin.湖南麒麟.BC Linux.普华.EulerOS.SLES.Ubuntu.Deepin.银河麒麟. CentOS.RHEL.A ...

  7. Centos配置yum本地源最简单的办法

    有关centos配置yum本地源的方法 一.前提 先连接镜像 然后在命令行输入如下命令 mount /dev/sr0 /mnt cd /etc/yum.repos.d/ ls 之后会看到如下的界面 二 ...

  8. Linux配置mysql (centos配置java环境 mysql配置篇 总结四)

    ♣安装的几种方法和比较 ♣配置yum源 ♣安装mysql ♣启动mysql ♣修改密码 ♣导入.sql文件 ♣缓存设置 ♣允许远程登录(navicat) ♣配置编码为utf8  1.关于Linux系统 ...

  9. RedHat 更新CentOS Yum源(转)

    经测试,可用.转自:https://www.cnblogs.com/tangsen/p/5151994.html 一.随笔引言 1.1随笔内容: 1.RedHat 配置Centos yum源 2.yu ...

随机推荐

  1. 《Linux内核设计与实现》Chapter 5 读书笔记

    <Linux内核设计与实现>Chapter 5 读书笔记 在现代操作系统中,内核提供了用户进程与内核进行交互的一组接口,这些接口的作用是: 使应用程序受限地访问硬件设备 提供创建新进程与已 ...

  2. Answer My Questions

    回答自己的问题,真棒!断电让自己的工作重来.真棒! 阅读以前自己的博客,发现问题都已经有了答案. (1).想要成为一名专业的软件工程师,首先得是有相关的资格证书,这个可以通过软考获得.然后在职场中锻炼 ...

  3. WPF使用路径(URI)引用资源文件

    Uri uri = new Uri("pack://application:,,,/程序集名称;component/Resources/bj.png", UriKind.Absol ...

  4. ElasticSearch 2 (21) - 语言处理系列之单词识别

    ElasticSearch 2 (21) - 语言处理系列之单词识别 摘要 一个英语单词相对容易识别:因为英语单词是被空格或(某些)标点符号隔开的.但在英语中也有反例:you're 这个词是一个单词还 ...

  5. ElasticSearch 2 (16) - 深入搜索系列之近似度匹配

    ElasticSearch 2 (16) - 深入搜索系列之近似度匹配 摘要 标准的全文搜索使用TF/IDF处理文档.文档里的每个字段或一袋子词.match 查询可以告诉我们哪个袋子里面包含我们搜索的 ...

  6. git如何删除已经 add 的文件 (如何撤销已放入缓存区文件的修改)

    使用 git rm 命令即可,有两种选择, 一种是 git rm –cached “文件路径”,不删除物理文件,仅将该文件从缓存中删除: 一种是 git rm –f “文件路径”,不仅将该文件从缓存中 ...

  7. OneZero第三次站立会议(2016.3.23)

    会议时间:2016年3月23日 13:00~13:15 会议成员:冉华,张敏,王巍,夏一鸣. 会议目的:汇报前一天工作,全体成员评论并修改. 会议内容:以下为会议插图 1.界面原型方面,夏在统计界面中 ...

  8. luogu1312

    有趣的题面 超有趣的dfs大模拟,码了巨久,卡时过了此题qaq #include <cstdio> #include <cstring> #include <algori ...

  9. SSM 中 BaseController 使用 session

    转载: http://blog.sina.com.cn/s/blog_7085382f0102v9jg.html public class BaseController { //region Http ...

  10. suse11/12关闭防火墙

    suse11关闭操作为:service SuSEfirewall2_setup stopservice SuSEfirewall2_init  stop 取消开机启动防火墙:chkconfig SuS ...