首页 > 编程知识 正文

如何配置yum源,centos7更换阿里yum源

时间:2023-05-05 16:09:51 阅读:141235 作者:1083

阿里的yum源备份cd /etc/yum.repos.d/

mkdir bak

mv * ./bak/

阿里yum来源wget-o/etc/yum.repos.d/centos-base.repo http://mirrors.a liyun.com/repo/Centos-7.repo配置缓存yum clean allyum makecache配置蚂蚁Epel源配置文件Epel (外部特殊界面)

配置方法1 .备份(如果配置了其他epel源) mv/etc/yum.repos.d/epel.repo/etc/yum.repos.d/epel.repo.backup mv/backup

[ root @ open shift-etcdyum.repos.d ] # rpm-QA|grepepelepel-release-7-13.noarch [ root @ open shift-etcdyum ] rpm-e-- nodepsepel-release-7-13.noarch warning : file/etc/yum.repos.d/epel.repo : remove failed : yum.repos.d/epel-testing.repo : remove failed : nosuchfileordirectory3.将新repo更新为/etc/yum.repos.d/epel

1 )安装epel配置软件包

um install-y https://mirrors.a liyun.com/epel/epel-release-latest-7.noarch.rpm2)将repo配置中的地址设置为AlibabaCloud

sed-I ' s|^ # base URL=http://download.fedora project.org/pub|base URL=https://mirrors.a liyun.com|'/etc/yum

wget-o/etc/yum.repos.d/epel.repo http://mirrors.a liyun.com/repo/epel-7.repoepel (rhel6) ) ) ) )

wget-o/etc/yum.repos.d/epel.repo http://mirrors.a liyun.com/repo/epel-6.repoepel (rhel5) ) ) ) )

wget-o/etc/yum.repos.d/epel.repo http://mirrors.a liyun.com/repo/epel-5.repo

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。