YUM VS RPM: WHO IS THE WINNER?

Naveen Singh
4 min readApr 19, 2020
a package installer

Talking about Linux (Redhat) when it comes to software or package there are three command to play with package. The extension of software in Linux is ‘rpm’ such as ‘firefox.rpm’.

But what is Package Manager?

Answer-A package manager deals with packages/software, distributions of software and data in archive files. Packages contain metadata, such as the software’s name, description of its purpose, version number, vendor, checksum (preferably a cryptographic hash function), and a list of dependencies necessary for the software to run properly.

The first one is “rpm” command, it is similar to the ‘double click on software’s setup in windows’ but rpm does the same thing from the command line. It means from the terminal you should have to give the path of software (where the software is located) then run the command.

For example, Firefox setup in my case is in ‘packages’ folder which resides in nav folder… oh no quite confusing then take a look on this snap:

finding the path of software
we found the package here

-q(query), –l(list) are the options of rpm. for other options try ‘man rpm’ command.

So we find out where the software resides, now its installation time:

firefox is installed using rpm

Firefox is installed using rpm.

“Actually this software came in DVD which is used to install Redhat. So just mount the DVD, open it and open the package directory”.

a powerful tool to install package

Yum is a powerful tool to install software/package because it doesn’t have to go to the software’s directory instead of this yum store the location of software where the package is placed and the most important:- most of the software has some dependency that is a software rely on another software for its complete installation and proper functionality. Don’t get confused we always carry an example but first install firefox using yum

/etc/yum.repos.d/ is the location where repo file (file having extension repo such as disc.repo) which contain the baseurl(location of the package, here ‘file:’ means the path located in hard disk and if the software is on the internet just give the whole URL as baseurl), unique id(always in square brackets []), name and gpgcheck(it check the signature of that creator or developer). Maybe your DVD mounted at /run/media/Redhat8 X86_64 but you can check it by ‘lsblk’ command.

When the repository is created that is repo file, you can check it by ‘yum repolist’ if some number comes as output then repository is created successfully or if 0 comes then maybe the baseurl is wrong.

installing firefox

Firefox is installed by yum tool

The example in which software has dependencies :

the dependencies

Here we can see one package is dependent on the other 5 packages while installing httpd (example) and yum will install all of them while rpm don’t have this feature that’s why yum is more powerful than rpm.

Winner:- YUM

DNF

DNF is an advanced version of yum that makes the installation process faster.

Note: In RedHat 8 the packages reside in two directories ‘AppStream’ and ‘BaseOs’. So make sure while making repository mention both.

Thank you

--

--