1. Yum (all called Yellow Dog Updater, modified) is a shell front-end Software Package Manager in fedora, RedHat, Suse, and centos. Based on RPM package management, the RPM package can be automatically downloaded and installed from the specified server, and the dependency relationship can be automatically processed. All dependent software packages can be installed at one time without tedious download and installation.
Common command line commands
Install software (take foo-x.x.x.rpm as an example): Yum install foo-x.x.x.rpm
Common Yum commands
Delete software: Yum remove foo-x.x.x.rpm or yum erase foo-x.x.x.rpm upgrade software: Yum upgrade Foo or yum update Foo Query Information: Yum info Foo search software (take the field containing Foo as an example ): for other parameters of Yum search Foo, see man yum
V. Yum Application
Note: When the yum or yum resource library is updated for the first time, yum will automatically download all the required headers and place them in the/var/Cache/Yum Directory, which may take a long time.
Check which update RPM packages are available
# Yum check-Update
Install the RPM package so that xmms can play MP3
# Yum install xmms-mp3
Install mplayer and install related software automatically
# Yum install mplayer
Delete the licq package and delete the packages that are dependent on the package.
# Yum remove licq
Note: You will also be prompted to delete licq-gnome, licq-QT, and licq-text, which is very convenient.
System update (update all RPM packages that can be upgraded, including kernel)
# Yum-y update
Perform system updates on a regular basis every day
# Chkconfig Yum on
# Service Yum start
6. Yum instructions
* Update the RPM package
Check the updatable RPM package
# Yum check-Update
Update all RPM packages
# Yum update
Update the specified RPM package, such as updating the kernel and kernel source
# Yum update kernel-Source
For large-scale version upgrades, unlike Yum update, the old obsolete package is also upgraded.
# Yum upgrade
* Installation and deletion of RPM packages
Install RPM packages like xmms-mp3
# Yum install xmms-mp3
Delete an RPM package, including packages that depend on the package
# Yum remove licq
Note: You will also be prompted to delete licq-gnome, licq-QT, and licq-text.
* Parameters related to Yum temporary storage (/var/Cache/Yum /)
Clear temporary RPM package files
# Yum clean packages
Clear temporary RPM header files
# Yum clean Headers
Clear the existing RPM header file
# Yum clean oldheaders
Clear existing RPM header files and package files
# Yum clean or # Yum clean all
Note: equivalent to Yum clean packages + Yum clean oldheaders
* RPM package list
List all RPM packages that can be installed or updated in the resource library
# Yum list
List specific rpm packages that can be installed, updated, and installed in the resource library
# Yum list Mozilla
# Yum list Mozilla *
Note: Match characters can be used in RPM package names, for example, to list all RPM packages starting with Mozilla
List all updates to the RPM package in the resource library
# Yum list updates
List all installed RPM packages
# Yum List Installed
List RPM packages installed but not included in the resource library
# Yum list extras
Note: download and install the RPM package from other websites
* RPM package information display (the info parameter is the same as the list)
Lists information about all RPM packages that can be installed or updated in the resource library.
# Yum info
Lists the specific information of RPM packages that can be installed or updated and installed in the resource library.
# Yum info Mozilla
# Yum info Mozilla *
Note: Match characters can be used in RPM package names, such as listing all RPM packages starting with Mozilla
Lists information about all the RPM packages that can be updated in the resource library.
# Yum info updates
Lists information about all installed RPM packages.
# Yum info installed
Lists the installed RPM packages that are not included in the resource library.
# Yum info extras
Note: Download the installed RPM package information from other websites.
* Search for an RPM package
Search for RPM packages matching specific characters
# Yum search Mozilla
Note: Search for RPM package names and package descriptions
Search for RPM packages with specific file names
# Yum provides realplay
7. Securely update the RPM package of freshrpms.net
Install the GPG key for freshrpms.net # rpm -- import http://freshrpms.net/packages/RPM-GPG-KEY.txt
Edit/etc/yum. conf and add the following information to the end.
[Freshrpms]
Name = Fedora Linux $ releasever-$ basearch-freshrpms
Baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms
Gpgcheck = 1
Note:
Check GPG key
# Rpm-Qa GPG-pubkey *
Show key information
# Rpm-Qi gpg-pubkey-e42d547b-3960bdf1
Delete key
# Rpm e gpg-pubkey-e42d547b-3960bdf1
Yum check-update checks all software packages that can be updated
Yum update: Download and update all software packages installed in the system.
Yum upgrade has a large-scale version upgrade. Different from Yum update, the old version is also upgraded.
Yum install <packages> install new software package
Yum update <packages> updates the specified software package.
Yum remove <packages> uninstall the specified Software Package
Yum groupinstall <groupnames> install software packages in the specified Software Group
Yum groupupdate <groupnames> updates software packages in a specified Software Group
Yum groupremove <groupnames> uninstall the software package in the specified Software Group
Yum grouplist view installed and available software GROUPS IN THE SYSTEM
Yum list lists all the RPM packages that can be installed, updated, and installed in the resource library.
Yum list <RegEx> lists the RPM packages that can be installed, updated, and installed that match the regular expression in the resource library.
Yum list available lists all the RPM packages that can be installed in the resource library
Yum list available <RegEx> lists all the RPM packages that can be installed in the resource library that match the regular expression.
Yum list updates lists all the RPM packages that can be updated in the resource library
Yum list updates <RegEx> lists all updatable RPM packages that match the regular expression in the resource library.
Yum List Installed list all installed RPM packages in the resource library
Yum List Installed <RegEx> lists all installed RPM packages that match the regular expression in the resource library.
Yum list extras lists the RPM packages installed but not included in the resource library
Yum list extras <RegEx> lists the installed RPM packages that match the regular expression but are not included in the resource library
Yum list recent list software packages recently added to the resource library
Yum search <RegEx> checks the names, descriptions, overview, and listed maintainers of all available software and finds values that match regular expressions.
Yum provides <RegEx> checks the files contained in the software package and the functions provided by the software to find the values that match the regular expression.
Yum clean headers clear cache RPM header files
Yum clean packages clear cached RPM package files
Yum clean all clear cache RPM header files and package files
Yum deplist <packages> displays the dependency information of the software package.
When you use the yum or yum resource library for updates for the first time, yum automatically downloads all the required He ade Rs files in the/var/Cache/Yum Directory, which may take a long time.
You can also use the yum info command to list the package information. The available parameters of Yum info are the same as those of Yum list.
The yum command can also use the-y parameter to answer the question raised during the command running with ye s, such as Yum-y install vsftpd, in this way, you do not need to enter Yes/y when installing the software.
Yum command tool example
1. upgrade the system
[Root @ localhost ~] # Yum update
2. Install the specified software package. I prefer to use the following command.
[Root @ localhost ~] # Yum-y install vsftpd
3. Upgrade the specified Software Package
[Root @ localhost ~] # Yum-y update MySQL
4. Uninstall the specified Software Package
[Root @ localhost ~] # Yum-y remore vsftpd MySQL
5. Check the installed and available software groups in the system. For available software groups, you can choose to install
[Root @ localhost ~] # Yum grouplist
6. Install a software group in the available software group displayed in the previous command. The god Editor-Emacs has around 12 software packages installed.
[Root @ localhost ~] # Yum-y groupinstall Emacs
7. Update Software packages in a specified Software Group
[Root @ localhost ~] # Yum-y groupupdate Emacs
8. Uninstall the software packages in the specified software group. For Emacs, 12 software packages are installed, but only 4 software packages are uninstalled!
[Root @ localhost ~] # Yum-y groupremove Emacs
9. Clear cache RPM header files and package files
[Root @ localhost ~] # Yum clean all
10. Search related software packages
[Root @ localhost ~] # Yum-y search Emacs
11. display the information of the specified Software Package
[Root @ localhost ~] # Yum info Emacs
Similar to the information displayed by rpm-Qi Emacs, but not exactly the same
12. query the dependency information of a specified software package. emacs depends on many modules.
[Root @ localhost ~] # Yum deplist Emacs
13. list all software packages starting with yum
[Root @ localhost ~] # Yum list Yum \*
14. List the installed RPM packages that are not included in the resource library
# Yum list extras