The Yum configuration file is located in/etc/yum. conf and/etc/yum. repos. d/CentOS-Base.repo directory use yum note: must use root identity to execute yum; yum configuration file in the image site must be able to network with their own; mirror site closer, the larger the bandwidth, the better. it is convenient to download...
The Yum configuration file is located in the/etc/yum. conf and/etc/yum. repos. d/CentOS-Base.repo directories
When using yum, note that you must use the root identity to execute yum. The image site in the yum configuration file must be able to connect to your own network. the closer the image site is, the higher the bandwidth, the better, and convenient download.
[Root @ localhost ~] # Yum [options] COMMAND software
List of Commands:
Install: Install a package or packages on your system
Update: Update a package or packages on your system
Remove: remove a software, followed by the software name
Search: Search package details for the given string search a software or key keyword
List: List a package or groups of packages list the names and versions of software managed by yum, similar to rpm-qa
Info: Display details about a package or group of packages, similar to rpm-qai
Clean: Remove cached data the downloaded file is placed in/var/cache/yum. you can use clean to clear it.
Check-update: Check for available package updates
Groupinfo: Display details about a package group
Groupinstall Install the packages in a group on your system
Grouplist: List available package groups
Groupremove: Remove the packages in a group from your system
Groupupdate: upgrade the entire software group
Help: Display a helpful usage message
Deplist: List a package's dependencies: lists the dependencies of software packages. you can view the dependencies when using the local source software package for installation.
Downgrade: downgrade a package
Erase: Remove a package or packages from your system
Localinstall: Install a local RPM Install the local rpm Package
Makecache: Generate the metadata cache to Generate data cache
Provides: Find what package provides the given value Find the value provided by the package
Reinstall: reinstall a package to reinstall the software package
Repolist: Display the configured software repositories
Resolvedep: Determine which package provides the given dependency
Shell: Run an interactive yum shell
Upgrade: Update packages taking obsoletes into account
Options
-Y: answer yes for all questions
-Installroot = [path]: set install root is installed in other paths, instead of in the current directory tree architecture.
-H -- help: show this help message and exit
-T -- tolerant: be tolerant of errors
-C: run entirely from cache, don't update cache
-C: [config file] config file location
-R [minutes] maximum command wait time
-D [debug level] debugging output level
-Showduplicates show duplicates, in repos, in list/search commands
-E [error level] error output level
-Q, -- quiet operation
-V, -- verbose operation
-Version show Yum version and exit
-Enablerepo = [repo] enable one or more repositories (wildcards allowed)
-Disablerepo = [repo] disable one or more repositories (wildcards allowed)
-X [package], -- exclude = [package] exclude package (s) by name or glob
-Disableexcludes = [repo] disable exclude from main, for a repo or for everything
-Obsoletes: enable obsoletes processing during updates
-Noplugins: disable Yum plugins
-Nogpgcheck: disable gpg signature checking
-Disableplugin = [plugin] disable plugins by name
-Enableplugin = [plugin] enable plugins by name
-Skip-broken: skip packages with depsolving problems
-Color = COLOR: control whether color is used
[Root @ localhost ~] # Yum search gcc checks whether gcc software is available on the host. if so, it is displayed.
[Root @ localhost ~] # Yum info gcc list names and versions of software managed by installed yum
..............................................................................
Name: gcc
Arch: i386
Version: 4.1.2
Release: 48. el5
Size: 9.6 M
Repo: installed
Summary: Various compilers (C, C ++, Objective-C, Java ,...)
URL: http://gcc.gnu.org
License: GPL
Description: The gcc package contains the GNU Compiler Collection version 4.1.You'll need this package in order to compile c code
..............................................................................
Displays the software version name, data size, software source, and other information. Note the summary and description information.
You can find information about the software based on the yum search software name. The yum list software name lists the version and name of the software and determines whether to install the software.
Run the rpm-q software name to check whether the software is installed. if not, run the yum install software name.
Yum can take the initiative to handle dependencies. the downloaded software is usually stored in/var/cache/yum, which can be cleared to save disk space.
[Root @ localhost ~] # Yum clean packages # clear the downloaded software package
[Root @ localhost ~] # Yum-y update # manual system update