Linux-Basics-Complete-Course-With-Notes-Slides

RPM and YUM Package Managers

In this section, we will take a look at RPM and YUM package managers in detail.

RPM (Redhat Package Manager)

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

Working with 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.

  1. Installing
  2. Uninstalling
  3. Upgrade
  4. Query
  5. Verfiying

    rpm-modes

YUM (Yellowdog Updater Modifier)

YUM is a free and opensource package manager.

Let us see how YUM installs a package.

yum-repo

Now, lets take a look at sequence of steps envolve while installing the package.

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

yum-update

Common Commands

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 name.

$ 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