Yum uses the repository to save the software packages for managing rpm, And the repository configuration files are saved in the/etc/yum. repos. d/directory in the following format:
[LinuxCast] # repository name = explanation of repository name # describe basic Repository Information baseurl = repository address # local or http, ftp, file, ntfsenable = 1 # whether enable gpgcheck = 1 # verify
The yum configuration file must start. at the end of the repo, a configuration file can save the configuration information of multiple yum repositories,/etc/yum. repos. d/The Directory can contain multiple configuration files.
Commands for operating software using yum:
Yum install software-name # install the specified software yum remove software-name # uninstall the specified software yum update software-name # update the specified software
Query using yum:
Yum search keyword # search yum list (all | installed | recent | updates) # list all, installed, recent, software updates yum info packagename # display the specified software information yum whatprovides packagename # query which rpm contains the Software Package
Create a yum repository by yourself:
1. Install the createrepo file through rpm
2. Run the following command: createrepo-v/yum-dir # create the index file of the yum repository.
3. Create a configuration file for the yum Repository
4. yum clean all # Clear yum Cache Information
5. Use yum to group the software package: createrepo-g/tmp/comps. xml/yum-dir