Yellow dog Updater(Yum)是CentOS所有版本的默认包管理器,yum主要功能是更方便的添加/删除/更新RPM包,自动解决包的依赖性问题,便于管理大量系统的更新问题,其理念是使用一个中心仓库(repository)管理一部分甚至一个distribution的应用程序相互关系,根据计算出来的软件依赖关系进行相关的升级、安装、删除等操作,减少了Linux用户一直头痛的dependencies的问题。可以同时配置多个资源库(Repository),简洁的配置文件(/etc/yum.conf),自动解决增加或删除rpm包时遇到的依赖性问题,保持与RPM数据库的一致性。
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 或mv /etc/yum/repos.d/CentOS-Base.repo{,.date -I}
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、添加EPEL
CentOS 6 wget -O /etc/yum.repos.d/epel-6.repo http://mirrors.aliyun.com/repo/epel-6.repo CentOS 7 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all yum makecache
Copyright © 2021-2024 uvidc.com All Rights Reserved. 优维数据 版权所有 揭阳市美淘网络科技有限公司 粤ICP备2020081438号
营业执照 | 粤公网安备 44520202000380号 | 中华人民共和国增值电信业务许可证号:B1-20212500 | 工信部备案: 粤ICP备2020081438号
声明:本平台所有机器禁止用于攻击测试、博彩、色情、空间、小说、外挂、病毒、诈骗、钓鱼、VPN、VOIP、挖矿等违法违规用途,一经发现,立即永久关闭并且联合相关单位处理,概不退款。