Yum Use detailed

Source: Internet
Author: User
Tags gpg

Yum, the full name "Yellow Dog Update, Modified", is a shell front-end package manager in Fedora and Redhat as well as CentOS. Packages that can be downloaded with Yum include Fedora's own packages and Fedora Extras from Rpmfusion and RPM, all of which are maintained by the Linux community and are basically free software. All packages have a separate PGP signature, mainly for your system security.
1. Yum provides commands for locating, installing, and deleting one or a set of packages, including all.
2. RPM package management, can automatically download the RPM package from the designated server and install, can automatically handle dependency relationships, and install all dependent software packages at a time, without tedious downloading, installation and omission of dependency packs.
3. Multiple resource pools (Repository) can be configured at the same time.
4. Concise configuration file (/etc/yum.conf).
5. Maintain consistency with the RPM database.
6. Provide graphics version Yumex:yum install Yumex.
7. Provide the use of the fastest source installation: Yum install Yum-fastestmirror.

Yum's command form is generally: yum [options] [command] [package ...], we use the yum-h command to see the official Yum Help:

# yum-h Loaded plugins:fastestmirror Usage:yum [options] COMMAND List of Commands:check Check for problems In the Rpmdb check-update check for available package updates clean Remove cached data deplist List a PA Ckage ' s dependencies distribution-synchronization Synchronize installed packages to the latest available-versions Downgra De downgrade a package erase Remove a package or packages from your system groupinfo Display details AB Out a package group Groupinstall Install the packages in a group on your system grouplist List available Package gr         Oups Groupremove Remove The packages in a group from your system help Display a helpful usage message history Display, or use, the transaction history info Display details about a package or group of packages Insta ll Install a package or packages on your system list a package or groups of packages N Load a saved TransactioN from filename makecache Generate The metadata cache provides find what package the provides value given Tall Reinstall a package repolist Display the configured software repositories RESOLVEDEP determine which p Ackage provides the given dependency search search package details for the given string shell Run a inte ractive Yum Shell update a package or packages on your system Upgrade update packages taking Obsolet

Es into account version Display a version for the machine and/or available repos. Options:-H,--help show this help message and exit-t,--tolerant is tolerant of errors-c,--CAC
                        Heonly run entirely from system cache, don ' t update cache-c [config file],--config=[config file] Config file location-r [minutes],--randomwait=[minutes] Maximum command wait time-
            d [Debug level],--debuglevel=[debug level]            Debugging output Level--showduplicates show duplicates, in repos, in List/search commands-e [error
                        Level] "--errorlevel=[error level" error output level--rpmverbosity=[debug level name] Debugging output level for rpm-q--quiet quiet operation-v,--verbose verbose ope Ration-y,--assumeyes answer yes to all questions--assumeno answer No to all questions--versio N Show Yum version and exit--installroot=[path] Set install root--enablerepo=[repo] enable one or mor E repositories (wildcards allowed)--disablerepo=[repo] disable one or more repositories (wildcards allowed)-X [Pack
                        Age],--exclude=[package] Exclude package (s) by name or Glob--disableexcludes=[repo] Disable exclude from Main, for a repo or for everything--obsoletes Le obsoletes processingDuring updates--noplugins disable Yum plugins--nogpgcheck disable GPG signature checking--disa Bleplugin=[plugin] Disable plugins by name--enableplugin=[plugin] Enabl E plugins by name--skip-broken Skip packages with depsolving problems--color=color control whether C Olor is used--releasever=releasever set value of $releasever in Yum config and repo files--d
  Ownloadonly don ' t update, just download--downloaddir=dldir specifies a alternate directory to store packages --setopt=setopts set arbitrary config and repo options

Summarize a few commonly used:
1 installation
Yum Install all installed
Yum Install Package1 Install the specified installation package Package1
Yum groupinsall group1 Installer group group1

2 Updates and Upgrades
Yum Update all Updates
Yum Update Package1 the specified package Package1
Yum check-update Check for updatable programs
Yum Upgrade Package1 Upgrade the specified package Package1
Yum groupupdate group1 upgrade program group Group1

3 Find and display
Yum Info package1 Display installation package information Package1
Yum list shows all packages that have been installed and can be installed
Yum List Package1 shows the installation of the specified package Package1
Yum groupinfo group1 Display program group group1 information Yum Search string finds an installation package based on a keyword string

4 Removing programs
Yum Remove | Erase Package1 Remove Package Package1
Yum groupremove group1 Delete program group group1
Yum deplist package1 Viewing program package1 dependencies

5 Clear Cache
Yum Clean packages clears the packages under the cache directory
Yum clean headers clears the headers in the cache directory
Yum clean oldheaders clears the cache directory of old headers
Yum clean, yum cleaned all (= Yum cleaning packages; yum Clear oldheaders) clears the packages under the cache directory and the old headers

The

/etc/yum.conf is a yum configuration file, as follows:

# cat yum.conf [main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=0 debuglevel=2 Logfile=/var/log/yum.log Exactarch=1 Obsoletes=1 gpgcheck=1 Plugins=1 installonly_limit=5 bugtracker_url=http://bugs.centos.org/set_ Project.php?project_id=19&ref=http://bugs.centos.org/bug_report_page.php?category=yum distroverpkg=  Centos-release # This are the default, if you do this bigger Yum won ' t the If the metadata # are newer on the remote and So you'll "gain" the bandwidth of the "not have to" # Download the new metadata and "pay" for it by Yum does have correct #
Information. # It is esp. important, to have correct metadata, for distributions like # Fedora which don ' t keep old packages around.  If you don ' t like this checking # interupting your command line usage, it's much better to have something # manually check
The metadata once an hour (Yum-updatesd'll do). # metadata_expire=90m # put YOUR REPOS this OR in separate files named File.repo # IN/ETC/YUM.REPOS.D

Cachedir:yum Cached Directories, yum the RPM packages and databases downloaded in this store, 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: Represents whether to upgrade only packages that are consistent with the CPU system of your installation package, if set to 1, if you install a i386 rpm, Yum will not be upgraded with a 686 package.
Gpgcheck: Represents whether to perform GPG checksum: 0 and 1, if not, default 1.

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.