首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从DVD到web交换yum repos

如何从DVD到web交换yum repos
EN

Unix & Linux用户
提问于 2023-02-22 14:12:40
回答 1查看 62关注 0票数 0

我必须将一些系统从Centos8.0迁移到RHEL8.7,因此,我准备运行convert2rhel,因此,在此之前,我希望升级到Centos8.5

该系统安装于2019年,从一张dvd (8.0.1905)的centos 8开始,从那时起,它一直通过当地的镜子生活。

当我在本地8.5镜像上运行yum update时,它似乎可以工作,但是localAppstream中的一堆依赖包将被删除为“不需要”。

如何告诉yum使用appstream中的最新版本从localAppstream升级包?

我尝试了yum swap,甚至和yum shell进行了一次yum交易,就像在https://unix.stackexchange.com/a/158588/358922中一样,没有运气:-(

EN

回答 1

Unix & Linux用户

发布于 2023-02-22 19:37:03

CentOS是免费的,而这些存储库并不只是迁移到RHEL中。

对于RHEL,您将使用subscription-manager注册您的系统,基于已付费的redhat许可证。在这样做时,它将更新您的/etc/yum.repos.d/redhat.repo文件,该文件很可能是当前为空的。然后它将获得大约100个条目,其中许多将是enabled = 0,但是当使用有付费许可时将启用的基本功能如下所示

代码语言:javascript
复制
[rhel-8-for-x86_64-baseos-rpms]
name = Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/baseos/os

[rhel-8-for-x86_64-appstream-rpms]
name = Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/appstream/os

[codeready-builder-for-rhel-8-x86_64-rpms]
name = Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/codeready-builder/os
  • 建立本地存储库(如/root/repo/ )的快速描述
    • 将rpm文件复制到/root/repo
    • createrepo /root/repo
    • 创建/etc/yum.repos.d/localrepo.repo,其内容与上面的内容类似,但
      • baseurl条目更改为= file:///root/repo
      • 您可以从heil-8.7-x86_64-dvd.iso 的内容中进行本地回购。
        • mkdir /root/repo/rhel8.7; mkdir /root/repo/temp
        • mount -o loop rhel-8.7-x86_64-dvd.iso /root/repo/temp
        • cp -r /root/repo/temp /root/repo/rhel8.7
        • umount /root/repo/temp; rmdir /root/repo/temp
        • /etc/yum.repos.d/whatevername.repo中有baseurl=file:///root/repo/rhel8.7

当然还有免费的EPEL (企业linux的额外软件包)。

https://docs.fedoraproject.org/en-US/epel/

请参阅页面上的epel-release-latest-8链接,获取将为您设置/etc/yum.repos.d/epel.repoepel-release-latest-8.noarch.rpm

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/736470

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档