In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to configure domestic sources in yum/dnf in CentOS8". The content is simple and easy to understand, and the organization is clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn this article "how to configure domestic sources in yum/dnf in CentOS8".
CentOS 8 changed the installer for packages, removing the yum configuration method and using dnf instead. Although this changes the way packages are installed, dnf is compatible with the configuration files and commands used with yum. However, I don't know how long this compatible configuration will last and whether the path of the domestic mirror (here used is Alibaba Cloud Mirror) will be modified, so I added a temporary flag to the title.
There is no need to explain too much here, directly on the file:
# file: /etc/yum.repos.d/CentOS-AppStream.repo[AppStream]name=CentOS-$releasever - AppStreambaseurl=http://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialCopy# file: /etc/yum.repos.d/CentOS-Base.repo[BaseOS]name=CentOS-$releasever - Basebaseurl=http://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialCopy# file: /etc/yum.repos.d/CentOS-Epel.repo[epel]name=CentOS-$releasever - Epelbaseurl=http://mirrors.aliyun.com/epel/8/Everything/$basearchenabled=1gpgcheck=0Copy# file: /etc/yum.repos.d/CentOS-Media.repo[c8-media-BaseOS]name=CentOS-BaseOS-$releasever - Mediabaseurl=file:///media/CentOS/BaseOS/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[c8-media-AppStream]name=CentOS-AppStream-$releasever - Mediabaseurl=file:///media/CentOS/AppStream/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Note: CentOS-Media configuration needs to mount the CD to the/media/CentOS path, otherwise an error will be reported when using it.
Then execute the following command:
dnf clean all #Clear all cache files dnf makecache #Make metadata cache The above is "CentOS8 yum/dnf how to configure domestic sources" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.