
đ Debian GNU/Linux â Guide Complet (Stable/Testing/Unstable âą Server âą Cloud/AWS)
Debian = la distro âsocleâ : stabilitĂ©, cohĂ©rence, apt, culture qualitĂ©. Base de nombreuses distros (dont Ubuntu). CatĂ©gorie IDEO-Lab : O/S & Platforms.
Debian : câest quoi ?
Philosophie, âsocial contractâ, rĂ©putation prod, pourquoi Debian est un socle.
O/S & Platforms Linux FoundationReleases : stable/testing/unstable
Comprendre le modÚle Debian, choisir la bonne branche, risques & bénéfices.
Stable Testing UnstableInstallation (netinst / firmware / UEFI)
ISO, partitions, réseau, install guide officiel, firmware & drivers, post-install.
Install UEFI Debian InstallerAPT / sources.list / pinning
Repositories, security repo, upgrades, backports, âapt policyâ, pinning propre.
APT Repos BackportsSécurité (DSA, tracker, hardening)
Debian Security, annonces, security-tracker, patch policy, SSH/UFW, audit.
Security DSA CVEPerformance & robustesse
Pourquoi Debian est âprĂ©visibleâ en prod, tuning OS, IO/RAM, observabilitĂ©.
Perf Robust OpsCloud & AWS (AMIs Debian)
Images Debian EC2, patterns IAM/SG, bootstrap, cloud-init vs scripts, golden images.
AWS EC2 ImagesDépannage (méthodo)
Logs, systemd, réseau, DNS, disque, boot, services : playbook Debian.
Debug Logs IncidentsCheat-Sheet Debian
Commandes essentielles + checklists prod + recettes APT + sécurité.
Quick Checklist OpsDéfinition (en 30 secondes)
Debian GNU/Linux est une distribution Linux communautaire, connue pour son modĂšle de releases (stable, testing, unstable) et sa rĂ©putation de base âsolideâ pour serveurs. Le projet maintient une documentation structurĂ©e et un Ă©cosystĂšme packages via APT. :contentReference[oaicite:1]{index=1}
Cas dâusage (rapide)
| Contexte | Pourquoi Debian | Notes |
|---|---|---|
| Serveur web/API | stable, packages éprouvés | nginx/apache, systemd |
| DB (PostgreSQL/MySQL) | predictible, maintenance | kernel stable |
| Appliance / VM image | base minimaliste | durable, clean deps |
| Cloud | images officielles | EC2 AMIs disponibles |

static/img/debian/debian_positioning.pngPourquoi Debian est âcrĂ©dibleâ en entreprise
- Stable : la branche recommandée pour production :contentReference[oaicite:2]{index=2}
- Upgrades prévisibles : moins de surprises en prod
- APT : gestion fine versions/dépendances
- ĂcosystĂšme : immense repo de paquets
- Sécurité : annonces + tracker
Comparatif mental (grossier mais utile)
| CritÚre | Debian stable | Conséquence |
|---|---|---|
| Stabilité | trÚs forte | excellent pour prod |
| Nouveautés | modérées | moins de régressions |
| Ops/infra | excellent | base âcleanâ |
| Cloud images | oui | déploiements standard |
Diagramme OS (mental model)
Apps / Services (nginx, postgres, django, redis, docker)
â
âŒ
User-space Debian (apt, systemd, glibc, coreutils, journald)
â
âŒ
Linux Kernel (scheduler, memory, fs, network stack)
â
âŒ
Hardware / Hypervisor (bare metal, KVM, AWS Nitro)
Ce que tu touches le plus
- APT : updates, versions, security
- systemd : services, targets, dépendances
- Logs : journald + /var/log
- Réseau : IP/route/DNS/firewall
Erreur fréquente
- Passer en âtestingâ en prod sans gouvernance
- Ajouter dépÎts tiers sans pinning/validation
- Ignorer security announcements / patching
Liens officiels (Ă bookmark)
- Download Debian : https://www.debian.org/distrib/ :contentReference[oaicite:3]{index=3}
- Releases (stable/testing/unstable) : https://www.debian.org/releases/ :contentReference[oaicite:4]{index=4}
- Security : https://www.debian.org/security/ :contentReference[oaicite:5]{index=5}
- Security Tracker : https://security-tracker.debian.org/ :contentReference[oaicite:6]{index=6}
- Installation Guide (ex bookworm amd64) : https://www.debian.org/releases/bookworm/amd64/ :contentReference[oaicite:7]{index=7}
Le modÚle Debian (résumé)
Debian maintient au minimum trois branches en parallÚle : stable (prod recommandée), testing (prochaine stable), unstable (sid, flux continu). :contentReference[oaicite:8]{index=8}
unstable (sid) âââș testing âââș stable
(rolling) (pré-stable) (prod)
Impacts (tableau)
| Branche | Avantage | Risque |
|---|---|---|
| stable | prévisible | versions moins récentes |
| testing | plus âmoderneâ | instabilitĂ©s possibles |
| unstable | dernier cri | breakages |
Exemples récents (références officielles)
| Codename | Version | Statut | Notes |
|---|---|---|---|
| bookworm | Debian 12.x | ancienne stable | page release info officielle :contentReference[oaicite:10]{index=10} |
| trixie | Debian 13.x | stable actuelle | page release info officielle :contentReference[oaicite:11]{index=11} |

