Supposing that I am going to install a package, what's the difference between these two commands: rpm -ivh <package>
and yum install <package>
same question for example with rpm -Uvh <package>
and yum update <package>
(for updating issue)
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityFor rpm
you must specify where to get the file with the new version of the package.
yum
, which is a more intelligent management system, try to find a new version of the package in their repositories, will look for the package dependencies, will look for the fastest repository mirror (and make a lot of other pleasantrie)
U
will install and remove old versions and i
will just install.
Feb 12, 2020 at 21:19
yum localinstall <packagename>
to intelligently install dependencies as needed.
Feb 12, 2020 at 21:21
yum
is the default package manager for Enterprise Linux (RHEL/CentOS) but other distributions may use other managers such as apt-get
.
Feb 12, 2020 at 21:27
rpm
- RPM Package Manager.yum
- is an interactive, rpm based, package manager.there is no difference if you're installing single file as both yum
which is wrapper for rpm
and they both offers same core functionality, however yum
can do more as yum
works with repo(s) and it can handle updates & has plugins, while rpm
works with file(s).
If you want to know if a package was installed using rpm or through yum, issue "yum list installed" and check the 3rd column. If it is:
---"installed" then it was installed using rpm command
---"@base" or other repo, it means it has been installed through yum from a repo
---"@"example_filename. A filename after @ means it has been installed using "yum localinstall package.rpm", so a local rpm install through yum
It's best to install through yum because it also resolves dependencies. And if you compile from source code&install (e.g. you can't find the needed package for your distro), these installs are not registered in rpmdb so yum and rpm will not display and manage those installations afterwards.