Project Oxygen & Ideo-LabIDEO LAB Dashboard 2026
IDEO·LAB

🧭 CentOS — Guide Complet (CentOS Linux vs CentOS Stream ‱ RHEL ecosystem)

CentOS aujourd’hui = surtout CentOS Stream : une distro “continuously delivered” situĂ©e juste en amont de RHEL (entre Fedora et RHEL). :contentReference[oaicite:0]{index=0} CatĂ©gorie IDEO-Lab : O/S & Platforms.

centos.org
1.1

CentOS : c’est quoi ?

Historique, place dans l’écosystĂšme Enterprise Linux, pourquoi ça compte encore.

LinuxEnterpriseRHEL ecosystem
1.2

CentOS Linux vs Stream

La bascule : CentOS Linux (classique) est EOL, Stream devient la voie principale.

EOLStreamRoadmap
2.1

CentOS Stream (modĂšle)

“Continuously delivered”, upstream de RHEL, quand l’utiliser (ou pas) en prod.

UpstreamCIPlatform
2.2

Installation & bootstrap

ISO, minimal install, réseau, SSH, mises à jour, base tools, SELinux baseline.

InstallSSHSELinux
3.1

Paquets : dnf / yum

DNF, repos, modules, updates, rollback (si dispo), best practices “enterprise”.

DNFReposModules
4.1

Sécurité (SELinux, firewall)

SELinux (enforcing), firewall-cmd, SSH hardening, patching, audit.

SELinuxFirewallDHardening
5.1

Cloud & AWS (patterns)

Images, bootstrap, immutabilité, monitoring. (et quand préférer Amazon Linux / RHEL).

AWSEC2Images
6.1

Ops : systemd, logs, réseau

Playbook “prod” : systemctl, journalctl, perf, IO, troubleshooting.

systemdLogsDebug
7.1

Migrations & alternatives

Aprùs CentOS Linux : choix “RHEL-like” (Rocky/Alma), ou Stream, ou RHEL.

MigrationRockyAlma
15

Cockpit (Web Admin)

Administration web native : services, logs, stockage, users, perf.

CockpitWeb UI
16

Ansible & System Roles

Configuration management standard EL : rĂŽles officiels, idempotence.

AnsibleIaC
17

Nginx / Web Stack

Nginx, PHP-FPM, reverse proxy, SELinux, perf & hardening.

NginxWeb
18

PostgreSQL (Serveur)

DB sur EL : install, tuning OS, SELinux, perf IO.

PostgreSQLDBA
19

Backups & DR

Snapshots, rsync, cloud backups, restore tests.

BackupDR
20

KVM / Virtualisation

libvirt, virt-install, bridges, use-cases.

KVMVirtualisation
21

RAID / mdadm

RAID logiciel, fiabilité, rebuild, monitoring.

RAIDStorage
22

SELinux Deep-Dive

Contexts, booleans, ports, policies : niveau expert.

SELinuxSecurity
1.1 CentOS : définition, contexte, réputation
CentOS aujourd’hui

Le projet CentOS met dĂ©sormais l’accent sur CentOS Stream : une distribution livrĂ©e en continu, pensĂ©e comme plateforme de collaboration autour du dĂ©veloppement de RHEL. :contentReference[oaicite:1]{index=1}

À retenir : “CentOS” dans le monde pro = souvent “Stream” (ou “ex-CentOS Linux 7/8”).
Cas d’usage (rĂ©alistes)
CasPourquoiRemarque
Dev/QA “Enterprise Linux”proche de RHELtests avant prod
Contrib/RHEL ecosystemupstream workflowSIGs, packaging
Prod “trĂšs rĂ©gulĂ©e”souvent nonprĂ©fĂ©rer RHEL / clones
Image à insérer :
CentOS Positioning
Placeholder : static/img/centos/centos_positioning.png
Positionnement dans l’écosystĂšme

CentOS Stream se prĂ©sente comme une “midstream” entre Fedora et RHEL : une base collaborative, continuellement livrĂ©e, en avance de quelques pas sur RHEL. :contentReference[oaicite:2]{index=2}

CoucheObjectifPublic
Fedorainnovation rapidedevs, features
CentOS Streampreview/validation RHELbuilders, QA, ecosystem
RHELstabilité/supportprod enterprise
Diagramme (flux simplifié)
                    Fedora (innovations)
                    │
                    ▌
                    CentOS Stream (continuously delivered, upstream RHEL)
                    │
                    ▌
                    RHEL (enterprise release stable + support)
                
InterprĂ©tation : Stream = excellent pour “voir arriver” les changements RHEL, moins adaptĂ© si tu veux un OS figĂ© des annĂ©es.
1.2 CentOS Linux vs CentOS Stream : EOL & implications
CentOS Linux (classique) : fin de support

