How to use yum in Redhat, Fedora, CentOS

Linux OS Topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

How to use yum in Redhat, Fedora, CentOS

Post by Saman » Mon Jun 14, 2010 10:40 pm

To update system. Update of the system with all the dependencies that are necessary:

Code: Select all

yum update
Searches. To make a search of some package or term in the data base in some of the formed deposits yum in the system:

Code: Select all

yum search any-package
Example:

Code: Select all

yum search httpd
I hope this will help you understand how to use yum more effeciently. Any erros in this how please notify me.

Consultation of information. To consult the information contained in a package in individual:

Code: Select all

yum info any-package
Example:

Code: Select all

yum info httpd
Installation of packages. Installation of paquetería with automatic resolution of dependencies:

Code: Select all

yum install any-package
Example.

Code: Select all

yum install gkrellm
Uninstalling packages. Desinstalación of packages along with everything what it depends on these:

Code: Select all

yum remove any-package
Example.

Code: Select all

yum remove gkrellm
Listing Packages. The following thing will list all the packages available in the data base yum and that can settle:

Code: Select all

available yum list|less
The following thing will list all the packages installed in the system:

Code: Select all

yum list installed|less
The following thing will list all the packages installed in the system and that can (they must) be updated:

Code: Select all

yum list updates|less
Cleaning of the system.

Yum leaves as result of its use heads and packages RPM stored in the interior of the directory located in the route /var/cache/yum/. Particularly the packages RPM that have settled can occupy much space and is by such reason agrees to eliminate them once no longer they have utility. Also it agrees to do the same with the old heads of packages that no longer are in the data base. In order to make the corresponding cleaning, the following thing can be executed:

Code: Select all

yum clean all
Group install

Code: Select all

yum groupinstall "groupname"
Don't forget the quotation marks for group install.

To install a set of application that starts with a common prefix. To install gkrellm, gkrellm-plugins, gkrellm-misc-plugins,

Code: Select all

yum install gkrellm*
To search in package names only, use yum list. This differs from search in that it's much faster, as it will search package names only, while yum search will search all the package info, including package description.

Code: Select all

yum list something
Example

Code: Select all

yum list mozilla
To get the name of the package containing a given file:

Code: Select all

yum provides filename
example:

Code: Select all

yum provides /usr/bin/mozilla
Here's some new goodies in yum 2.2 (Fedora Core 3 and beyond)

To get a list of packages updated/added to any of your repositories recently:

Code: Select all

yum list recent
To enable a repository which is disabled in the configuration:

Code: Select all

yum --enablerepo=reponame install packagename
example:

Code: Select all

yum --enablerepo=dag install j2re
To list available software groups, such as GNOME desktop environment or X window system. This is also available in the Core 2 yum, but servers doesn't use this wonderful feature much.

Code: Select all

yum grouplist
To install such a group:

Code: Select all

yum groupinstall "groupname"
Example:

Code: Select all

yum groupinstall "GNOME Desktop Environment"
And to update a group

Code: Select all

yum groupupdate "GNOME Desktop Environment"
And remember folks, you can always use -y to say yes to everything, and -C to use the cache only.
Post Reply

Return to “Linux”