对不起,如果这是一个非常基本的问题,但我从来没有真正需要深入研究百胜/dnf。
历史:当停止更新时,我重新构建了一个运行Centos 7的服务器。我没有那么重视我的构建,只是下载了网络安装,并使用它来加载我所需要的一切。
我确实注意到没有更新发生,并发现了一些提示更新流丢失在基本发行版中的东西。我按照说明添加了这一点,并获得了许多更新。
我还从一张完整的DVD映像中加载了一个VM在我的笔记本上。
现在:在我的服务器上看不到任何更新。有一段时间没有了。这听起来很奇怪。它似乎也是8.0,而VM版本是8.2,而且它确实会得到更新。
当我列出存储库时,会有轻微的不同;
服务器:
# yum repolist enabled
repo id repo name
appstream CentOS Stream 8 - AppStream
baseos CentOS Stream 8 - BaseOS
epel Extra Packages for Enterprise Linux 8 - x86_64
epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64
extras CentOS Stream 8 - ExtrasVM:
# yum repolist
repo id repo name
AppStream CentOS-8 - AppStream
BaseOS CentOS-8 - Base
extras CentOS-8 - Extras
google-chrome google-chromeVM不需要epel回购,所以这是可以的。但基本回购的清单是不同的..。
有人能告诉我如何为我的服务器安装正确的回复吗?(重建并不是一种选择-在升级之后,一切恢复正常所需的时间太长了)。
试着更新,我一直都看到这个:
# dnf update
Last metadata expiration check: 2:20:32 ago on Sun 29 Nov 2020 11:18:48 AM PST.
Dependencies resolved.
Nothing to do.
Complete!日志输出:
2020-11-29T21:39:19Z DDEBUG Command: dnf update
2020-11-29T21:39:19Z DDEBUG Installroot: /
2020-11-29T21:39:19Z DDEBUG Releasever: 8
2020-11-29T21:39:19Z DEBUG cachedir: /var/cache/dnf
2020-11-29T21:39:19Z DDEBUG Base command: update
2020-11-29T21:39:19Z DDEBUG Extra commands: ['update']
2020-11-29T21:39:19Z DEBUG User-Agent: constructed: 'libdnf (CentOS Stream 8; generic; Linux.x86_64)'
2020-11-29T21:39:19Z DEBUG repo: using cache for: appstream
2020-11-29T21:39:19Z DEBUG appstream: using metadata from Thu 29 Oct 2020 06:52:17 PM PDT.
2020-11-29T21:39:19Z DEBUG repo: using cache for: baseos
2020-11-29T21:39:19Z DEBUG baseos: using metadata from Thu 29 Oct 2020 06:52:12 PM PDT.
2020-11-29T21:39:19Z DEBUG repo: using cache for: extras
2020-11-29T21:39:19Z DEBUG extras: using metadata from Fri 10 Jul 2020 07:19:28 AM PDT.
2020-11-29T21:39:20Z DEBUG repo: using cache for: epel-modular
2020-11-29T21:39:20Z DEBUG epel-modular: using metadata from Mon 16 Nov 2020 06:30:02 PM PST.
2020-11-29T21:39:20Z DEBUG repo: using cache for: epel
2020-11-29T21:39:20Z DEBUG epel: using metadata from Sat 28 Nov 2020 05:04:32 PM PST.
2020-11-29T21:39:20Z INFO Last metadata expiration check: 2:20:32 ago on Sun 29 Nov 2020 11:18:48 AM PST.
2020-11-29T21:39:20Z DDEBUG timer: sack setup: 420 ms
2020-11-29T21:39:20Z DEBUG Completion plugin: Generating completion cache...
2020-11-29T21:39:20Z DEBUG --> Starting dependency resolution
2020-11-29T21:39:20Z DEBUG --> Finished dependency resolution
2020-11-29T21:39:20Z DDEBUG timer: depsolve: 108 ms
2020-11-29T21:39:20Z INFO Dependencies resolved.
2020-11-29T21:39:20Z INFO Nothing to do.
2020-11-29T21:39:20Z INFO Complete!
2020-11-29T21:39:20Z DDEBUG Cleaning up.# cat /etc/*-release
CentOS Stream release 8
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"# grep -rH enabled=1 /etc/yum.repos.d/*
/etc/yum.repos.d/CentOS-Stream-AppStream.repo:enabled=1
/etc/yum.repos.d/CentOS-Stream-BaseOS.repo:enabled=1
/etc/yum.repos.d/CentOS-Stream-Extras.repo:enabled=1
/etc/yum.repos.d/epel-modular.repo:enabled=1
/etc/yum.repos.d/epel.repo:enabled=1请注意,这与我的VM有何不同:
# grep -rH enabled=1 /etc/yum.repos.d/*
/etc/yum.repos.d/CentOS-AppStream.repo:enabled=1
/etc/yum.repos.d/CentOS-Base.repo:enabled=1
/etc/yum.repos.d/CentOS-Extras.repo:enabled=1
/etc/yum.repos.d/epel-modular.repo:enabled=1
/etc/yum.repos.d/epel.repo:enabled=1
/etc/yum.repos.d/google-chrome.repo:enabled=1镜表
关于VM:
# find /var -name mirrorlist
/var/cache/PackageKit/8/metadata/AppStream-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/BaseOS-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/extras-8-x86_64/mirrorlist
/var/cache/dnf/AppStream-a520ed22b0a8a736/mirrorlist
/var/cache/dnf/BaseOS-929b586ef1f72f69/mirrorlist
/var/cache/dnf/extras-2770d521ba03e231/mirrorlist
# find /var -name mirrorlist -exec cat {} \;
http://mirror.centos.org/centos/8/AppStream/x86_64/os/
http://mirror.centos.org/centos/8/BaseOS/x86_64/os/
http://mirror.centos.org/centos/8/extras/x86_64/os/
http://mirror.centos.org/centos/8/AppStream/x86_64/os/
http://mirror.centos.org/centos/8/BaseOS/x86_64/os/
http://mirror.centos.org/centos/8/extras/x86_64/os/在服务器上:
# find /var -name mirrorlist
/var/cache/PackageKit/8/metadata/AppStream-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/BaseOS-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/extras-8-x86_64/mirrorlist
/var/cache/dnf/appstream-773ef6463612e8e2/mirrorlist
/var/cache/dnf/baseos-055ffcb2ec25a27f/mirrorlist
/var/cache/dnf/extras-9705a089504ff150/mirrorlist
# find /var -name mirrorlist -exec cat {} \;
http://mirror.cc.columbia.edu/pub/linux/centos/8.2.2004/AppStream/x86_64/os/
http://repo.miserver.it.umich.edu/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.mojohost.com/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.genesisadaptive.com/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.san.fastserv.com/pub/linux/centos/8.2.2004/AppStream/x86_64/os/
http://mirrors.usinternet.com/centos/8.2.2004/AppStream/x86_64/os/
http://repos.lax.layerhost.com/centos/8.2.2004/AppStream/x86_64/os/
http://ewr.edge.kernel.org/centos/8.2.2004/AppStream/x86_64/os/
http://repo1.dal.innoscale.net/centos/8.2.2004/AppStream/x86_64/os/
http://mirrors.xtom.com/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.nodesdirect.com/centos/8.2.2004/BaseOS/x86_64/os/
http://distro.ibiblio.org/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.linux.duke.edu/pub/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.mojohost.com/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.sfo12.us.leaseweb.net/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.sesp.northwestern.edu/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.trouble-free.net/centos/8.2.2004/BaseOS/x86_64/os/
http://ftp.osuosl.org/pub/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.web-ster.com/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.rackspace.com/CentOS/8.2.2004/BaseOS/x86_64/os/
http://mirror.ette.biz/centos/8.2.2004/extras/x86_64/os/
http://mirror.wdc1.us.leaseweb.net/centos/8.2.2004/extras/x86_64/os/
http://mirror.rackspace.com/CentOS/8.2.2004/extras/x86_64/os/
http://mirror.vcu.edu/pub/gnu_linux/centos/8.2.2004/extras/x86_64/os/
http://mirrors.raystedman.org/centos/8.2.2004/extras/x86_64/os/
http://ftp.osuosl.org/pub/centos/8.2.2004/extras/x86_64/os/
http://centos.mirror.constant.com/8.2.2004/extras/x86_64/os/
http://us.mirror.nsec.pt/centos/8.2.2004/extras/x86_64/os/
http://mirror.oss.ou.edu/centos/8.2.2004/extras/x86_64/os/
http://mirror.sesp.northwestern.edu/centos/8.2.2004/extras/x86_64/os/
http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/
http://mirror.centos.org/centos/8-stream/extras/x86_64/os/所以完全不同..。
.repo文件的内容(仅列出Centos文件,而不是epel):
/etc/yum.repos.d/CentOS-Stream-AppStream.repo:
# CentOS-Stream-AppStream.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.
[appstream]
name=CentOS Stream $releasever - AppStream
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-BaseOS.repo:
# CentOS-Stream-BaseOS.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.
[baseos]
name=CentOS Stream $releasever - BaseOS
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=BaseOS&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-Debuginfo.repo:
# CentOS-Stream-Debuginfo.repo
#
# All debug packages are merged into a single repo, split by basearch, and are
# not signed.
[debuginfo]
name=CentOS Stream $releasever - Debuginfo
baseurl=http://debuginfo.centos.org/$stream/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-Extras.repo:
# CentOS-Stream-Extras.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.
[extras]
name=CentOS Stream $releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/extras/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-HighAvailability.repo:
# CentOS-Stream-HighAvailability.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.
[ha]
name=CentOS Stream $releasever - HighAvailability
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=HighAvailability&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/HighAvailability/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-Media.repo:
# CentOS-Stream-Media.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.
[media-baseos]
name=CentOS Stream $releasever - Media - BaseOS
baseurl=file:///media/CentOS/BaseOS
file:///media/cdrom/BaseOS
file:///media/cdrecorder/BaseOS
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[media-appstream]
name=CentOS Stream $releasever - Media - AppStream
baseurl=file:///media/CentOS/AppStream
file:///media/cdrom/AppStream
file:///media/cdrecorder/AppStream
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-Plus.repo:
# CentOS-Stream-Plus.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.
[plus]
name=CentOS Stream $releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-PowerTools.repo:
# CentOS-Stream-PowerTools.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.
[powertools]
name=CentOS Stream $releasever - PowerTools
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=PowerTools&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------
/etc/yum.repos.d/CentOS-Stream-RealTime.repo:
# CentOS-Stream-RealTime.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.
[rt]
name=CentOS Stream $releasever - RealTime
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=RT&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/RT/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------发布于 2020-11-30 04:04:31
来自RHEL 8文件:
RHEL 8内容通过两个主要存储库分发: BaseOS和AppStream。BaseOS存储库中的BaseOS内容旨在提供底层OS功能的核心集,为所有安装提供基础。此内容以RPM格式提供,并受类似于以前版本的支持条件的限制。AppStream存储库中的AppStream内容包括额外的用户空间应用程序、运行时语言和数据库,以支持各种工作负载和用例。AppStream中的内容有两种格式之一--熟悉的RPM格式和称为模块的RPM格式的扩展。
发布于 2022-01-31 15:51:59
一个快速的解决方案是为每个回购添加<#> $releasever和-stream,这样就无法获得镜像列表,例如:
mirrorlist.centos.org/?release=$releasever-stream ...就像这样,
[BaseOS]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever-stream&arch=$basearch&repo=BaseOS&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial发布于 2021-02-03 22:43:03
您的服务器正在运行"Centos 8流“。您的VM正在运行传统的"Centos 8“。
你问的有什么不同?Centos传统上一直是RHEL的下游,从而产生了一个稳定的、具有生产能力的OS。这一流程限制了其他开发人员贡献有利于RHEL产品的代码的能力。通过将CentOS移动到RHEL的上游,Red可以更容易地允许这些贡献,这将流下来,最终使RHEL受益。CentOS流现在位于Fedora和RHEL之间,对传统CentOS产品的支持即将结束。
维基百科:
在2020年12月,红帽和CentOS董事会宣布CentOS Linux的开发将于2021年年底结束。然而,CentOS项目将继续生产相关的不断交付的发行版CentOS流。
寿命结束日期:
CentOS 8的所有更新将于2021年12月31日结束。然而,CentOS 7将继续收到维护更新,直到2024年6月30日。
https://wiki.centos.org/About/Product
正在进行一些项目,以创建用于生产环境的备用下游发行版(例如Rocky Linux-https://rockylinux.org/)。但是,在它们完成之前,您只有几个选项:
这可能对一些用户有效,但我相信很多人都坚持使用Rocky,希望它能取代传统的CentOS。
https://unix.stackexchange.com/questions/622103
复制相似问题