A package is a collection of executables, libraries, documentation, tools, utilities, and components. You can install and manage it on Linux the same way you install application software on Windows. Windows uses the extension .exe for application software. RedHat and Ubuntu Linux use the extensions .rpm and .deb for packages. In simple words, .exe, .rpm, and .deb are application software for different platforms.
Packages Groups
A packages group is a collection of packages designed to serve a common purpose. It allows us to install all necessary packages for a specific requirement. There are two types of packages groups: environment groups and packages groups. Environment groups allow us to customize the installation. Packages groups allow us to set the system for specific usages.
The following table lists packages groups for both types.
Environment groups | Packages groups |
Server with GUI, Server, Minimal Install, Workstation, Custom Operating System, Virtualization host | Container management, Smart card support, Security tools, System tools, Network servers |
When we install Linux, the installation process presents a list of all environment groups on the Software Selection screen and allows us to select a packages group. The installation process installs all packages of the selected group.
If we want to install, remove, list, or manage packages groups after the installation, we can use the dnf command. This command allows us to manage both types of packages groups.
Repository
A repository is a place where packages are stored. RedHat uses online repositories to store and update packages. If you have an active RedHat subscription, you can use these repositories to download and install the latest and updated packages.
You can use the RHEL installation disk to create a local repository. A local repository allows you to install packages for testing and learning purposes. To learn how to create a local repository, you can check the following tutorial.
RedHat uses the same approach to pack packages on the installation disk. It keeps all packages in a directory. The installation process uses this directory as a local repository to install the selected packages.
Before RHEL8, RedHat used to pack all packages in a single repository (directory) called Packages.
Since all packages are stored in a single repository (directory), an OS update would update all installed packages including kernel and application services to the latest version. Sometimes this could result in an unstable system or a non-working application due to an unwanted upgrade of one or more packages.
RedHat solved this problem by separating core components from application packages. Starting from RHEL8, it packs packages in two directories: BaseOS and AppStream
The BaseOS directory (repository) includes the core components such as kernel, modules, bootloader, and other essential software packages. The AppStream directory(repository) includes all other software packages.
This change allows administrators to update the base system or application packages independently without impacting the stability of services and the system.
Application Streams
Before RHEL8, RedHat used to maintain different versions of the same package in different repositories. Starting from RHEL8, RedHat introduced a new concept called Application streams.
In this concept, RedHat organizes multiple versions of a package in a single repository. To store multiple versions of the same package in a single repository, it uses a modular approach. In this approach, it organizes packages in modules.
Module
A module is a logical container of packages. It includes everything that you need to install the package. For example, if a package has documentation, libraries, tools, and utilities, they all will be available in the module.
Module Streams
If a package is available in multiple versions, it uses a separate module for each version. For example, if a package is available in three versions, it will use three separate modules: one for each version. These modules are called module streams. Each module stream stores packages for a specific version only.
Module streams provide two main advantages.
- Developers can easily update packages of a version without interfering with other versions.
- RedHat can store multiple versions of the same package in the same repository.
Each module can have multiple streams, but you can use only one stream at a time. If a module has multiple streams, Linux automatically sets the latest or recommended version as the default stream. If you want to use another stream, you have to make that stream as default.
Module profiles
A module profile is similar to a packages group. It is a list of recommended packages organized for a particular purpose. It may include packages from the BaseOS repository and module streams.
You can install and manage module profiles in the same way you manage packages groups.
You can use the dnf module list command to list all available modules on the system.
To view all streams of a specific module, you need to specify its name as an argument. For example, to view all streams of the PHP module, use the following command.
#dnf module list php
That's all for this tutorial. In this tutorial, we discuss packages groups, modules, module streams, and module profiles.