Product SiteDocumentation Site

1.2.2. Installing

You can install a package and all of its non-installed dependencies by entering:
~]# yum install <package_name> 

You can install multiple packages simultaneously by appending their names as arguments: yum install <package_name> [more_names] .
If you are installing packages on a multilib system, such as an AMD64 or Intel64 machine, you can specify the architecture of the package (as long as it's available in an enabled repository) by appending .arch to the package name:
~]# yum install sqlite2.i586

You can use glob expressions to quickly install multiple similarly-named packages:
~]# yum install audacious-plugins-\*

In addition to package names and glob expressions, you can also provide file names to yum install. If you know the name of the binary you want to install, but not its package name, you can give yum install the path name:
~]# yum install /usr/sbin/named

yum then searches through its package lists, finds the package which provides /usr/sbin/named, if any, and prompts you as to whether you want to install it.
What if you know you want to install the package that contains the named binary, but don't know in which bin or sbin directory that file lives? In that situation, you can give yum provides a glob expression:
~]# yum provides "*bin/named"
Loaded plugins: presto, refresh-packagekit, security
32:bind-9.6.1-0.3.b1.fc11.x86_64 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
Repo        : fedora
Matched from:
Filename    : /usr/sbin/named
~]# yum install bind

Example 1.5. Finding which package owns a file and installing it


yum provides is the same as yum whatprovides.

Tip: yum provides/whatprovides and Glob Expressions

yum provides "*/<file_name>" is a common and useful trick to quickly find the package(s) that contain <file_name>.

Installing a Package Group

A package group is similar to a package: it is not useful itself, but installing one also pulls in a group of dependent packages that serve a common purpose. A package group has a name and a groupid. The yum grouplist -v command lists the names of all package groups, and, next to each of them, their groupid in parentheses. The groupid is always the term in the last pair of parentheses, such as kde-desktop and kde-software-development in this example:
~]# yum -v grouplist kde\*
KDE (K Desktop Environment) (kde-desktop)
KDE Software Development (kde-software-development)

You can install a package group by passing its full group name (without the groupid part) to groupinstall:
~]# yum groupinstall "KDE (K Desktop Environment)"

You can also install by groupid:
~]# yum groupinstall kde-desktop

You can even pass the groupid (or quoted name) to the install command if you prepend it with an @-symbol (which tells yum that you want to perform a groupinstall):
~]# yum install @kde-desktop