RedHat Package Manager
Some Linux distribution uses rpm the “Red Hat Package Manager” for all its distribution software. The RPM Package Manager (RPM) is a powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating computer software packages. Each software package consists of an archive of files along with information about the package like its version, a description, and the like. There is also a library API, permitting advanced developers to manage such transactions from programming languages such as C or Python.
RPM is a core component of many Linux distributions, such as Red Hat Enterprise Linux, the Fedora Project, SUSE Linux Enterprise, openSUSE, CentOS, Meego, Mageia and many others.
It is also used on many other operating systems as well, and the RPM format is part of the Linux Standard Base.
To install a RPM package, do:
#rpm -i [package].rpm #The package will be installed only if the dependency are met and there is no conflict with another package.
To upgrade a .rpm package, do:
#rpm -U [package].rpm #The files of the old package version will be removed and replaced by the new files. To remove a RPM package, do: #rpm -e [package] #The package will be removed only if there are unresolved dependencies.
RPM Queries
With the -q option you can query the RPM database.
rpm -q -i apache The -i is to get package information.
Yum
searches numerous repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues. Red Hat Enterprise Linux 5 uses Yum
to fetch packages and install RPMs.
Yum uses a configuration file at /etc/yum.conf
. Also refer yum(8) man page for more information.
RedHat Package Manager Yum
The foundation of the Package Updater is the Yum redhat package manager, developed by Duke University to improve the installation of RPMs. yum
searches supported repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues. Red Hat Enterprise Linux 5 uses yum
to fetch packages and install packages.
Examples using yum install RedHat Package manager
1) Install a package:
#yum install package
Example:
yum install httpd
2) Remove a package:
#yum remove package
Example:
#yum remove httpd
3) Update a package:
#yum update package
Example:
#yum update httpd
4) Search for a package:
#yum search package
Example:
#yum search httpd
5) Find information about a package:
#yum info package
Example:
#yum info httpd
6) List packages containing a certain term:
#yum list term
Example:
#yum list httpd
7) Find what package provides a particular file:
#yum whatprovides 'path/filename'
Example:
yum whatprovides 'etc/httpd.conf'
yum whatprovides '*/libXp.so.6'
8) Update all installed packages with kernel package :
#yum update
Example:
#yum update
9) To update a specific package:
yum update <package-name>
Example:
#yum update openssh-server