CentOS Linux 8 est arrivé en EOL le 31 décembre 2021. :contentReference[oaicite:8]{index=8} CentOS Linux 7 a atteint sa fin de vie le 30 juin 2024. :contentReference[oaicite:9]{index=9}

Consequence : si tu “penses” CentOS comme avant (clone gratuit de RHEL), ce n’est plus le modùle principal.
Dates clés (références projet CentOS / Red Hat)
ProduitStatutDateSource
CentOS Linux 8EOL2021-12-31CentOS Project :contentReference[oaicite:10]{index=10}
CentOS Linux 7EOL2024-06-30CentOS blog + Red Hat :contentReference[oaicite:11]{index=11}
CentOS Stream 8Fin de builds2024-05-31CentOS Project :contentReference[oaicite:12]{index=12}
Quoi faire si tu as (encore) des CentOS Linux
  • Rester dans l’écosystĂšme RHEL : aller vers RHEL (support), ou vers une distro compatible “RHEL-like”.
  • CentOS Stream : si tu veux ĂȘtre proche des Ă©volutions RHEL et participer Ă  l’écosystĂšme. :contentReference[oaicite:13]{index=13}
  • Alternatives populaires : Rocky Linux / AlmaLinux (souvent choisis aprĂšs la bascule). :contentReference[oaicite:14]{index=14}
RĂšgle prod : choisis une stratĂ©gie (support + cadence de patching + rollback) avant de migrer “au hasard”.
2.1 CentOS Stream : modĂšle, usages, limites
Définition officielle (résumé)

CentOS Stream est une distribution oĂč la communautĂ© peut dĂ©velopper, tester et contribuer Ă  une distribution livrĂ©e en continu en amont de RHEL, en collaboration avec les Ă©quipes RHEL. :contentReference[oaicite:15]{index=15}

Traduction “terrain” : Stream = “preview stable-ish” des packages qui iront dans une future RHEL.
Quand Stream est un bon choix
ContexteStreamPourquoi
Dev/QA enterprise✅valider compat RHEL à venir
Build d’outils/agents✅anticiper changements
Prod “strictement figĂ©e”⚠prĂ©fĂ©rer RHEL / compat clones
Audits/compliance lourde⚠support/contrats attendus
Pipeline simplifiĂ© (dev → prod)
                    Fedora (features rapides)
                    ▌
                    CentOS Stream (integration / validation upstream RHEL)
                    ▌
                    RHEL (release stable + support)
                
Image à insérer :
CentOS Stream Pipeline
Placeholder : static/img/centos/centos_stream_pipeline.png
Docs Ă  connaĂźtre
  • CentOS Stream docs : https://docs.centos.org/centos-stream-docs/ :contentReference[oaicite:16]{index=16}
  • Docs CentOS (hub) : https://docs.centos.org/ :contentReference[oaicite:17]{index=17}
  • CentOS Stream page : https://www.centos.org/centos-stream/ :contentReference[oaicite:18]{index=18}
2.2 Installation & bootstrap (CentOS Stream / EL-like)
Installer “propre” (pattern)
  • Choisir une installation minimal (moins de surface d’attaque)
  • Activer SSH, crĂ©er un user admin (sudo/wheel), dĂ©sactiver root login direct
  • Configurer rĂ©seau (DHCP ou statique), hostname, timezone, NTP
  • Mettre Ă  jour immĂ©diatement aprĂšs install
Docs : portail docs CentOS (Stream + SIG). :contentReference[oaicite:19]{index=19}
Post-install “serveur” (starter pack)
                    # updates
                    sudo dnf -y update

                    # base tools
                    sudo dnf -y install vim git curl wget htop tar unzip
                    sudo dnf -y install chrony
                    sudo systemctl enable --now chronyd

                    # firewall baseline (ex: SSH seulement)
                    sudo systemctl enable --now firewalld
                    sudo firewall-cmd --permanent --add-service=ssh
                    sudo firewall-cmd --reload
                
Prod : fixe un process patching (cadence + tests + rollback). Ne “dnf update” pas au hasard.
SELinux : le rĂ©flexe “Enterprise Linux”

Sur l’écosystĂšme EL (RHEL-like), SELinux est un pilier. Objectif : rester en Enforcing, et traiter les exceptions proprement (policies) plutĂŽt que dĂ©sactiver.

                    getenforce
                    sestatus

                    # logs utiles
                    sudo journalctl -t setroubleshoot
                    sudo journalctl | grep -i avc
                
