Role of the yum Library: ignore the dependency between installation packages and install the rpm package in a centralized manner.
Classification: divided into local YUM (file) and network YUM (ftp, http)
Repository configuration file:/etc/yum. repos. d/*. repo
Case: local YUM configuration
First, copy the image file to a separate folder. Do not use the directly mounted folder to complete the operations. Go to the YUM repository to configure the YUM library and make the common yum configuration into a yum library file.
[[Email protected] ~] # Cd/etc/yum. repos. d/# enter the main configuration file of the yum Library
[[Email protected] yum. repos. d] # ls # view the content of the current directory
Rhel-debuginfo.repo
[[Email protected] yum. repos. d] # cp rhel-debuginfo.repo yum. repo # copy the source yum file for reference configuration
[[Email protected] yum. repos. d] # ls
Rhel-debuginfo.repo yum. repo
[[Email protected] yum. repos. d] # vim yum. repo
[Server] # Source Name
Name = Red Hat Enterprise Linux Server # Source description
Baseurl = file: // misc/cd/Server # location of the installation package
Enabled = 1 # whether to use this yum Library configuration (0 is disabled, 1 is enabled)
Gpgcheck = 1 # check and verify the installation package
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release # verify the rpm key file
[ClusterStorage]
Name = Red Hat Enterprise Linux ClusterStorage
Baseurl = file: // misc/cd/ClusterStorage
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Cluster]
Name = Red Hat Enterprise Linux Cluster
Baseurl = file: // misc/cd/Cluster
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
Name = Red Hat Enterprise Linux VT
Baseurl = file: // misc/cd/VT
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
~
: Wq
4. Result verification
File verification
[[Email protected] yum. repos. d] # yum clean all # clear YUM cache
[[Email protected] yum. repos. d] # yum-qa | wc-l # view the number of packages installed
[[Email protected] yum. repos. d] # yum list | wc-l # check the number of RPM packages to verify whether the configuration is successful
3583
FAQ: yum list | wc-l limit
Solution: check the location of the yum library software package.
Baseurl = file: // misc/cd/Server the address may be incorrect. Ensure that the source is absolute.
Enabled = 1 check whether this configuration is enabled
YUM Library installation configuration