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 ...
随机推荐
- c++实现计算器功能 -----初代
由于时间问题,我就写的简单一点. 课程作业一 git链接: Operations 里面的Operations.cpp文件就是完成品. 1 我就简单的对我原来的代码进行了重构,原本的代码已经把函数都分得 ...
- Daily Scrum - 11/16
时间:午饭 今天小组例会主要是汇报了各自的进度.任烁那边主要为工程添加了单词的类(包含各个参数等成员变量),方便以后实现算法:拜重阳实现了一个简易的“点进-点出”UI,可谓迈出了艰难的第一步:章玮和罗 ...
- 2013 C#单元测试
首先安装Unit Test Generator. 点击拓展和更新——>联机搜索Unit Test Generator 新建项目 新建一个测试类 add函数 选定test 类名 ——>右键 ...
- 团队作业之旅游行业APP分析
随着经济的发展,不论是在工作中的男女老少,还是在校园中的童鞋,都喜欢在假期来一场说走就走的旅行,来缓解生活中的各种压力.当然,在国家面临经济转型的情况下,更多的将工业,农业转向服务型的旅游业,各个省市 ...
- 移动的调试工具vConsole
在PC端写代码调试的时候,直接console.log()即可,但是在手机端怎么调试??最近发现一个很有用的插件vConsole 首先引入插件: 然后再文件中使用即可: 这样再手机中就会出现下面的标识, ...
- JDK7新特性try-with-resources语句
try-with-resources语句是一种声明了一种或多种资源的try语句.资源是指在程序用完了之后必须要关闭的对象.try-with-resources语句保证了每个声明了的资源在语句结束的时候 ...
- salt-api安装以及简单实使用
1.安装说明 操作系统版本:CentOS Linux release 7.5.1804 (Core) saltstack版本:2018.3.2 已经关闭selinux.firewalld服务. 2.配 ...
- MySQL 主从复制详解
读写分离的意思是,写入的时候向 a 服务器写入,而读出的时候从 b c d 甚至更多的服务器读出:这样的架构适合于读多写少的应用,最典型的就是火车购票系统,一般我们买票的时候要先查询好多次,包括车次啊 ...
- Chemical table CodeForces - 1012B
题意: 一个棋盘 对于任何一个棋盘中的矩形 如果 任意三角存在棋子 则第四个角会自动生成一个棋子 求铺满整个棋盘 我们至少要向棋盘里加多少枚棋子 解析: 这题就是求图中有多少个连通图,可以直接dfs ...
- Mybatis.xml文件中大于小于等于
第一种写法: 原符号 < <= > >= & ' "替换符号 < <= > >= & ' "例如: ...