Managing Version Conflict with CentOS Stream Module Streams
Learn how to use CentOS Stream Module Streams to manage multiple versions of software like PHP or databases without the overhead of full containerization.
18 Jul 2026, 00:13 UTC

The Versioning Dilemma: Legacy vs. Modern
A single host often has to run a legacy internal tool that requires PHP 7.4 alongside a new API that requires PHP 8.0. The usual options are a costly migration, full container overhead, or manual builds from source.
CentOS Stream Module Streams provide a middle ground. A module stream is a version track for a software set, managed through DNF, that lets you pin a runtime to a specific release while staying on the same base OS and receiving security updates for that track.
How Module Streams Work
A module groups related packages and offers multiple streams, each representing a major version. Profiles define common package sets within a stream.
Enabling a stream filters DNF to that version track. Updates and errata for the selected stream are delivered via the normal DNF channels, so the chosen version remains patched without being forced to the base repository default.
Worked Example: Selecting a PHP Stream
Run as root or with sudo on a CentOS Stream host.
1. Identify available streams
List the module and its streams:
dnf module list phpThe output shows available streams such as 7.4, 8.0, 8.1 and marks the default [d] and enabled [e].
2. Enable and install a specific version
Enable the desired stream and install:
sudo dnf module enable php:7.4sudo dnf install phpVerify the runtime:
php -v3. Switching streams
To move to a newer track, disable first then enable:
sudo dnf module disable php:7.4sudo dnf module enable php:8.0sudo dnf install phpVerify again with php -v.
Trade-offs and Limitations
Module Streams are not a full replacement for containers.
- Exclusive activation: one stream of a module is active globally at a time. Running two streams side-by-side on the same host generally requires separate environments.
- Coverage: not all software is modularized. Non-modular packages remain tied to the base repository version.
- Dependency drift: mixing old streams from one module with new streams from another can create library conflicts if they share low-level dependencies.
- Defaults can shift with point releases, so enabled modules should be reviewed periodically.
Practical Verification
After a change or dnf update, confirm state:
- Run dnf module list to confirm the [e] marker is on the intended stream.
- Run the tool version flag, e.g., php -v, to confirm the binary matches the stream.
- Restart the service, e.g., systemctl restart php-fpm, and test the application path.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.