CentOS配置源
一、源列表
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配置源的更多相关文章
- CentOS配置源、wget、ifconfig基础环境
执行命令: curl http://10.200.0.14:8000/portal.cgi -X POST -d 'username=lishuai&password=test@cetc38& ...
- centos yum源配置 与yum配置文件
参考博客 http://www.cnblogs.com/mchina/archive/2013/01/04/2842275.html 1.centos . yum配置文件在目录 /etc/yum.re ...
- CentOS配置yum源(补充)
这是对yum命令的补充 Yum命令 一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yu ...
- CentOS配置本地yum源/阿里云yum源/163yuan源,并配置yum源的优先级
一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yum源替换成aliyun的yum源或者 ...
- RHEL6配置CentOS yum源
RHEL6配置CentOS yum源
- CentOS、RHEL、Asianux、Neokylin、湖南麒麟、BC Linux、普华、EulerOS请参考“1.1 CentOS本地源配置”;
本文档适用于CentOS.RHEL.Asianux.Neokylin.湖南麒麟.BC Linux.普华.EulerOS.SLES.Ubuntu.Deepin.银河麒麟. CentOS.RHEL.A ...
- Centos配置yum本地源最简单的办法
有关centos配置yum本地源的方法 一.前提 先连接镜像 然后在命令行输入如下命令 mount /dev/sr0 /mnt cd /etc/yum.repos.d/ ls 之后会看到如下的界面 二 ...
- Linux配置mysql (centos配置java环境 mysql配置篇 总结四)
♣安装的几种方法和比较 ♣配置yum源 ♣安装mysql ♣启动mysql ♣修改密码 ♣导入.sql文件 ♣缓存设置 ♣允许远程登录(navicat) ♣配置编码为utf8 1.关于Linux系统 ...
- RedHat 更新CentOS Yum源(转)
经测试,可用.转自:https://www.cnblogs.com/tangsen/p/5151994.html 一.随笔引言 1.1随笔内容: 1.RedHat 配置Centos yum源 2.yu ...
随机推荐
- it喜爱的歌词
1.曼丽 我们的过去我们的情义怎么能忘记 #曼丽你怎么这样忍心静静的就离去 #我很伤心从今以后不能够见到你 #只有留下你往日的情景使我常回忆 #一样的青山一样的绿水只有我和你 #曼丽可记得我们时常快 ...
- PAT甲题题解-1009. Product of Polynomials (25)-多项式相乘
多项式相乘 注意相乘结果的多项式要开两倍的大小!!! #include <iostream> #include <cstdio> #include <algorithm& ...
- Alpha版本发布时间安排
Alpha版本发布截止时间:2014年11月23日 第一轮迭代M1报告时间:2014年11月27日课上 - 每个团队5分钟时间汇报,5分钟时间提问 第一轮迭代M1事后分析报告时间:2014年11月29 ...
- 冲刺Two之站立会议8
今天对软件进行了用户试用,找了一些同学让他们试用软件之后对软件给出了建议,这样我们可以在一定程度上对它进行进一步地优化.
- Leetcode题库——48.旋转图像
@author: ZZQ @software: PyCharm @file: rotate.py @time: 2018/11/16 15:41 要求:给定一个 n × n 的二维矩阵表示一个图像.将 ...
- 初学Hadoop之单机模式环境搭建
本文仅作为学习笔记,供大家初学Hadoop时学习参考.初学Hadoop,欢迎有经验的朋友进行指导与交流! 1.安装CentOS7 准备 CentOS系统镜像CentOS-7.0-1406-x86_64 ...
- 『编程题全队』Beta 阶段冲刺博客集合
『编程题全队』Beta 阶段冲刺博客集合 »敏捷冲刺 日期:2018.5.23 博客连接:『编程题全队』Scrum 冲刺博客 »Day1 日期:2018.5.23 博客连接:『编程题全队』Beta 阶 ...
- Windows 防火墙出站 入站规则简单说明
1. Windows防火墙其实比linux的iptabels 要好用一些. 打开设置方式: 运行->输入control即可 选择系统和安全 2.win2019 以及改名字了 现在是 window ...
- 消息队列1:RabbitMQ解析并基于Springboot实战
RabbitMQ简介 AMQP:Advanced Message Queue,高级消息队列协议.它是应用层协议的一个开放标准,为面向消息的中间件设计,基于此协议的客户端与消息中间件可传递消息,并不受产 ...
- SSH-keygen用法
很多朋友在用github管理项目的时候,都是直接使用https url克隆到本地,当然也有有些人使用 SSH url 克隆到本地.然而,为什么绝大多数人会使用https url克隆呢? 这是因为,使用 ...