Sub topic 5
Repositories, EPEL, and Third-Party Software
This chapter assumes you can use a Linux shell, install packages, and recognize a systemd service. It focuses on how software reaches a server and how to judge whether a package source is trustworthy and suitable.
How repositories work
A repository is a server that publishes package files and metadata. The metadata lists package names, versions, dependencies, checksums, and signing information. Your package manager downloads this information before it installs or updates software.
A package manager is a tool that resolves dependencies and records installed files. Debian-family systems use apt, which works with packages in the .deb format. Rocky Linux uses dnf, which works with packages in the .rpm format.
The package manager normally chooses a package from configured repositories. A repository may be:
- A distribution repository maintained by Ubuntu, Debian, or Rocky Linux.
- An additional repository maintained by the distribution community.
- A vendor repository operated by a software company.
- A private repository operated by your organization.
The repository source affects update speed, package versions, support, and trust.
Inspecting package sources
Use /etc/os-release to identify the operating system before choosing repository instructions. ID_LIKE often shows the distribution family.
. /etc/os-release
echo "$NAME $VERSION_ID (ID=$ID, ID_LIKE=${ID_LIKE:-none})"On Ubuntu or Debian, refresh the local package index with apt update. This downloads current metadata but does not install upgrades. You can inspect a package before installing it:
sudo apt update
apt policy nginxThe output shows available versions and the repository that provides each version. apt policy is useful when a package is already installed or when several repositories offer different versions.
On Rocky Linux, dnf info displays package details and the repository that provides a package:
dnf info nginx
dnf repolistdnf repolist lists enabled repositories. Keep repository definitions under review. An enabled repository can affect future upgrades even when you are not installing from it directly.
| Task | Debian or Ubuntu | Rocky Linux |
|---|---|---|
| Refresh repository metadata | `sudo apt update` | `sudo dnf makecache` |
| Search for a package | `apt search name` | `dnf search name` |
| Inspect package information | `apt policy name` | `dnf info name` |
| Install a package | `sudo apt install name` | `sudo dnf install name` |
| List enabled sources | Inspect `/etc/apt/sources.list.d/` | `dnf repolist` |
EPEL on Rocky Linux
EPEL means Extra Packages for Enterprise Linux. It is a community project that builds additional packages for Enterprise Linux-compatible systems. Rocky Linux users often enable EPEL when a desired package is absent from the base repositories.
sudo dnf install epel-release
dnf repolistEPEL does not replace Rocky Linux repositories. It extends them. Check package availability and compatibility before using an EPEL package in a production system. A package may have a different release cadence or support path from the base operating system.
Choosing third-party software sources
Third-party software often comes through one of four methods:
- A vendor repository configured with a signed repository key.
- A vendor-provided package downloaded and installed directly.
- A source archive compiled on the server.
- A container image managed separately from the host package system.
A vendor repository usually provides repeatable updates and dependency metadata. A standalone package can be convenient, but you must plan how to receive security updates. Compiling from source gives control over build options but creates a larger maintenance responsibility.
Before adding a source, check:
- Whether it supports your exact distribution and release.
- Whether packages are signed and how keys are rotated.
- Whether the vendor documents security updates.
- Whether the software integrates with your package manager and systemd.
- Whether the vendor supports the chosen architecture.
- Whether the license and support contract fit your organization.
- Whether a later operating-system upgrade will remain supported.
Avoid mixing packages built for unrelated distributions. An RPM intended for a different Enterprise Linux release may install successfully and still fail during upgrades. Likewise, a Debian package from an incompatible Ubuntu release can replace libraries or dependencies unexpectedly.
Common errors and safe practice
apt update does not upgrade installed packages. It only refreshes package information. Installing a package without refreshing metadata can select an older or unavailable version.
On Rocky Linux, inspect enabled repositories before troubleshooting dependency changes. If a repository is no longer maintained, disable it rather than accepting random packages from another source.
Record repository configuration as code or in your server documentation. Test repository changes on a disposable system first. In production, use a repository mirror or internal package proxy when you need controlled versions and repeatable deployments.
Exercise
A package is missing from Rocky Linux's enabled repositories. What should you check before enabling EPEL or a vendor repository?
Show answer
Confirm the package name and supported operating-system release, search the base repositories, inspect the source's signing and update policy, and test the package with the intended workload before using it in production.