Introduction, configuration, and usage of yum in CentOS
1. What is yum [html] view plaincopyprint?
- Yum = YellowdogUpdater, Modified
The main function is to conveniently Add/delete/update RPM packages.
It automatically solves the dependency problem of the package.
It facilitates management of a large number of system update Problems
Note: The simplest reason for using yum instead of apt is that ora comes
Ii. yum features * multiple resource libraries can be configured simultaneously (Repository)
* Simple configuration file (/etc/yum. conf)
* Automatically solves the dependency problem when rpm packages are added or deleted.
* Easy to use
* Maintain consistency with the RPM Database
Iii. How does yum install Fedora's built-in [plain] view plaincopyprint?
- # Rpm-ivhyum-2.0.4-2.noarch.rpm
Iv. yum configuration Note: Modify and add the resource library in the configuration file to accelerate the download speed and have more updatable rpm packages
Replace all/etc/yum. conf content with [plain] view plaincopyprint?
- [Main]
- Cachedir =/var/cache/yum
- Debuglevel = 2
- Logfile =/var/log/yum. log
- Pkgpolicy = newest
- Distroverpkg = fedora-release
- Tolerant = 1
- Exactarch = 1
- [Fedora-us-1]
- Name = FedoraCore1 -- FedoraUSmirror
- Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/ OS
- [Fedora-us-1-updates]
- Name = FedoraCore1updates -- FedoraUSmirror
- Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/updates
- [Fedora-us-1-stable]
- Name = FedoraLinux (stable) forFedoraCore1 -- FedoraUSmirror
- Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/stable
- [Freshrpms]
- Name = FedoraLinux $ releasever-$ basearch-freshrpms
- Baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms
5. yum application note: when you use the yum or yum resource library for updates for the first time, yum automatically downloads all required headers and stores them in the/var/cache/yum Directory, which may take a long time.
Check which update rpm packages are available
[Plain] view plaincopyprint?
- # Yumcheck-update
Install the rpm package so that xmms can play mp3
[Html] view plaincopyprint?
- # Yuminstallxmms-m
Delete the licq package and delete the packages that are dependent on the package.
[Html] view plaincopyprint?
- # Yumremovelicq
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)
[Html] view plaincopyprint?
- # Yum-yupdate
Periodically update the system every day. [html] view plaincopyprint?
- # Chkconfigyumon
- # Serviceyumstart
6. yum instructions * update the rpm package
Check the updatable rpm package
[Html] view plaincopyprint?
- # Yumcheck-update
Update all rpm packages
[Html] view plaincopyprint?
- # Yumupdate
Update the specified rpm package, such as updating the kernel and kernel source
[Html] view plaincopyprint?
- # Yumupdatekernelkernel-source
For large-scale version upgrades, unlike yum update, the old obsolete package is also upgraded.
[Html] view plaincopyprint?
- # Yumupgrade
* Installation and removal of rpm packages, such as xmms-mp3
[Html] view plaincopyprint?
- # Yuminstallxmms-mp3
Delete an rpm package, including packages that depend on the package
[Html] view plaincopyprint?
- # Yumremovelicq
Note: You will also be prompted to delete licq-gnome, licq-qt, and licq-text.
* Yum temporary storage (/var/cache/yum/) related parameters clear temporary rpm package files
[Html] view plaincopyprint?
- # Yumcleanpackages
Clear temporary rpm header files
[Html] view plaincopyprint?
- # Yumcleanheaders
Clear the existing rpm header file
[Html] view plaincopyprint?
- # Yumcleanoldheaders
Clear existing rpm header files and package files
[Html] view plaincopyprint?
- # Yumclean or # yumcleanall
Note: equivalent to yumcleanpackages + yumcleanoldheaders
* The rpm package list lists all the rpm packages that can be installed or updated in the resource library.
[Html] view plaincopyprint?
- # Yumlist
List specific rpm packages that can be installed, updated, and installed in the resource library
[Html] view plaincopyprint?
- # Yumlistmozilla
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
[Html] view plaincopyprint?
- # Yumlistupdates
List all installed rpm packages
[Html] view plaincopyprint?
- # Yumlistinstalled
List rpm packages installed but not included in the resource library
[Html] view plaincopyprint?
- # Yumlistextras
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.
[Html] view plaincopyprint?
- # Yuminfo
Lists the specific information about which rpm packages can be installed or updated and installed in the resource library. [html] view plaincopyprint?
- # Yuminfomozilla
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.
[Html] view plaincopyprint?
- # Yuminfoupdates
Lists information about all installed rpm packages.
[Html] view plaincopyprint?
- # Yuminfoinstalled
Lists the installed rpm packages that are not included in the resource library.
[Html] view plaincopyprint?
- # Yuminfoextras
Note: Download the installed rpm package information from other websites.
* Search for rpm packages matching specific characters
[Html] view plaincopyprint?
- # Yumsearchmozilla
Note: Search for rpm package names and package descriptions
Search for rpm packages with specific file names
[Html] view plaincopyprint?
- # Yumprovidesrealplay
7. Install the GPG key of freshrpms.net In the rpm package of freshrpms.net.
[Html] view plaincopyprint?
- # Rpm -- importhttp: // freshrpms.net/packages/RPM-GPG-KEY.txt
Edit/etc/yum. conf and add the following information to the end of [html] view plaincopyprint?
- [Freshrpms]
- Name = FedoraLinux $ releasever-$ basearch-freshrpms
- Baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms
- Gpgcheck = 1
Note:
Check GPG Key # rpm-qagpg-pubkey * display Key information # rpm-qigpg-pubkey-e42d547b-3960bdf1 delete Key # rpm-egpg-pubkey-e42d547b-3960bdf1