Sub topic 12
Putting it together: a decision workflow and example scenarios
This chapter turns the comparisons from earlier chapters into a repeatable process. It assumes you can use a Linux shell, install packages, manage services with systemd, and read basic firewall and permission settings. Earlier chapters covered the Debian and RHEL lineages, support lifecycles, apt and dnf, repositories, AppArmor and SELinux, firewall tools, cloud images, and migration effort. Here you apply them in order.
Why a workflow beats a favorite
All three distributions run the same kernel, systemd, OpenSSH, and nginx. A server built on any of them can do the same job. The differences are in the surrounding costs: how long you get security fixes, who you can call, how much existing knowledge your team has, and how much work an upgrade takes. A workflow makes you state these constraints before you pick, so the choice is a conclusion you can defend and not a habit.
Work through the questions in a fixed order. Hard constraints come first because they eliminate options. Preferences come last because they only break ties.
Step 1: Collect facts about the environment
Before deciding anything, record what you already run. If you manage existing servers, this script reports the family, the active mandatory access control system, and the active firewall front end. Run it on a few hosts to see how consistent your fleet is.
#!/usr/bin/env bash
. /etc/os-release
case " $ID ${ID_LIKE:-} " in
*" debian "*) family="Debian family" ;;
*" rhel "*) family="RHEL family" ;;
*) family="unknown family" ;;
esac
echo "OS: $NAME $VERSION_ID ($family)"
if command -v getenforce >/dev/null 2>&1; then
echo "MAC: SELinux $(getenforce)"
elif [ "$(cat /sys/module/apparmor/parameters/enabled 2>/dev/null)" = "Y" ]; then
echo "MAC: AppArmor enabled"
else
echo "MAC: none detected"
fi
for fw in firewalld ufw nftables; do
if systemctl is-active --quiet "$fw"; then
echo "Firewall: $fw is active"
fi
doneDebian does not enable a firewall front end by default, so the script may print no firewall line on a fresh Debian install. That is a finding, not a bug: the host may have no packet filtering at all.
Step 2: Apply the decision workflow
The diagram shows the order of the questions. Each question can end the process early.
Question 1: Is there a hard vendor requirement?
Commercial databases, backup agents, monitoring suites, and hardware drivers often list certified platforms. If your vendor certifies only RHEL and its rebuilds, running Debian can void their support. Rocky Linux is binary-compatible with RHEL by design, but check whether the vendor names Rocky explicitly or only RHEL. Some vendors accept compatible rebuilds and some do not. Ask in writing.
If the vendor certifies Ubuntu LTS, that decides it. Stop here when a hard requirement exists.
Question 2: How long must one installation live?
Match the support horizon to the time you expect the server to stay in service without a major upgrade.
| Distribution | Typical free security support | Longer options |
|---|---|---|
| Ubuntu Server LTS | 5 years from release | Ubuntu Pro extends coverage to 10 years |
| Debian stable | About 5 years (roughly 3 from the security team, then about 2 from the LTS team) | Commercial extended support from third parties |
| Rocky Linux | Up to 10 years per major release | Follows the RHEL lifecycle |
Check the exact end dates on each project's site before committing, because they are fixed per release. If a system must run unchanged for eight years with no budget, Rocky is the straightforward fit. If you can budget for Ubuntu Pro or plan one major upgrade, Ubuntu and Debian are both viable.
Question 3: What does the team already know?
The best-supported distribution is the one your team can operate at 3 a.m. Compare the daily tools:
- apt and dpkg on Ubuntu and Debian, dnf and rpm on Rocky.
- AppArmor profiles on Ubuntu and Debian, SELinux contexts and booleans on Rocky.
- ufw on Ubuntu, firewalld on Rocky, and nothing by default on Debian.
SELinux enforcing has a steeper learning curve than AppArmor. The usual failure is an administrator who hits a denial and runs setenforce 0 permanently. If your team will do that, either invest in training or choose a distribution where the default policy is easier to live with. Disabling mandatory access control to make a service start is a security regression, not a fix.
Question 4: How fresh must the software be?
Stable releases freeze package versions and backport security patches. Check the version in the repository against what your application needs:
# Debian / Ubuntu
apt policy postgresql
# Rocky Linux
dnf info postgresqlIf the repository version is too old, you have three options: add the vendor's own repository, use a language-level or container-based deployment, or choose the distribution that ships a newer version. On Rocky, EPEL adds many extra packages, but it does not replace core packages and is community maintained. Third-party repositories add a maintenance and trust burden, so count them as a cost of the choice.
Question 5: Break ties
If nothing above decided the matter, use secondary criteria:
- Ubuntu Server has the widest set of cloud images, tutorials, and answers online.
- Debian has the smallest default footprint and a conservative, community-run process.
- Rocky gives RHEL-style behavior without a subscription.
Example scenarios
Scenario A: A startup runs a web application on cloud VMs
The team of four developers has no dedicated sysadmin. They deploy with containers and automation, and they want current runtimes and plenty of documentation. No vendor constraints exist.
Ubuntu Server LTS fits. Cloud providers publish well-maintained Ubuntu images, ufw and AppArmor are simple defaults, and the five-year window covers the product's early life. Debian would also work. Rocky would add SELinux learning cost with no offsetting benefit.
Scenario B: A company runs certified commercial software on RHEL-family systems
An enterprise database vendor certifies RHEL 9 and 10. The operations team already uses SELinux, firewalld, and Ansible roles written for RHEL, and servers stay in service for many years.
Rocky Linux fits, provided the vendor accepts compatible rebuilds. The team's existing skills transfer and the ten-year lifecycle suits long-lived systems. If the vendor insists on RHEL itself for support, buy RHEL and keep the same tooling.
Scenario C: A small organization needs a stable, minimal file and mail server
One part-time administrator runs a handful of servers. They want few surprises, a small attack surface, and no licensing questions. Changes should be rare.
Debian stable fits. Packages change little during a release, and the installer lets you choose a minimal system. The administrator must add a firewall deliberately, because Debian does not enable one by default:
sudo apt install ufw
sudo ufw allow 22/tcp
sudo ufw enableScenario D: A legacy CentOS migration
A group has CentOS servers whose upstream support ended. They need a drop-in replacement with minimal retraining.
Rocky Linux fits, because the package manager, file layout, and SELinux model stay the same. Migration still carries risk. Take a snapshot or backup first, test on a clone, and confirm that third-party repositories support the new major version.
Common mistakes in the decision
- Choosing by package version alone. A newer version today is not worth a shorter support window if the server will live for years.
- Ignoring the upgrade path. Moving between major releases is real work on all three distributions. Plan the effort and a rollback before you start.
- Mixing repositories freely. Pulling packages from several third-party sources into one host is a common cause of broken upgrades.
- Standardizing too early. Running two distributions across a fleet doubles your tooling and runbooks. Pick one default and allow exceptions only with a reason you can write down.
- Forgetting the firewall difference. Moving a runbook from Rocky to Debian can leave a host with no packet filtering, because the firewall step was implicit before.
A summary table for quick reference
| Situation | Leading choice | Main reason |
|---|---|---|
| Vendor certifies RHEL family only | Rocky Linux | Compatibility and support terms |
| Ten-year horizon, no support budget | Rocky Linux | Longest free lifecycle |
| Small team, cloud-first, fast start | Ubuntu Server LTS | Images, documentation, simple defaults |
| Paid support wanted without RHEL | Ubuntu Server LTS | Ubuntu Pro option |
| Minimal, conservative, few changes | Debian stable | Small footprint, slow change |
| Replacing CentOS | Rocky Linux | Same tooling and layout |
Exercise
A hospital runs an imaging application whose vendor certifies only RHEL 9 and compatible rebuilds. The IT team knows apt well but has never used SELinux. The system must stay in service for about eight years. Which distribution does the workflow select, and what risk should the team plan for?
Show answer
Rocky Linux. The vendor requirement is a hard constraint, so it decides the matter at Question 1, and the ten-year lifecycle also covers the eight-year horizon. The risk is the team's lack of SELinux and dnf experience. They should plan training and learn to fix denials with the correct context or boolean instead of disabling SELinux. They should also confirm in writing that the vendor supports Rocky and not just RHEL.
Exercise
You install Debian stable on a new server and run the script from Step 1. It prints the OS line and the MAC line but no firewall line. What does this mean, and what should you do?
Show answer
None of firewalld, ufw, or nftables is active, and Debian does not enable a firewall front end by default, so the server is accepting traffic without packet filtering. Install and configure a firewall, for example ufw with sudo ufw allow 22/tcp followed by sudo ufw enable, and make sure SSH is allowed before enabling it so you do not lock yourself out.
Exercise
A colleague proposes running Ubuntu on some servers and Rocky on others "to use the best of each." Name two costs of this and one condition under which it is justified.
Show answer
Costs include maintaining two sets of automation and runbooks (apt and dnf, AppArmor and SELinux, ufw and firewalld) and needing staff who can operate both. It is justified when a specific constraint requires it, such as a vendor certifying only one distribution for one workload, and that reason is documented.