Bon signal recruteur : “je garde SELinux enforcing et je sais lire les AVC”.
Diagramme bootstrap (infra moderne)
                    Image/ISO → Minimal install → SSH + user admin
                    │
                    ├─ dnf update
                    ├─ firewalld (ports stricts)
                    ├─ SELinux enforcing
                    ├─ agents (monitoring/logs)
                    └─ config management (Ansible) / golden image (Packer)
                
Image à insérer :
CentOS Bootstrap Flow
Placeholder : static/img/centos/centos_bootstrap_flow.png
3.1 Paquets : dnf/yum, repos, modules — bonnes pratiques
DNF : commandes essentielles
                    dnf --version
                    sudo dnf -y update
                    dnf list installed | head
                    dnf search nginx
                    sudo dnf -y install nginx
                    dnf info nginx
                    sudo dnf -y remove nginx
                    sudo dnf -y autoremove
                
Repos : ce que tu veux maĂźtriser
  • Quels dĂ©pĂŽts sont activĂ©s (base/appstream/
 selon EL)
  • TraçabilitĂ© : “quel paquet vient d’oĂč”
  • Verrouillage : Ă©viter d’introduire des repos tiers sans gouvernance
                    dnf repolist
                    dnf repoinfo
                
Modules (concept)

Les modules permettent de sĂ©lectionner des flux de versions pour certaines stacks. À utiliser avec discipline (sinon “drift”).

                    dnf module list
                    dnf module info 
                    sudo dnf module enable :
                
Best practices “enterprise”
RĂšglePourquoiEffet
Patch windowmaütrise du risquemoins d’incidents
Golden image + replacerollback simpleinfra reproductible
Repos gouvernéscohérencedebug plus facile
4.1 Sécurité : SELinux, firewall, SSH hardening, patching
SSH hardening (baseline)
                    # cÎté serveur : no password + no root
                    sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
                    sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
                    sudo systemctl restart sshd
                
FirewallD (pattern)
                    sudo systemctl enable --now firewalld
                    sudo firewall-cmd --state
                    sudo firewall-cmd --get-active-zones

                    # ouvrir web
                    sudo firewall-cmd --permanent --add-service=http
                    sudo firewall-cmd --permanent --add-service=https
                    sudo firewall-cmd --reload
                
SELinux : garder “Enforcing”
                    getenforce
                    sestatus
                    sudo journalctl | grep -i avc
                
Anti-pattern : “je dĂ©sactive SELinux pour que ça marche”. Mieux : comprendre, ajuster les contexts/policies.
Policy de sécurité (simple & solide)
  • Ports minimaux (SG + firewall)
  • ClĂ©s SSH uniquement, bastion si besoin
  • Patching rĂ©gulier (cadencĂ©)
  • Logs centralisĂ©s + alerting (auth, sudo, anomalies)
  • Backups + restore testĂ©s
5.1 Cloud & AWS : patterns (et choix CentOS vs RHEL vs alternatives)
Pattern EC2 “clean”
                    Launch instance
                    ├─ Image (CentOS Stream / RHEL-like)
                    ├─ Instance type
                    ├─ Security Groups (ports minimum)
                    ├─ Keypair (SSH)
                    ├─ User-data (bootstrap minimal)
                    └─ Monitoring + logs + backups
                
Image à insérer :
AWS CentOS Reference
Placeholder : static/img/centos/aws_centos_reference_arch.png
Immutabilité (recruteur-friendly)
ApprochePrincipePourquoi
Golden imageAMI/Packerreproductible
Rolling replaceASG / blue-greenrollback rapide
Config mgmtAnsibletraçabilité
Quel OS sur AWS (décision pragmatique)
BesoinChoixPourquoi
Prod avec support EnterpriseRHELcontrat + conformité
Dev/QA RHEL ecosystemCentOS Streamupstream RHEL :contentReference[oaicite:20]{index=20}
Remplacer “ancien CentOS Linux”Rocky/Almaalternatives courantes :contentReference[oaicite:21]{index=21}
6.1 Ops : systemd, journald, perf, troubleshooting
Playbook “prod” (toujours le mĂȘme)
                1) SymptÎme précis (quoi / depuis quand / scope)
                2) Service (systemctl status) + logs (journalctl)
                3) Réseau (ip/route/DNS/ports)
                4) Ressources (CPU/RAM/IO/disk)
                5) Changement récent ? (deploy/update/conf)
                6) Fix minimal + plan rollback
                7) Post-mortem (action préventive)
            
Commandes réflexes
                        systemctl status nginx
                        systemctl restart nginx
                        journalctl -u nginx --since "1 hour ago"
                        ip a ; ip r
                        ss -lntp
                        df -h ; free -h
                    
Perf (baseline)
                        uptime
                        top
                        vmstat 1
                        iostat -xz 1   # si sysstat installé
                    
