当前位置:首页 » 《我的小黑屋》 » 正文

redhat linux 8 安装 阿里云centos-8 yum源(网络yum源配置)

7 人参与  2024年05月14日 15:59  分类 : 《我的小黑屋》  评论

点击全文阅读


1、起因:

使用redhat自带镜像yum源安装软件时,报错:unable to read consumer identity。这个提示告诉我们,yum没有读取到你的用户id。如果你想使用redhat同步不想花费几千元注册系统,就可以使用centos的yum源来代替。

2、centos-8 yum网络源配置

        2.1、访问阿里云镜像站,下载repo镜像下载页
        地址:https://mirrors.aliyun.com/repo/
        下载:Centos-8.repo
        打开所下载的centos-8.repo,上传至/etc/yum.repos.d/目录下

[root@server130 yum.repos.d]# cat Centos-8.repo # CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client.  You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead.## [base]name=CentOS-$releasever - Base - mirrors.aliyun.com#failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/        http://mirrors.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/        http://mirrors.cloud.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official #additional packages that may be useful[extras]name=CentOS-$releasever - Extras - mirrors.aliyun.com#failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/os/        http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/os/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official #additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plus - mirrors.aliyun.com#failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/os/        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/        http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/gpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official [PowerTools]name=CentOS-$releasever - PowerTools - mirrors.aliyun.com#failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos/$releasever/PowerTools/$basearch/os/        http://mirrors.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/        http://mirrors.cloud.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/gpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official[AppStream]name=CentOS-$releasever - AppStream - mirrors.aliyun.com#failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/        http://mirrors.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/        http://mirrors.cloud.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

        2.2、直接在服务器上直接wget下载repo配置文件至/etc/yum.repos.d/目录下

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

3、清除yum缓存

[root@server130 yum.repos.d]# yum clean allUpdating Subscription Management repositories.Unable to read consumer identityThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.18 files removed

4、缓存包信息

[root@server130 yum.repos.d]# yum makecacheUpdating Subscription Management repositories.Unable to read consumer identityThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.CentOS-8 - Base - mirrors.aliyun.com               3.2 MB/s | 4.6 MB     00:01    CentOS-8 - Extras - mirrors.aliyun.com              22 kB/s |  10 kB     00:00    CentOS-8 - AppStream - mirrors.aliyun.com          3.4 MB/s | 8.4 MB     00:02    Metadata cache created.

5、查看配置的yum仓库

[root@server130 yum.repos.d]# yum repolist allUpdating Subscription Management repositories.Unable to read consumer identityThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.repo id              repo name                                             statusAppStream            CentOS-8 - AppStream - mirrors.aliyun.com             enabledPowerTools           CentOS-8 - PowerTools - mirrors.aliyun.com            disabledbase                 CentOS-8 - Base - mirrors.aliyun.com                  enabledcentosplus           CentOS-8 - Plus - mirrors.aliyun.com                  disabledextras               CentOS-8 - Extras - mirrors.aliyun.com                enabled


点击全文阅读


本文链接:http://zhangshiyu.com/post/108488.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最新文章

  • 新章速递养大的反派疯魔了是什么小说(江曜姬时语)完本阅读无广告(江曜姬时语)
  • 爱,一触就破无广告_妹妹夏夏孟夏人气小说_小说后续在线阅读_无删减免费完结_
  • 他死后前妻疯魔了彩蛋(顾煜迟林筱棠)全书在线下载阅读完美终章小说大结局
  • 此后锦书休寄周窈音全文最新章节(周窈音)全文免费阅读无弹窗大结局_周窈音免费阅读
  • 弹幕说我是捞女?反手收购男主公司养鸡(林朝曦沈墨川)_弹幕说我是捞女?反手收购男主公司养鸡
  • 没给寡嫂抢到La******,老公把我和儿子做成蜡像(顾云州沈云烟)_没给寡嫂抢到La******,老公把我和儿子做成蜡像顾云州沈云烟
  • 出狱后,假千金靠玄术杀疯了(顾九音霍霆修)_出狱后,假千金靠玄术杀疯了
  • 养妹偷我认亲玉佩当上千金,男友当场分手超长版_玉佩陈雨柔养父母一口气看完_小说后续在线阅读_无删减免费完结_
  • 抽卡后,气运之子怎么都缠上来了小说(夏挽棠)(抽卡后,气运之子怎么都缠上来了)全书+后续+结局在线阅读
  • 前传爱意随风消逝续集:全文+番外乔清浅宋轻舟:结局+番外新上热文
  • 宋昭黎陆铭绪(假如从没拥抱你)前文+全本完整阅读预售作品抢先看
  • 终章小说搬空海港!我携军舰嫁军官躺赢了完结篇(温婉历战)已更新+延伸(搬空海港!我携军舰嫁军官躺赢了)清爽版

    关于我们 | 我要投稿 | 免责申明

    Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1