< Day Day Up > |
Yum is a system for managing RPM packages, including installing, updating, removing, and maintaining packages; it automatically handles dependencies between packages. Yum is derived from yup, an updating system written for Yellow Dog Linux, an RPM-based Macintosh distribution. Yum downloads the information in the package headers to a directory on your system, which it then uses to make decisions about what it needs to do. Yum obtains both the headers and the RPMs themselves from a collection of packages on a server, known as a repository. A repository consists of a set of RPM packages and the package headers on a server that can be accessed via FTP or HTTP, from an NFS server, or from a local filesystem. A single server can contain multiple repositories, repositories are often mirrored on many servers, and you can configure yum to use multiple repositories. When they are downloaded to your system, the header and package files are maintained in /var/cache/yum. The configuration file, /etc/yum.conf, is where you customize yum. It consists of two section types. The first section, [main], sets configuration defaults for yum operation. This section is followed by [server] sections, where each server is named according to the repository it specifies. For example, for Fedora Core, you might have [base] for the base Fedora Core repository and [development] for the development repository. The server sections can also be stored, one to a file, in /etc/yum.repos.d. yum comes with a default yum.conf file, which you can use as-is or as a starting point from which to add additional repositories. 6.3.1. The yum CommandThe yum command is an automated system for updating rpm-based packages, particularly on Fedora Core and Red Hat Enterprise Linux. Yum can automatically install, upgrade, and remove packages. In addition to individual packages or a list of packages, yum can operate on an entire group of packages at a time. When you run yum, it first updates the cache (unless you tell it not to with the -C option), then it proceeds to perform the requested operation. The format of the yum command is: yum [options] [command] [package ...] Any general options are specified first, followed by a command telling yum what you want it to do, usually followed by a list of one or more packages. The command is always required, except with the --help, -h, and --version options. Package names can be specified in various combinations of name, architecture, version, and release. For example, you could refer to the bash package as bash, bash.i386, bash-3.0, bash-3.0-17, or bash-3.0-17.i386. 6.3.1.1. General optionsThe following general options can be set on the command line. For those that can also be set in the [main] section of the yum.conf configuration file, the name of the configuration option is given.
6.3.2. Yum Command SummaryThe individual yum commands are listed here.
check-update Determine if updates are available, without running yum interactively. If any package updates are available, return an exit value of 100 and a list of packages. If there are no updates, return 0.
clean [options] Clean up the yum cache directory. Options
generate-rss [updates] Create an rss file that lists changelogs for all packages in the enabled repositories. If updates is specified, the rss file lists only updates that apply to your system.
groupinfo groups Like info, but operates on package groups instead of individual packages.
groupinstall groups Like install, but operates on package groups instead of individual packages.
grouplist Generate a list of installed and available groups to standard output. You can use these groups as input parameters to the other group commands, with their names in quotes ("...").
groupremove groups Like remove, but operates on package groups instead of individual packages.
groupupdate groups Like update, but operates on package groups instead of individual packages.
info [options] [packages] Display version information, a summary, and a description for each package, or for all packages if none is specified. See list for a description of the options.
install packages Install the latest version of a package or packages, ensuring that all dependencies are met. If no package matches the name as specified, the name is treated as a shell glob and any matches are installed.
list [options] [packages] Display a list of packages that match the packages specification and that are installed or available for installation. Options
localinstall packages Install the specified packages, which reside on the local system, rather than downloading them from a repository.
localupdate packages Update the specified packages, which reside on the local system, rather than downloading them from a repository.
makecache Download and cache the metadata files from the repository. Once the cache has been built, you can use the -C option to run the commands that use the metadata (check-update, info, list, provides, and search) directly from the cache.
provides feature1 [feature2 ...] List packages that are available or installed that provide the specified features. The features can be specified as a name or as a wildcard in file-glob syntax format, and Perl or Python regular expressions can be used.
remove package1 [package2 ...] erase package1 [package2 ...] Remove the specified packages from the system. Also remove any packages that depend on the specified packages.
search string1 [string2 ...] Find packages matching the specified string or strings in the description, summary, packager, or package name fields. Perl or Python regular expressions can be used for the strings. Useful for finding a package if you don't know the name.
update [packages] With no packages specified, update all installed packages. Otherwise, update the specified packages. In either case, yum makes sure that all dependencies are satisfied. If no package matches, the names specified are assumed to be shell globs and any matches are installed. With the --obsoletes option, yum includes obsolete processing logic in its calculations.
upgrade [packages] Equivalent to update --obsoletes.
whatprovides feature1 [feature2 ...] Same as provides. See provides for more information. |
< Day Day Up > |