In this section, we will take a look at RPM
and YUM
package managers in detail.
This package manager is used in RHEL as well as other linux distributions but these are the most common ones. The File extensions for packages manage by RPM is .RPM
RPM has five basic modes of operations. Each of these modes can be run using rpm
command followed by a specific command options
. Despite of this, RPM doesn’t resolve dependencies on its own. This is why we make use of a higher level of package manager called YUM
.
Verfiying
YUM is a free and opensource package manager.
/etc/yum.repos.d/
and repository files will have the .repo
extension.RPM
to manage packages on the linux systems.Unlike RPM, YUM handles package dependencies very well (Automatic Dependency Resolution). It is able to install any dependencies packages to get the base package install on the linux system.
yum install
command is issued YUM first runs transaction check, if the package is not installed in the system yum checks the configured repositories under /etc/yum.repos.d/
for the availability of the requested package.It also checks if there are any dependent packages are already installed in the system or if it needs to be upgrade.
y
button (this step can be skipped by providing the -y
flag with the yum install
command).Yum will download and install necessary RPMs to linux system
If you want to update a single package, use yum update
command. If the package is already in the latest version in the repository and hence no action will be taken
To list all the repos added to your system. Run yum repolist
$ yum repolist
To check which package should be installed for specific command to work. Use yum provides
command followed by
$ yum provides scp
To Install a package
$ yum install httpd
To Install a package to automatically answer “yes” to any question prompt during the operation. Use -y
flag with the yum install
command.
$ yum install httpd -y
To remove a package
$ yum remove httpd
To update a package
$ yum update telnet
To update all packages in the system, use the yum update
command without any arguments.
$ yum update