Due to the instability of the network, the package that can be downloaded by the yum command in a certain place cannot be downloaded in other places. To provide a solution, we can run the yum command where it can be downloaded, and cache the downloaded installation package. , which not only solves the situation that the download cannot be downloaded due to network problems, but also ensures the consistency of the program version. The specific methods are as follows:
Modify the yum configuration file:
root@ #vim /etc/yum.conf
Modify the contents of the file as follows:
[main] cachedir=/cache path//original value/var/cache/yum/$basearch/$releasever keepcache=1 // The original value is 0, which means to delete the package after installationAfter that, you can get the files we want to install from the cache path set by yourself by executing the yum command.