美文网首页
CentOS 7 安装阿里yum源

CentOS 7 安装阿里yum源

作者: 风静花犹落 | 来源:发表于2020-10-18 16:36 被阅读0次

方法一:yum命令安装

yum install -y epel-release

方法二:手动安装

1. 执行命令

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

该命表示把Centos-7.repo下载到/etc/yum.repos.d/目录下,如果该目录下有CentOS-Base.repo,则会自动覆盖。

2. 缓存清理

yum clean all

3. 生成缓存

yum makecache

相关文章

网友评论

      本文标题:CentOS 7 安装阿里yum源

      本文链接:https://www.haomeiwen.com/subject/lmscmktx.html