Introduction to Yum tools in centos

Source: Internet
Author: User
Tags gpg

Yum




What is





Yum = yellow dog Updater, modified
Main
Function




Is more convenient to 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


Yum features
Multiple resource libraries can be configured simultaneously (repository)
Simple configurationFile


(/Etc/yum. conf)
Automatically solves the dependency problem when RPM packages are added or deleted.
Easy to use
Maintain consistency with the RPM Database



Install yum








Centos


Built-in (Yum-*. noarch. rpm)
# Rpm-IVH Yum-*. noarch. rpm
Before you enable yum for the first time, you first need to import the system's RPM-GPG-KEY:
# Rpm -- import/usr/share/doc/centos-release-3 (4)/RPM-GPG-KEY-CentOS-3 (4)



Yum command
Note: When the first time you use the yum or yum resource library for updates, yum will automatically download
All required headers are placed in/Var/Cache/yum

Directory, which may take a long time.


R

PM package

OfUpdate







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


RPM package installation
And delete








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
#

Clean packagesyum


Clear temporary RPM header files
#Yum clearn Headers


Clear the existing RPM header file
#

Yum clean oldheaders


Clear existing RPM header files and package files
#


Yum clearn





#
Yum clearn all


Note: equivalent to Yum clean packages + Yum clean oldheaders

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 RPM packages





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







Add Resource Library










For example, add rpm.livna.org as the resource library.
Install livna.org RPMs GPG key
#Rpm -- Import



Http://rpm.livna.org/RPM-LIVNA-GPG-KEY




Check GPG key
# Rpm-Qa GPG-pubkey *
Show key information
# Rpm-Qi gpg-pubkey-a109b1ec-3f6e28d5
(Note: If you want to delete the key, use the # rpm-e gpg-pubkey-a109b1ec-3f6e28d5)

Common Yum commands








#Yum install xxx

Install XXX Software

#Yum info xxx

View XXX Software Information

#Yum remove xxx

Delete a software package

#Yum list

List software packages

#Yum clean

Clear the buffer and the package.

#Yum provides xxx

Search for a package with xxx As the keyword (the provided information is the keyword)

#Yum search xxx

Search for a software package (name-based keyword)

#


Yum groupupdate xxx


#
Yum grouplist xxx


#


Yum groupremove xxx


All three are in a group to perform the upgrade list and delete operations .. For example, "MySQL Database" is a group that operates all related software packages at the same time;

#Yum update

System Upgrade

#Yum list available

Lists All packages on the upgrade source;

#Yum list updates

Lists All update packages on the update source;

#Yum List Installed

List Installed packages;

#Yun update Kernel

Upgrade the kernel;


Common yum
Of
Source



(1) automatically select the fastest Source

The speed of some mirror in yum is very slow. If Yum chooses this mirror, yum will be very slow at this time. For this reason, you can download the fastestmirror plug-in, it automatically selects the fastest mirror:

#
Yum install Yum-fastestmirror


Configuration File: (do not change)/etc/Yum/pluginconf. d/fastestmirror. conf

Speed Test record file of your yum image:/var/Cache/Yum/timedhosts.txt



(2) Use the yum

If the yum of the command line is inconvenient, you can use the graphical yumex, which looks more convenient, because you can freely choose the software Repository:

#
Yum install yumex


Then you can see Yum extender in the system tool. In fact, the system's built-in "Add/delete programs" can also achieve graphical software installation, but some yumex features it does not.

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.