Yum uses redhat, and Feder of fedora must have a headache for the famous dependencyhell of rpm (this is also a problem for all rpm-based releases ). Fooisneededbybar, barisneededbyfoo. I have to work hard to load and unload software...
What does yum do?
With redhat, linuxer of fedora must have a headache for rpm's famous dependency hell (which is also a problem for all rpm-based releases ). Foo is needed by bar, bar is needed by foo. To load and unload a piece of software, we have to work hard to find out all the dependency problems. several rpm search sites have become frequent places to patronize. if we encounter circular dependency, we will only have a dry eye. Sometimes you can add a -- nodeps parameter, but you may not see it. but can you ensure normal use of the software installed in this way? can you uninstall the software without affecting the work of other software, i'm afraid no one can give a definite answer. At this moment, the hats only look at the apt of debian, secretly envy. Fortunately, these are all past tense. The rpm-based release now also has a package management tool that automatically resolves dependencies like apt. One of the famous ones is apt 4rpm, which is basically the transplantation of debian system apt in the rpm release version. But do you know the linuxer using Redhat and Fedora? there is also an rpm package management system similar to apt, that is, yum. The Fedora system has its own, and the Redhat has the corresponding rpm download. Compared with apt, yum features are not weak at all, and there are even many advantages over apt. For example, yum comes with the Fedora system, so it can use the official fedora software source to complete various official releases> various upgrades. Yum is not bad for third-party software sources. most repository notes that support apt also support yum, such as freshrpms, fedora. us, and livna. In addition, yum has a detailed log to check when to upgrade and install software packages. The yum code is more streamlined than apt.
I. What is yum?
Yum = Yellow dog Updater. Modified is mainly used to conveniently add, delete, and update RPM packages. it automatically solves the dependency problem of packages.
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 (Repository) can be configured simultaneously)
* 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. install yum
Built-in ORA
# Rpm-ivh yum-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 to replace all/etc/yum. conf content
[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 = Fedora Core 1 -- Fedora US mirror
Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/ OS
[Fedora-us-1-updates]
Name = Fedora Core 1 updates -- Fedora US mirror
Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/updates
[Fedora-us-1-stable]
Name = Fedora Linux (stable) for Fedora Core 1 -- Fedora US mirror
Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/stable
[Freshrpms]
Name = Fedora Linux $ releasever-$ basearch-freshrpms
Baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms
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
Youngerhao's column