Linux - yum command (Yellowdog Updater Modified)

1 - About

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:

  • Support for multiple repositories
  • Simple configuration
  • Dependency calculation
  • Fast operation
  • RPM-consistent behavior
  • Package group support, including multiple-repository groups
  • Simple interface
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.

3 - Management

For the manipulation of package, see Linux - RPM package (RPM: Red Hat Package Manager)

3.1 - List installed package


sudo yum list installed

3.2 - Search packages


sudo yum list searchTerm

3.3 - Upgrade all package

ansible


- name: 'Upgrade all packages'
  yum:
    name=*
    state=latest
  when: ansible_os_family == "RedHat" # Centos

3.4 - Configuration

/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

3.5 - Repository

3.6 - Whatprovides

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

4 - Documentation

For more information on yum:


man yum

5 - Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap