In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
CentOS 8 how to configure the local Yum/DNF repository, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
CentOS 8 eliminates the traditional yum configuration method and uses dnf instead. Although it uses the new dnf installer, it is compatible with the use of yum configuration files and commands.
CentOS8 configure local yum source * * 1, create mount point * *
Mkdir-p / mnt/cdrom2, mount ISO image file
1) Optical drive mode
(1) take VMware Workstation as an example
(2) Mount the CD-ROM drive
Mount / dev/cdrom / mnt/cdrom (3) verify mount
As long as the following files can be listed, the mount is successful.
2) Mount the iso image file
(1) upload the iso file to your centos first
(2) suppose we upload to / opt, and then mount it.
Mount-o loop / opt/CentOS-8-x86_64-1905-dvd1.iso / mnt/cdrom3, * * write local yum source warehouse files * *
Back up the yum configuration file before writing it!
[root@aaa251 ~] # cd / etc/yum.repos.d/ [root@aaa251 yum.repos.d] # mkdir repo_bak [root@aaa251 yum.repos.d] # mv * .repo repo_bak/ write local yum repository files
# vi / etc/yum.repos.d/centos8.repo [c8-media-AppStream] name=AppStream baseurl= file:///mnt/cdrom/AppStream gpgcheck=0 enabled=1 [c8-media-BaseOS] name=BaseOS baseurl= file:///mnt/cdrom/BaseOS gpgcheck=0 enabled=14, empty and rebuild cache
Yum clean all yum makecache
Here, we can also take a look at the dnf software library
5. Turn on the disk automatically.
Introduction and usage of echo "/ dev/cdrom / mnt/cdrom iso9660 defaults 00" > / etc/fstab**DNF
**
1. Introduction to DNF
DNF (Dandified Yum) is a new generation of RPM software package manager.
DNF uses RPM,libsolv and hawkey libraries for package management operations, and Fedora22 already uses DNF by default. DNF will be released on May 11, 2015.
On Red Hat Enterprise Linux 8, a new version of the YUM tool based on DNF technology (YUM v4) ensures that the software is installed.
YUM v4 has the following advantages over YUM v3, which was previously used on RHEL 7:
Improve performanc
Support for modular content
Well-designed stable API for integration with tools
YUM v4 is compatible with YUM v3 when using the command line, editing, or creating configuration files. For installing software, you can use the yum command and its specific options as you would on RHEL 7.
2. Use of DNF
# list all RPM packages dnf list # installation packages dnf install wget # remove packages dnf remove wget # View all package groups dnf grouplist # install a package group dnf groupinstall 'Security tools' # View DNF software libraries available on the system dnf repolist # View all DNF software libraries available and unavailable on the system dnf repolist all # list all installed RPM Package dnf list installed # lists all available installable RPM packages dnf list available # search RPM packages in the software library dnf search wget # find the provider of a file dnf provides / bin/bash # View package details dnf info wget # remove useless orphaned packages dnf autoremove # remove cached useless packages dnf clean all # get help on the use of a command dnf help clean # View the execution history of the DNF command dnf history # install specific software from a specific package library dnf-enablerepo=epel install nginx # reinstall a specific software package dnf reinstall wget for example:
After reading the above, have you mastered how CentOS 8 configures the local Yum/DNF repository? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.