Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Master Red Hat, Debian approaches to Linux package management

Whether you use Red Hat or Debian package manager, get informed on the repositories and commands for easier Linux management.

Red Hat and Debian package managers function similarly but with architectural differences that affect Linux ad...

ministration.

Linux package management uses repositories, which provide installation sources for software packages. Repositories automatically find and install package dependencies. Without system for repositories, dependency tracking can be an annoyance.

On current Linux distributions, there are two leading tools for software package management with repositories: Debian package management is found on Debian and derivatives, such as Ubuntu and Linux Mint; and the Red Hat package management is used on Red Hat Enterprise Linux (RHEL) and distributions of that ilk, like Fedora. Red Hat and Debian package management use a default package format. Red Hat uses .rpm; Debian-based distributions use .deb. These packages are compressed archives of software and metadata. The metadata provides information about the software version, as well as current dependencies.

Package database versus repositories can get confusing. Managing software packages through repositories makes working with these packages easier, but it also adds another database. That means information about packages can be obtained from multiple sources: the package database and the repository database.

Working with the package database

In both cases, the package database is the most important source of information concerning what is installed on a Linux server. The package database retrieves information from your server about currently installed software, which is useful since the package file is normally a rich source of documentation and software usage information.

On a Red Hat package manager-based server, use the rpm command to get information from the database. On a Debian-based server, use the dpkg command. For example, the dpkg -L command fetches a list of files associated with a package, or the rpm -ql command shows which files are included in one.

Working with repositories

To install new software and perform upgrades, system administrators work with repositories. Especially when updating servers, repositories are much more convenient: The package manager just needs to upload the new packages to make them automatically available, and the repository user transparently starts using them.

On Red Hat-based repositories, use the yum command to request package information and perform tasks, like updating and installing software. To do so, yum regularly downloads an updated repository index file.

On Debian-based systems, this index file needs to be manually uploaded, using the apt-get update command to update the package cache on the local machine. Once the package cache is uploaded, it is easy to install software packages and updates.

The system compares its list of packages in the repository to those installed on the local machine, determining if a package has been installed and if an update is available.

The system that deals with dependencies works particularly well: all current Linux distributions provide rich repositories that deliver necessary dependencies, which means that Linux admins hardly encounter 'dependency hell.'

Non-repository software

It is more difficult to install software that is not in the repositories. Administrators can create their own repositories and copy local packages there. This also allows them to install custom packages from repositories, further decreasing dependency problems.

About the author:

Sander van Vugt is an independent trainer and consultant based in the Netherlands. He is an expert in Linux high availability, virtualization and performance. He has authored many books on Linux topics, including Beginning the Linux Command Line,Beginning Ubuntu LTS Server Administration and Pro Ubuntu Server Administration.

Next Steps

Learn more about the differences between Linux server OSes

Red Hat Package Manager: What you need to know

This was last published in March 2015

Dig Deeper on Linux servers

PRO+

Content

Find more PRO+ content and other member only offers, here.

Join the conversation

2 comments

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

Do you have a preferred Linux server distribution, or choose based on the hosted workloads?
Cancel
I like to use the latest stable Debian distribution because it is easy to install software, do patch updates, and move to the newest stable version. Changing stable versions can take time to download all of the new kernel, etc. and there can be some cleanup needed of old kernel versions but it is simple to use apt to install packages. If your favorite software is only on RPM you can convert it to Debian.
Cancel

-ADS BY GOOGLE

SearchWindowsServer

SearchServerVirtualization

SearchCloudComputing

Close