How to Use CentOS yum

Source: Internet
Author: User

CentOS yum detailed usage method yum is what yum = Yellow dog Updater, Modified main function is more convenient to add/delete/update RPM package. it automatically solves the dependency problem of the package. it is easy to manage a large number of system updates. yum features that you can configure multiple resource libraries (Repository) with simple configuration files (/etc/yum. conf automatically solves the dependency problems encountered when adding or deleting rpm packages. It is convenient to maintain consistency with the RPM database. yum is installed with CentOS (yum -*. noarch. rpm) # rpm-ivh yum -*. noarch. rpm first needs to import the system's RPM-GPG-KEY before enabling yum for the first time: # rpm -- import/usr/share/doc/centos-release-3 (4)/RPM-GPG-KEY-CentOS-3 (4) yum directive note: when the first time you use the yum or yum resource library for updates, yum will automatically download All required headers are stored in the/var/cache/yum Directory, which may take a long time. update check of the rpm package: updatable rpm package # yum check-update all rpm packages # yum update the specified rpm package, for example, if you update a large-scale version upgrade of kernel and kernel source # yum update kernel-source, which is different from yum update, even the old obsolete package is also upgraded # install and delete the installation rpm package for the yum upgraderpm package, such as the xmms-mp3 # yum install xmms-mp3 to delete the rpm package, including dependent packages with this package # yum remove licq Note: you will also be prompted to delete the licq-gnome, licq-qt, licq-textyum temporary storage (/var/cache/yum /) to clear the temporary rpm package file # yum clean packages to clear the temporary rpm header file # yum c Learn headers clear old rpm header files in temporary storage # yum clean oldheaders clear old rpm header files and package files in temporary storage # yum clearn or # yum clearn all note: equivalent to yum clean packages + yum clean oldheaders the package list lists all the rpm packages that can be installed or updated in the resource library # yum list lists the specific rpm packages that can be installed, updated, and installed in the resource library # yum list mozilla # yum list mozilla * Note: you can use a match character in the rpm package name, for example, listing all rpm packages starting with mozilla lists all the rpm packages that can be updated in the resource library # yum list updates lists all installed rpm packages # yum list installed lists installed but not rpm package contained in the resource library # yum list extras note: download and install the rpm package from other websites (Info parameter is the same as list) list information about all rpm packages that can be installed or updated in the resource library # yum info lists information about specific rpm packages that can be installed or updated and installed in the resource library # yum info mozilla # yum info mozilla * Note: you can use a match character in the rpm package name, for example, 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 list the rpm packages installed but not included in the resource library # yum info extras note: search for rpm packages matching specific characters by downloading and installing the rpm packages from other websites # yum search mozilla note: In the rpm package name, search for rpm packages with specific file names in the package description and other searches # yum provides realplay adds a resource library, for example, adding rpm.livna.org as a resource Install Livna.org rpms GPG key # rpm -- import http://rpm.livna.org/rpm-livna-gpg-keycheck gpg Key # rpm-qa GPG-pubkey * display Key information # rpm-qi gpg-pubkey-a109b1ec-3f6e28d5 (Note: If you want to delete the Key, use # rpm-e gpg-pubkey-a109b1ec-3f6e28d5) common yum commands # yum install xxx software # yum info xxx view xxx software information # yum remove xxx Delete Software Package # yum list Software Package # yum clean clear buffer and just package # yum provides xxx search package with xxx As the keyword (the provided information is the keyword) # yum search xxx search package (name-based keyword) # yum gro Upupdate xxx # yum grouplist xxx # yum groupremove xxx is a group of upgrading and deleting operations .. For example, "Mysql Database" is a group that will operate on all related software packages at the same time; # yum update system upgrade # yum list available list all packages on the upgrade source; # yum list updates lists update packages on all upgrade sources; # yum list installed lists installed packages; # yun update kernel upgrade; common yum sources 1) automatic Selection of the fastest source because 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: (generally do not need to change)/etc/yum/pluginconf. d/fastestmirror. conf:/var/cache/yum/t Imedhosts.txt (2) use the yum of the graphic interface. If you think the yum of the command line is inconvenient, you can use the graphic yumex. This looks more convenient, because you can freely select the software Repository: # yum install yumex and 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.

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.