Yum library configuration: create a local repository
Configuration environment: centos 5.10
Purpose: automatically resolve the dependency of the RPM software package and provide the software download source for the client.
Implementation: create a local software warehouse
Modify configuration file
Clear Cache
Reload
Implementation:
[[Email protected] ~] # Mkdir/var/centosdvd // create a local repository directory
[[Email protected] ~] # Cd/MISC/CD // switch to the mount point
[[Email protected] ~] # Cp-RF */var/centosdvd // copy the CD File
[[Email protected] ~] # Ls-LD/var/centosdvd/* | grep ^ d // verify the copy result
Configure the yum client:
[[Email protected] ~] # Vim/etc/yum. Repos. d/centos. Repo // custom Yum configuration file. The name can be customized, but the extension must end with. repo.
[Centos-5.10] // custom name, unique
Name = Description of the centos Repository
Baseurl = file: // var/centosdvd // URL for Yum access
Or you can use the mount point method:
Baseurl = file: // MISC/CD/centos/
Enabled = 1 // This repository is enabled
Gpgcheck = 0 // verify the RPM package with installation
Gpgkey = file: // etc/pki/rpm-GPG-key-RedHat-release // The key file used for verification
Check whether Yum is available
650) This. width = 650; "Title =" qq20140728232322.png "src =" http://s3.51cto.com/wyfs02/M02/41/E8/wKioL1PWaR-x97g8AAClXCNTEjA433.jpg "alt =" wKioL1PWaR-x97g8AAClXCNTEjA433.jpg "/>
[[Email protected] ~] # Yumclean all // clear the repository Cache
[[Email protected] ~] # Yumlist // reload