Yum Command detailed

Source: Internet
Author: User
Tags ftp site

the Software installation commands for Redhat and Fedora are rpm, but the biggest trouble with RPM is that you need to manually find a series of dependencies that you need to install the software, Super trouble not to say, If the software does not need to uninstall the removal of a dependency caused by the other software can not be used is very annoying. Happily, Fedora finally introduced the command yum similar to apt in Ubuntu, making Fedora software easy to install. Yum has the following characteristics:
* Multiple repositories can be configured at the same time (Repository)
* Concise configuration file (/etc/yum.conf)
* Automatic resolution of dependency issues encountered when adding or removing RPM packages
* Easy to use
* maintain consistency with RPM database

yum is to have a reliable repository, as the name implies, this is the repository of software, it can be an HTTP or FTP site, it can also be a local software pool, but must include the RPM header, header includes the RPM package of various information, including description, features, Provide files, dependencies, etc. it is by collecting these headers and analyzing them that the remaining tasks can be completed automatically.
1.yum is stored in a configuration file called yum.conf, usually located in the/etc directory, which is the heaviest weight of the entire Yum system

[main]
cachedir=/ VAR/CACHE/YUM
keepcache=0
debuglevel =2
logfile=/var/log/yum.log
obsoletes=1
gpgcheck=1< BR style= "Background-color:inherit;" >PLUGINS=1
metadata_expire=1800
# PUT YOUR REPOS here OR in separate files named File.repo
# in/etc/yum.repos.d p>

The following is a brief description of this document:
Cachedir:yum cache directory, yum stores downloaded RPM packages and databases, typically/var/cache/yum.
DebugLevel: Debug level, 0─10, default is 2
The Logfile:yum log file, which is/var/log/yum.log by default.
Exactarch, there are two options 1 and 0, which represent whether only the upgrade and

' You install packages with a consistent CPU package, if set to 1, then if you install a i386 rpm, Yum will not upgrade with a 686 package.
The gpgchkeck= has 1 and 2 choices, which represent whether or not the GPG check is done, and if not, the default is check.

Yum update, this step is required, yum will download the RPM header from the server header directory and place it in the local cache. After the header has been downloaded, yum will determine if there is an updatable package, if so, it will ask you for comments, updates, answer yes, then Yum begins to download the package and use the call RPM installation, which may take some time, depending on the number of software to be updated and the network condition, in case the network is broken, It's okay, just one more time. Upgrade completed, every day as long as the use of Yum check-update check if there is a new, if any, with Yum update with the new, always keep the system up-to-date, blocking all the loopholes found. Upgrade a separate package with the Yum update packagename.

1 installation
Yum Install all installed
Yum Install Package1 installs the specified installation package Package1
Yum groupinsall group1 Installer group group1

2 Update and upgrade
yum update Update all
yum update Package1 updates the specified package Package1
yum check-update Check for updatable programs
yum upgrade Package1 upgrade Specifies package package1

3 find and show
yum info Package1 Display installation package information package1
yum list shows all installed and installable packages
yum List PACKAGE1 Displays the specified package installation package1
yum groupinfo group1 Display program group group1 info Yum Search string finds the installation package

based on the keyword string

4 Remove program
yum "remove & #124; Erase Package1 Remove Package package1
yum deplist package1 Viewing program package1 dependencies

5 Clear Cache
yum clean Packages clear the Cache directory under the package
yum clean oldheaders clears the cache directory under the old headers
yum, yum, all (= Yum Clear Package S Yum clean oldheaders) clears the package under the cache directory and the old headers

For example, to install a game program group, first look for:
#:yum grouplist
It can be found that the installable game package name is "games and entertainment" so that it can be installed:
#:yum Groupinstall "Games and entertainment"
All the game packages are installed automatically. Here the name of games and entertainment must be selected in double quotes, because Linux encounters a space below that the file name ends, so you must tell the system that the package name is "games and entertainment" instead of "games."

In addition, you can modify the configuration file/etc/yum.conf Select the installation source.

This article from "My Heart _ Sunny" blog, please be sure to keep this source http://wyg11.blog.51cto.com/11253863/1770323

Detailed Yum commands

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.