CentOS 7 配置阿里云本地yum源

删除原有的yum源:

rm -f /etc/yum.repos.d/*

重新下载阿里云的yum源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

wget -O 可自行百度

列出yum各软件包:

yum list

清除缓存:

yum clean all

如果没安装wget ,yum也还没配置好,可以直接浏览器下载后上传至/etc/yum.repos.d 并改名为 CentOS-Base.repo

下载地址:
http://mirrors.aliyun.com/repo/Centos-7.repo
至此,本地yum已配置好,可以开始使用yum一键安装软件啦!

猜你喜欢

转载自www.cnblogs.com/itshuan/p/10735039.html