yum is a software package manager. It is a tool for installing, updating, and removing packages and their dependencies on RPM-based systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.
yum is wrapper around rpm.
Features include:
up2date is now deprecated in favor of yum (Yellowdog Updater Modified). The entire stack of tools which installs and updates software in Red Hat Enterprise Linux 5.2 is now based on yum.
yum should be already installed but you can install utility command such as the yum-config-manager
yum install yum-utils
For the manipulation of package, see Linux - RPM package (RPM: Red Hat Package Manager)
sudo yum list installed
sudo yum list searchTerm
yum -y update
- name: 'Upgrade all packages'
yum:
name=*
state=latest
when: ansible_os_family == "RedHat" # Centos
/etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
http_caching=packages
Search a shared library
Example:
yum whatprovides 'libXrender.so.1'
Output:
Loaded plugins: ulninfo
libXrender-0.9.8-2.1.el7.i686 : X.Org X11 libXrender runtime library
Repo : ol7_latest
Matched from:
Provides : libXrender.so.1
libXrender-0.9.10-1.el7.i686 : X.Org X11 libXrender runtime library
Repo : ol7_latest
Matched from:
Provides : libXrender.so.1
For more information on yum:
man yum