1.备份本地yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2.获取阿里yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.更新cache
yum makecache
4.安装
yum -y update
本文详细介绍了如何将CentOS系统的本地YUM源更换为阿里云提供的YUM源,包括备份本地源、获取阿里云源配置文件、更新缓存及系统升级等步骤,适用于需要优化CentOS软件包管理的用户。
1.备份本地yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2.获取阿里yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.更新cache
yum makecache
4.安装
yum -y update
转载于:https://www.cnblogs.com/zsh-blogs/p/11497395.html
1144

被折叠的 条评论
为什么被折叠?