Tip CV : “je sais diagnostiquer vite : logs → rĂ©seau → service → ressources → rollback”. C’est exactement ce que cherche un SRE/DevOps.
7.1 Migrations & alternatives aprĂšs CentOS Linux
Options “rĂ©alistes”
OptionPour quiNotes
CentOS Streamdev/QA, buildersupstream RHEL :contentReference[oaicite:22]{index=22}
RHELprod enterprisesupport/compliance
Rocky / Almaex-CentOS Linuxalternatives courantes :contentReference[oaicite:23]{index=23}
Important : CentOS Linux 7 est EOL (2024-06-30). Si tu en as encore : priorité migration. :contentReference[oaicite:24]{index=24}
Plan de migration (pro, sans panique)
                    1) Inventaire : OS, version, paquets clés, services, dépendances
                    2) Classer : prod critique / non critique / dev
                    3) Choisir cible : Stream vs RHEL vs Rocky/Alma
                    4) Faire un clone/staging : tests fonctionnels + perf
                    5) Automatiser : IaC + config management
                    6) Rollout : blue/green ou rolling
                    7) Observabilité : logs + metrics + alerting
                    8) Décommission : old nodes
                
Checklist “avant cutover”
  • Backups + restore testĂ©s
  • Ports/Firewall identiques
  • SELinux policy validĂ©e (ou plan d’ajustement)
  • Monitoring OK (CPU/IO/disk, logs auth)
  • Rollback prĂȘt (image prĂ©cĂ©dente, snapshots)
Image à insérer :
CentOS Migration Checklist
Placeholder : static/img/centos/migration_checklist.png
15) Cockpit — Administration Web native
À quoi sert Cockpit ?

Cockpit est une interface web officielle Red Hat / CentOS pour administrer un serveur : services, logs, réseau, stockage, users, conteneurs, VMs.

Installation
                sudo dnf -y install cockpit
                sudo systemctl enable --now cockpit.socket
                # accĂšs : https://server:9090
            
Ce que tu peux faire
Servicesstart/stop, status systemd
Logsjournald graphique
StorageLVM, partitions, mounts
Userscomptes, sudo
PerfCPU, RAM, IO temps réel
Usage pro : diagnostic rapide, pas un remplacement d’Ansible/IaC.
16) Ansible & EL System Roles
Pourquoi Ansible sur CentOS ?

Ansible est l’outil standard de configuration management dans l’écosystĂšme EL.

Installation
sudo dnf -y install ansible-core
ansible --version
      
System Roles officiels
networkinterfaces, routes
timesyncchrony/NTP
firewallfirewalld
selinuxbooleans, state
storageLVM
Phrase CV : “Infra EL gĂ©rĂ©e via Ansible System Roles (idempotent)”.
17) Nginx sur CentOS (prod-ready)
Installation
sudo dnf -y install nginx
sudo systemctl enable --now nginx
      
SELinux (classique)
setsebool -P httpd_can_network_connect on
semanage port -a -t http_port_t -p tcp 8080
      
Bonnes pratiques
  • Reverse proxy + app isolĂ©e
  • Timeouts maĂźtrisĂ©s
  • Logs + rotation
18) PostgreSQL sur CentOS (OS + DB)
Installation (repo PGDG)
sudo dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -y install postgresql15-server
      
Tuning OS essentiel
IO schedulerSSD → none
vm.swappinessfaible
/var/lib/pgsqldisk dédié
DBA sérieux : OS tuning + DB tuning vont ensemble.
19) Backups & Disaster Recovery
Rùgle d’or

Backup non testé = pas un backup

Stratégies
Snapshotsrapides, pas suffisants seuls
rsyncsimple, efficace
CloudS3, Glacier
rsync -av --delete /data backup:/data
      
20) KVM & libvirt
Installation
sudo dnf -y install qemu-kvm libvirt virt-install
sudo systemctl enable --now libvirtd
      
Cas d’usage
  • Labs internes
  • Legacy workloads
  • Isolations fortes
21) RAID logiciel (mdadm)
RAID ≠ Backup

RAID protĂšge contre panne disque, pas erreur humaine.

Types courants
RAID 1miroir
RAID 5perf + tolérance
RAID 10perf + sécurité
cat /proc/mdstat
mdadm --detail /dev/md0
      
22) SELinux Deep-Dive (niveau expert)
Les 3 piliers SELinux
Contextstype, user, role, level
Booleansswitchs comportement
PoliciesrĂšgles autorisation
Commandes clés
ls -Z /var/www
semanage fcontext -l | head
getsebool -a | head
      
Anti-pattern ultime : désactiver SELinux en prod.
Niveau expert : comprendre SELinux = comprendre l’Enterprise Linux.