CentOS修改yum源为Aliyun
来源:互联网 发布:win10网络共享密码设置 编辑:程序博客网 时间:2024/06/10 10:52
1、备份系统自带的yum源
[root@ ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载和自己操作系统版本对应的yum源
[root@ ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2573 100 2573 0 0 11103 0 --:--:-- --:--:-- --:--:-- 11090
3、运行yum makecache生成缓存
[root@yaxon ~]# yum makecache
已加载插件:fastestmirror
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/8): extras/7/x86_64/prestodelta | 48 kB 00:00:00
(2/8): extras/7/x86_64/other_db | 86 kB 00:00:01
(3/8): extras/7/x86_64/filelists_db | 485 kB 00:00:08
(4/8): updates/7/x86_64/prestodelta | 399 kB 00:00:07
(5/8): updates/7/x86_64/other_db | 341 kB 00:00:05
(6/8): updates/7/x86_64/filelists_db | 2.1 MB 00:00:27
(7/8): base/7/x86_64/other_db | 2.5 MB 00:00:30
(8/8): base/7/x86_64/filelists_db | 6.7 MB 00:00:45
Loading mirror speeds from cached hostfile
* base: mirrors.aliyuncs.com
* extras: mirrors.aliyuncs.com
* updates: mirrors.aliyuncs.com
元数据缓存已建立
4、vim /etc/yum.repos.d/CentOS-Base.repo
查看里面的内容,确实已经由系统自带的yum源替换为了阿里的yum源了
5、yum install iotop
[root@~]# yum install iotop
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyuncs.com
* extras: mirrors.aliyuncs.com
* updates: mirrors.aliyuncs.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 iotop.noarch.0.0.6-2.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
===============================================================================================================================================================================================
Package 架构 版本 源 大小
===============================================================================================================================================================================================
正在安装:
iotop noarch 0.6-2.el7 base 52 k
事务概要
===============================================================================================================================================================================================
安装 1 软件包
总下载量:52 k
安装大小:156 k
Is this ok [y/d/N]: y
Downloading packages:
iotop-0.6-2.el7.noarch.rpm | 52 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : iotop-0.6-2.el7.noarch 1/1
验证中 : iotop-0.6-2.el7.noarch 1/1
已安装:
iotop.noarch 0:0.6-2.el7
完毕!
- CentOS修改yum源为Aliyun
- aliyun的CentOS yum源
- centos 配置 aliyun yum源
- CentOS 7配置aliyun的yum源
- CentOS 修改yum源为国内源
- CentOS 修改yum源为国内源
- CentOS 修改yum源为国内源
- CentOS 修改yum源为国内源
- CentOS 修改yum源为国内源
- CentOS 修改yum源为国内源
- 修改CentOS的yum源为163
- 修改CentOS的yum源为163
- 修改RedHat的yum源为CentOS的yum源
- 修改CentOS默认yum源为国内yum镜像源
- aliyun linux 5.7更换使用centos的yum源
- CentOS更换国内yum源(aliyun阿里镜像)
- 配置yum源aliyun
- 修改CentOS yum源
- 单元测试 testng.xml load class not found
- 模型检验概述
- (DT系列三)系统启动时, dts 是怎么被加载的
- C++中 explicit的用法
- scipy-图像操作
- CentOS修改yum源为Aliyun
- 如何生成高程剖面图
- 【HDU 5023】A Corrupt Mayor's Performance Art 【线段树+状态压缩】
- 修改centos7的系统编码为"en_US.UTF-8"
- JAVA_编程小案例_打印菱形
- easyui datagrid前台传值后台乱码
- [java]Java使用占位符拼接字符串
- js获取服务器时间
- markdown数学公式手册