Build a local DNF warehouse in practice

1. DNF package manager

Yum is a commonly used tool for software installation and upgrade under the Linux system. The convenient installation and automatic upgrade of software can be realized through the yum tool and the Internet. However, yum has not been solved because of long-standing problems. Yum has been replaced by DNF. DNF is a new generation of rpm package manager, used to replace yum package manager, and officially replaced yum in centos8.0 version. The DNF package manager overcomes some bottlenecks of the YUM package manager, and improves many aspects including user experience, memory usage, dependency analysis, and running speed.

In the centos8.x version, the yum command can still be used, but this yum is actually linked to the dnf command. This is done to maintain backward compatibility. The use of the dnf command and the yum command is basically the same. At the same time, dnf is also compatible Use the yum configuration file, so you can use dnf exactly as yum uses.

In CentOS8, the software source is divided into two parts:

  • BaseOS Repository: Provides the underlying core OS content in the form of traditional RPM packages;
  • AppStream repository: Provides all applications running in user space;

The configuration file of dnf is also compatible with the configuration file of yum, such as the resource library configuration directory /etc/yum.repos.d, the default resource configuration of dnf is saved in this directory, and the download speed may be very slow if some default resource library configurations are used. It can not be used, so it is recommended to modify it. It is recommended to modify the resource configuration address to a domestic address.

It is recommended to use the Alibaba Cloud image:

Alibaba Open Source Mirror Station-OPSX Mirror Station-Alibaba Cloud Developer Community

The first file, CentOS-AppStream.repo, has been modified as follows:

 

Guess you like

Origin blog.csdn.net/qq_35029061/article/details/131930452