Overview
The purpose of this guide is to know the usage of YUM (Yellowdog updater modified). It is an automatic updater and package installer/remover for rpm system(s).One of the main features, it automatically identifies dependencies and ensures as to what packages needs to be installed to complete requested package installation.
You can also utilize yum to install a group of packages, one of such group is “Development Tools”.
Yum has a plugin interface for adding simple features. Yum can also be used python programs via its module interface.
yum clean, is cache option will help in managing the disk space at regular intervals on the system.
Applies To
- Linux flavor where yum is installed
- Tested on CentOS 7, RHEL 7
Yum Options
Yum command has different options for performing different type of package administration, few of the major commands are discussed here.Yum Package Listing
yum list command lists package(s) in any repository enabled, packages installed, packages available for installation for the system.List Packages
Yum list’s packages as well as refine your list with a package specification of any of the package's name, arch, version, release, epoch. This option will list both installed and available packages.yum list or yum list all
List Available Packages
Lists all the packages available for installation from in any of enabled repository on system.yum list available
List Installed Packages
This command is equivalent to “rpm -qa”. It lists all the packages installed on the system.yum list installed
List Extras Packages
This command lists any installed package which no longer appears in any of your enabled repositories. Useful for finding packages which linger between upgrades or things installed not from a repo.yum list extras
List Obsoletes
List the packages installed on the system that are obsoleted by packages in any yum repository listed in the config file.yum list obsoletes
List Updates
This command lists any package in an enabled repository if a update is available for installed package(s) on the server.yum list updates
List Recent Package
List packages recently added packages into the repositories.yum list recent
List Package Pkgspec
This command allows you to refine your listing for particular packages.yum list pkgspec java-1.6.0-openjdk.x86_64
List Update Packages
It’s exactly like yum list updates but returns an exit code of 100 if there are updates available. Handy for shell scripting. Running in verbose mode will list obsolete packages also.yum check-update
List Package Info
This displays more information about any package installed or available. It takes the same arguments as yum list but it is best run with a specific package name.yum info NetworkManager
List Package Search
This allows you to search for information from the various metadata available about packages. It can accept multiple arguments.It will output the packages which match the most terms first followed by the next highest number of matches, etc. Specifically yum search looks at the following fields: name, summary, description, URL.
To find for what package provides a certain command try yum provides instead.
yum search postfix -q or
yum search postfix -all -q ; To search all the packages list containing postfix.
List Package Provides
yum provides or yum whatprovides is used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to list the packages available or installed that provide that feature or file.Command | Purpose |
---|---|
yum provides */main.cf -q | To list package name containing the file in a package |
yum whatprovides /etc/httpd/ -q | To list package name containing the folder hierarchy |
yum provides /etc/httpd/conf/httpd.conf -q | To list package name containing the queried path and file in the directory |
Slideshare Information
A step by step guide is uploaded to slideshare.
No comments:
Post a Comment