Google+

Sunday 26 January 2014

Difference between rpm and yum in RHEL/Centos/Oracle Linux

RPM (Red Hat Package Manager) and Yum (Yellowdog Updater Modified) are both package management tools used in Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux to install, update, and remove software packages.

RPM is a low-level package management tool that is used to install, update, and remove individual software packages. It can be used to install packages from local or remote sources, and it works with files that have the ".rpm" extension.

Yum is a higher-level package management tool that is built on top of RPM. It is used to manage groups of software packages and their dependencies. It can automatically resolve dependencies and install all necessary packages, Yum can also automatically update all packages on the system, and it can also remove unnecessary packages. It works with repositories, which are collections of RPM packages that are stored on a server and can be accessed over a network.
yum-rpm


RPM


1.Installation of packages through command line options.
   # rpm -ivh apache 2.2.366.rpm

2.Dependency resolution is not possible
   If we need to install apache ,all the dependency packages must be installed separately.

3.Group installation of packages is not possible
   All the web server components cannot be installed as a group.

4. Centralized management of packages is not possible.

5. Cannot connect to online rpm repositories to install packages, each package must be downloaded.

6. RPM cannot check for the available software updates online and to install them automatically.


YUM


1. Installation of packages through keywords.
    #yum install apache*

2.Dependency resolution is possible.
   If we are installing apache ,all the dependency packages will be installed automatically.

3.Group installation of packages is possible
   # yum groupinstall "Web Server"

4.Centralized management of packages is possible
   All the packages can be stored on a centralized server and can be retrieved for installation of packages in one or more clients by updating the centralized yum repository in client yum configuration file.

5.Can connect to online rpm  repositories to install packages,

6.YUM can check online for all the software updates online and install them automatically replacing the existing packages.
  # yum install upgrade




In summary, RPM is a command line tool for managing individual packages, while Yum is a command line tool for managing groups of packages and their dependencies. Yum is easier to use and more efficient than RPM.

Additionally, Yum can be used to install and update packages from the official Red Hat and CentOS repositories, as well as from third-party repositories. This makes it an ideal tool for managing software packages in production environments, because it simplifies the process of keeping systems up to date with the latest security patches and bug fixes.