static/img/debian/debian_release_flow.pngMatrice de choix (pragmatique)
| Besoin | Choix | Pourquoi |
|---|---|---|
| Serveur prod (web/db/batch) | stable | recommandĂ©e âproduction releaseâ :contentReference[oaicite:12]{index=12} |
| Workstation dev stable | stable (+ backports) | équilibre stabilité / nouveautés |
| Tester futures versions | testing | préparer migration |
| Packaging/dev Debian | unstable (sid) | contrib upstream |
Choisir lâISO
- netinst : installation minimale + téléchargement packages
- DVD : plus âofflineâ, utile si rĂ©seau limitĂ©
- Architectures : amd64, arm64, etc.
Installation Guide (officiel)
Le guide dâinstallation Debian (ex: bookworm amd64) est la rĂ©fĂ©rence exhaustive. :contentReference[oaicite:14]{index=14}
- https://www.debian.org/releases/bookworm/amd64/ :contentReference[oaicite:15]{index=15}
- https://www.debian.org/doc/user-manuals :contentReference[oaicite:16]{index=16}
Ătapes clĂ©s (pratique)
- Boot UEFI (clĂ© USB) â choisir âInstallâ ou âGraphical installâ
- Langue, clavier, réseau (DHCP ou statique)
- Hostname + domaine (si applicable)
- Users + mot de passe (root ou sudoer selon politique)
- Partitionnement (auto ou manuel)
- Sélection de paquets (Desktop / SSH / standard system utilities)
- GRUB bootloader â reboot
# Post-install minimal
sudo apt update && sudo apt -y upgrade
sudo apt -y install curl wget vim git htop ca-certificates

