Introduction, configuration, and usage of yum in CentOS

Source: Internet
Author: User

Introduction, configuration, and usage of yum in CentOS
1. What is yum [html] view plaincopyprint?

  1. 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?
  1. # 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?
  1. [Main]
  2. Cachedir =/var/cache/yum
  3. Debuglevel = 2
  4. Logfile =/var/log/yum. log
  5. Pkgpolicy = newest
  6. Distroverpkg = fedora-release
  7. Tolerant = 1
  8. Exactarch = 1
  9. [Fedora-us-1]
  10. Name = FedoraCore1 -- FedoraUSmirror
  11. Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/ OS
  12. [Fedora-us-1-updates]
  13. Name = FedoraCore1updates -- FedoraUSmirror
  14. Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/updates
  15. [Fedora-us-1-stable]
  16. Name = FedoraLinux (stable) forFedoraCore1 -- FedoraUSmirror
  17. Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/stable
  18. [Freshrpms]
  19. Name = FedoraLinux $ releasever-$ basearch-freshrpms
  20. 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?
  1. # Yumcheck-update
Install the rpm package so that xmms can play mp3
[Html] view plaincopyprint?
  1. # Yuminstallxmms-m
Delete the licq package and delete the packages that are dependent on the package.
[Html] view plaincopyprint?
  1. # 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?
  1. # Yum-yupdate
Periodically update the system every day. [html] view plaincopyprint?
  1. # Chkconfigyumon
  2. # Serviceyumstart

6. yum instructions * update the rpm package
Check the updatable rpm package
[Html] view plaincopyprint?
  1. # Yumcheck-update
Update all rpm packages
[Html] view plaincopyprint?
  1. # Yumupdate
Update the specified rpm package, such as updating the kernel and kernel source
[Html] view plaincopyprint?
  1. # Yumupdatekernelkernel-source
For large-scale version upgrades, unlike yum update, the old obsolete package is also upgraded.
[Html] view plaincopyprint?
  1. # Yumupgrade

* Installation and removal of rpm packages, such as xmms-mp3
[Html] view plaincopyprint?
  1. # Yuminstallxmms-mp3
Delete an rpm package, including packages that depend on the package
[Html] view plaincopyprint?
  1. # 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?
  1. # Yumcleanpackages
Clear temporary rpm header files
[Html] view plaincopyprint?
  1. # Yumcleanheaders
Clear the existing rpm header file
[Html] view plaincopyprint?
  1. # Yumcleanoldheaders
Clear existing rpm header files and package files
[Html] view plaincopyprint?
  1. # 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?
  1. # Yumlist
List specific rpm packages that can be installed, updated, and installed in the resource library
[Html] view plaincopyprint?
  1. # 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?
  1. # Yumlistupdates
List all installed rpm packages
[Html] view plaincopyprint?
  1. # Yumlistinstalled
List rpm packages installed but not included in the resource library
[Html] view plaincopyprint?
  1. # 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?
  1. # Yuminfo
Lists the specific information about which rpm packages can be installed or updated and installed in the resource library. [html] view plaincopyprint?
  1. # 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?
  1. # Yuminfoupdates
Lists information about all installed rpm packages.
[Html] view plaincopyprint?
  1. # Yuminfoinstalled
Lists the installed rpm packages that are not included in the resource library.
[Html] view plaincopyprint?
  1. # Yuminfoextras
Note: Download the installed rpm package information from other websites.


* Search for rpm packages matching specific characters
[Html] view plaincopyprint?
  1. # Yumsearchmozilla
Note: Search for rpm package names and package descriptions

Search for rpm packages with specific file names
[Html] view plaincopyprint?
  1. # Yumprovidesrealplay


7. Install the GPG key of freshrpms.net In the rpm package of freshrpms.net.
[Html] view plaincopyprint?
  1. # 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?
  1. [Freshrpms]
  2. Name = FedoraLinux $ releasever-$ basearch-freshrpms
  3. Baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms
  4. Gpgcheck = 1
Note:
Check GPG Key # rpm-qagpg-pubkey * display Key information # rpm-qigpg-pubkey-e42d547b-3960bdf1 delete Key # rpm-egpg-pubkey-e42d547b-3960bdf1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.