Index général – Guides opérationnels
Toutes les briques logicielles évoquées (Système, Web, Frameworks, DB, Containers, CI/CD, Sécurité, Monitoring, Cloud...).
Linux fundamentals
Users, sudo, services, journaux, réseau.
CLI indispensables
vim, htop, tmux, ncdu, netstat/ss...
Bash / Cron
Scripts de maintenance, backups.
Nginx
Reverse proxy, HTTPS, Django, PHP-FPM.
Apache / HTTPD
vhosts, .htaccess, mod_proxy.
Traefik / Caddy
Auto HTTPS, docker aware.
DNS & Certbot
Zones, enregistrements, SSL auto.
Django
Projet, gunicorn, static, i18n.
Flask / FastAPI
APIs, microservices, Uvicorn.
Node / Express
API REST, pm2, reverse proxy.
PHP / Laravel / WP
LNMP/LAMP, PHP-FPM, OPCache.
MariaDB & PostgreSQL
Install, users, tuning, backups.
Redis / Memcached
Sessions Django, file d’attente.
MongoDB
Collections, users, réplication.
Backup & snapshot
mysqldump, pg_dump, rsync, borg.
Docker & Compose
Images, volumes, réseau.
Kubernetes / K3s
Pods, services, ingress, helm.
Traefik Docker
Découverte auto, labels.
Git / GitHub / GitLab
Repos, clés SSH, PR, hooks.
GitHub Actions / GitLab CI
Build → test → deploy.
Jenkins
Pipelines, agents, secrets.
Ansible / Terraform
Provisionner & configurer.
Iptables / UFW / Fail2ban
Filtrage, SSH, anti-bruteforce.
Postfix / Dovecot
SPF, DKIM, relay.
OWASP / headers
CSP, X-Frame, CSRF.
Netdata / Prometheus / Grafana
Surveiller CPU, RAM, Nginx.
ELK / Graylog
Centralisation journaux.
AWS / GCP / Azure (bases)
VM, buckets, LB, IAM.
Proxmox / VirtualBox
VM labo, snapshots.
Stacks prêtes
Django, WP, proxy.
Objectif : donner aux débutants les commandes de base pour administrer un serveur.
- Distros :
Ubuntu 24.04 LTS,Debian 12 - Créer user :
adduser dev,usermod -aG sudo dev - MAJ :
apt update && apt upgrade -y
systemctl status nginx
systemctl restart nginx
journalctl -u nginx -n 100 -f
ip a
ss -ltnp
sudo lsof -i :80
sudo ufw status
sudo apt update
sudo apt install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx
server {
listen 80;
server_name exemple.com;
root /var/www/exemple.com;
index index.html;
location / { try_files $uri $uri/ =404; }
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d exemple.com
python -m venv venv
source venv/bin/activate
pip install django gunicorn
django-admin startproject mysite .
- Run gunicorn sur 127.0.0.1:8000
- Proxy Nginx vers Gunicorn
- collectstatic
- service systemd
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "mysite",
"USER": "mysite",
"PASSWORD": "secret",
"HOST": "127.0.0.1",
"PORT": "5432",
}
}
sudo apt install mariadb-server -y
sudo mysql_secure_installation
CREATE DATABASE mysite;
CREATE USER 'mysite'@'localhost' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON mysite.* TO 'mysite'@'localhost';
sudo apt install postgresql postgresql-contrib -y
sudo -u postgres createuser -P mysite
sudo -u postgres createdb -O mysite mysite
mysqldump -u root -p mysite > /backup/mysite.sql
pg_dump -U mysite mysite > /backup/mysite.sql
sudo apt update
sudo apt install docker.io -y
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
version: "3"
services:
web:
image: nginx
ports: ["80:80"]
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=secret
Pousser des images vers Docker Hub / GHCR.
# minikube
minikube start
kubectl get pods -A
git config --global user.name "Guillaume"
git config --global user.email "you@example.com"
git clone git@github.com:org/projet.git
git add .
git commit -m "add guide"
git push
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo apt install fail2ban
sudo systemctl restart fail2ban
- htop / glances
- netdata
- Prometheus + Grafana
name: Deploy
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./deploy.sh
- Créer enregistrement A / AAAA
- Installer certbot nginx
- Renouvellement auto
- Django + Gunicorn + Nginx + PostgreSQL
- WordPress + Nginx + MariaDB + PHP-FPM
- Docker Compose : web + db + adminer
À installer systématiquement :
apt install -y vim htop tmux curl wget git net-tools lsof zip unzip jq
crontab -e
0 3 * * * /usr/local/bin/backup.sh
apt install apache2
a2enmod proxy proxy_http rewrite ssl headers
systemctl restart apache2
Utile si tu fais beaucoup de Docker et que tu veux l’auto-HTTPS.
pip install fastapi uvicorn
uvicorn app:app --host 0.0.0.0 --port 8000
npm init -y
npm install express
node app.js
apt install php-fpm php-mysql
# Nginx → fastcgi_pass unix:/run/php/php8.2-fpm.sock;
apt install redis-server
redis-cli ping
Installer depuis le repo officiel si tu veux la dernière version.
rsync -av /var/www/ /backup/www/
borg create /backup/borg::{now} /etc /var/www
Pipeline de base qui build puis déploie.
ansible-playbook -i hosts provision.yml
terraform apply
Utile si tu veux envoyer des mails depuis Django/WordPress.
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
Objectif : récupérer les logs Nginx, Docker, syslog dans un point unique.
VM (EC2), stockage (S3), LB, IAM, VPC.
Pour faire des labs Django/Nginx/PostgreSQL isolés.