static/img/debian/install_debian_steps.pngPartitions : patterns solides (serveur)
| Pattern | Quand | Avantage |
|---|---|---|
| LVM | serveur | resize plus simple |
| /var séparé | logs/docker | évite saturation / |
| Chiffrement | laptop / données | sécurité |
Ex serveur simple
- / 30-50G
- /var 20-80G (logs, cache, docker)
- /home selon usage
- swap selon RAM/politique
Post-install âpropreâ (prod-ready)
- Updates + sécurité (policy)
- SSH keys + désactiver auth password si possible
- Firewall (nftables/ufw selon stack) + ports minimaux
- NTP / timezone / hostname
- Monitoring + backups
# SSH hardening (ex)
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 ssh
APT : commandes indispensables
sudo apt update
sudo apt -y upgrade
sudo apt -y install nginx
apt-cache policy nginx
apt show nginx
dpkg -l | grep nginx
sudo apt -y remove nginx
sudo apt -y autoremove
sources.list : principe
Les dépÎts APT définissent la provenance des packages (stable, security, updates, etc.). Ne mélange pas au hasard stable/testing/unstable sans pinning.
# Exemple conceptuel (Ă adapter Ă ta release)
deb http://deb.debian.org/debian stable main contrib non-free-firmware
deb http://security.debian.org/debian-security stable-security main contrib non-free-firmware
deb http://deb.debian.org/debian stable-updates main contrib non-free-firmware
Sécurité : annonces & upgrade
Debian publie des informations sĂ©curitĂ© et conseille dâappliquer les upgrades via APT. :contentReference[oaicite:17]{index=17}
sudo apt update sudo apt -y upgrade # ou ciblé sudo apt -y install
Backports & pinning (quand tu veux plus récent)
- Backports = certains paquets plus récents, rebuild pour stable (tradeoffs).
- Pinning = priorités APT pour éviter mélange incontrÎlé.
# apt-cache policy te montre les origines + priorités apt-cache policy
OĂč suivre la sĂ©curitĂ© Debian
- Debian Security : https://www.debian.org/security/ :contentReference[oaicite:18]{index=18}
- Security Tracker : https://security-tracker.debian.org/ :contentReference[oaicite:19]{index=19}
Security Tracker : comment lâutiliser
Le tracker recense les vulnérabilités et leur statut dans Debian (par paquet/version). :contentReference[oaicite:20]{index=20}
# workflow type
1) Identifier paquet / version
2) Chercher CVE dans security-tracker
3) Appliquer update via apt
4) Vérifier service + tests
5) Documenter (changelog interne)
Hardening baseline (SSH + firewall + users)
# SSH (no root, no password)
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart ssh
Patch policy (simple et efficace)
| Pattern | Quand | Avantage |
|---|---|---|
| Security upgrades rĂ©guliers | serveur standard | rĂ©duction surface dâattaque |
| FenĂȘtre patch + validation | prod critique | maĂźtrise du risque |
| Golden image + replace | cloud | rollback immédiat |
Debian documente lâupgrade aprĂšs annonce (FAQ) : update puis upgrade/install du paquet. :contentReference[oaicite:21]{index=21}
Observer lâOS (commandes)
uptime
top / htop
free -h
vmstat 1
# sysstat
iostat -xz 1
pidstat 1
Installer outils perf
sudo apt update
sudo apt -y install sysstat iotop nload
IO : symptĂŽmes & checks
| SymptĂŽme | Cause probable | Check |
|---|---|---|
| latence appli | IO saturé | iostat, iotop |
| swap permanent | RAM insuffisante | free -h, vmstat |
| disk full | logs/cache | df -h, du -sh |
df -h
du -sh /var/log/*
journalctl --disk-usage
Réseau : latence, ports, connexions
ss -s
ss -lntp
ip -s link
ping -c 3 1.1.1.1
mtr -rw example.com
Robustesse prod : ce qui compte vraiment
- Services systemd bien définis (restart policies)
- Logs centralisés + alerting
- Backups + restore testés
- Patching maßtrisé (security + maintenance)
- En cloud : âreplaceâ via images plutĂŽt que bricoler

static/img/debian/ops_observability_stack.pngOĂč trouver Debian pour le cloud
Debian propose des cloud images et mentionne Amazon EC2 (AMIs / Marketplace). :contentReference[oaicite:22]{index=22}
- Download / cloud images : https://www.debian.org/distrib/ :contentReference[oaicite:23]{index=23}
- Debian Wiki EC2 images : https://wiki.debian.org/Cloud/AmazonEC2Image/ :contentReference[oaicite:24]{index=24}
Debian 13 (Trixie) sur EC2
Le wiki Debian indique la disponibilitĂ© dâAMIs Debian 13 (trixie) (arm64 + amd64). :contentReference[oaicite:25]{index=25}
EC2 launch
ââ Choose Debian AMI (official)
ââ Instance type
ââ Volumes (EBS)
ââ Network + Security Group
ââ Key pair (SSH)
ââ User data (bootstrap)
Pattern EC2 (clean)
| ĂlĂ©ment | Recommandation | Pourquoi |
|---|---|---|
| Security Groups | ports minimum (22 via bastion, 80/443) | surface dâattaque |
| SSH | clés uniquement | réduit brute force |
| Bootstrapping | user-data minimal + CM | reproductible |
| Rollback | AMI versionnée + replace | recovery rapide |
User-data (exemple simple)
#!/bin/bash
set -e
apt update
apt -y upgrade
apt -y install nginx fail2ban
systemctl enable --now nginx
Best practices cloud (Debian)
- Debian stable pour prod (cohérence + patching)
- Golden image (Packer) + tags version
- Observabilité : metrics + logs + alerting
- Backups : snapshots + restore testés
- âReplace, donât repairâ (instances immuables)

static/img/debian/aws_debian_reference_arch.pngMĂ©thode âproâ (toujours la mĂȘme)
1) SymptÎme précis (quoi / depuis quand / scope)
2) Logs (systemd + app)
3) Réseau (IP/route/DNS/firewall)
4) Service (status + config + ports)
5) Ressources (CPU/RAM/IO/disk)
6) Change récent ? (deploy, update, conf)
7) Fix minimal + rollback plan
8) Post-mortem + action préventive
Commandes réflexes
journalctl -xe journalctl -u-S today systemctl status ss -lntp df -h free -h
âDisk fullâ : 3 actions
df -h
du -sh /var/log/*
journalctl --vacuum-time=7d # prudence selon politique
Commandes indispensables
# APT apt update && apt -y upgrade apt -y installapt-cache policy # services systemctl status systemctl restart # logs journalctl -u -S today tail -n 200 /var/log/auth.log # network ip a ; ip r ; ss -lntp ; dig example.com
Checklist âserveur prodâ
[Security]
- SSH keys (no password)
- root login disabled
- firewall strict
- users/sudo controlled
[Ops]
- patch policy + security announcements
- monitoring + alerting
- backups + restore tested
- logs centralized
[Cloud]
- official image / stable
- immutable replace strategy
- security groups minimal
Liens officiels
- Download Debian : https://www.debian.org/distrib/ :contentReference[oaicite:26]{index=26}
- Debian Releases : https://www.debian.org/releases/ :contentReference[oaicite:27]{index=27}
- Debian Security : https://www.debian.org/security/ :contentReference[oaicite:28]{index=28}
- Security Tracker : https://security-tracker.debian.org/ :contentReference[oaicite:29]{index=29}
- Install Guide (amd64 bookworm) : https://www.debian.org/releases/bookworm/amd64/ :contentReference[oaicite:30]{index=30}
- Debian EC2 Images (wiki) : https://wiki.debian.org/Cloud/AmazonEC2Image/ :contentReference[oaicite:31]{index=31}

static/img/debian/debian_cheatsheet_poster.png