📋 Inhalt
🔄 Debian Varianten
🟢 Stable
Aktuelle Version: Bookworm (12)
- • Maximale Stabilität
- • Produktionsumgebungen
- • Langfristige Unterstützung
- • Konservative Updates
- • Empfohlen für Server
✅ EMPFOHLEN für Production
🟡 Testing
Aktuelle Version: Trixie (13)
- • Neuere Pakete
- • Wird zu nächstem Stable
- • Gute Stabilität
- • Desktop-tauglich
- • Rolling Release
⚠️ Für erfahrene Benutzer
🔴 Unstable (Sid)
Rolling Development
- • Neueste Pakete
- • Development Branch
- • Kann brechen
- • Nur für Entwickler
- • Experimentell
⚠️ NICHT für Production
💾 Download & Vorbereitung
🔽 ISO Images
🖥️ Desktop Images
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.7.0-amd64-netinst.iso
🖧 Server/Netinstall
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.7.0-amd64-netinst.iso
💿 Complete DVD
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.7.0-amd64-DVD-1.iso
🔐 Integrity Check
Wichtig: ISO-Integrität prüfen!
# SHA256-Checksummen herunterladen
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA256SUMS
# Prüfung durchführen
sha256sum -c SHA256SUMS
⚠️ Systemanforderungen
Minimum:
- • RAM: 512 MB (2 GB empf.)
- • Speicher: 10 GB
- • CPU: Pentium 4 (1 GHz)
- • Netzwerk für Netinst
Empfohlen:
- • RAM: 4 GB+
- • Speicher: 20 GB+
- • CPU: Multi-Core
- • SSD für bessere Performance
⚙️ Installation durchführen
Installation Schritt-für-Schritt
Boot Menu
Empfohlene Option:
Graphical install
Einfacher für Anfänger
Sprache & Lokalisierung
Hostname & Domain
Hostname: debian-server
Domain: local (oder leer lassen)
Benutzer-Accounts
Root-Passwort
Leer lassen für sudo-only Setup (empfohlen)
Benutzer-Account
Name: Administrator
Benutzername: admin
Passwort: [sicheres Passwort]
💾 Partitionierung
🔰 Guided (Empfohlen)
Automatische Partitionierung
🔧 Manual (Erweitert)
Benutzerdefinierte Partitionierung
📊 Server-Partitionierung
Optimiert für Server-Workloads:
Partition Größe Mount Zweck
/dev/sda1 512M /boot/efi UEFI Boot
/dev/sda2 1G /boot Kernel & initrd
/dev/sda3 Rest LVM Volume Group
LVM Layout:
lv_root 15G / System
lv_var 20G /var Logs, Cache
lv_tmp 5G /tmp Temporäre Dateien
lv_home 10G /home Benutzer
lv_swap 4G swap Swap Space
📦 APT & Package Management
🔄 APT Grundlagen
Basic Commands
# Update package lists
sudo apt update
# Upgrade packages
sudo apt upgrade
# Full system upgrade
sudo apt full-upgrade
# Install package
sudo apt install package-name
# Remove package
sudo apt remove package-name
# Remove with config
sudo apt purge package-name
Advanced Commands
# Search packages
apt search keyword
# Show package info
apt show package-name
# List installed
apt list --installed
# Autoremove unused
sudo apt autoremove
# Clean cache
sudo apt autoclean
# Hold package
sudo apt-mark hold package
📚 Sources.list Konfiguration
Repository-Konfiguration für Debian Stable:
# /etc/apt/sources.list
# Debian Bookworm (12) - Stable
# Main repositories
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free-firmware
# Security updates
deb http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
# Updates
deb http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware
# Backports (optional)
deb http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware
Repository-Komponenten:
- • main: Freie Software (DFSG)
- • contrib: Freie Software mit non-free Abhängigkeiten
- • non-free-firmware: Firmware-Blobs für Hardware
🖥️ Desktop Environment
🎨 Desktop Environments
GNOME (Standard)
Modern, Touch-friendly
sudo apt install gnome-core
KDE Plasma
Anpassbar, Windows-ähnlich
sudo apt install kde-plasma-desktop
XFCE
Leichtgewichtig, stabil
sudo apt install xfce4
🛠️ Essential Apps
# Development
sudo apt install -y \
git vim code \
build-essential \
python3-pip nodejs npm
# Multimedia
sudo apt install -y \
vlc gimp inkscape \
audacity
# Office & Productivity
sudo apt install -y \
libreoffice \
thunderbird firefox-esr
# System Tools
sudo apt install -y \
htop neofetch tree \
curl wget rsync \
gparted timeshift
🖧 Server Konfiguration
⚙️ Server Basis-Setup
# System aktualisieren
sudo apt update && sudo apt upgrade -y
# Essential Server Tools
sudo apt install -y \
openssh-server fail2ban ufw \
htop iotop iftop ncdu \
curl wget git rsync \
sudo vim nano
# Netzwerk Tools
sudo apt install -y \
net-tools dnsutils \
iputils-ping traceroute
# Monitoring
sudo apt install -y \
sysstat logwatch \
smartmontools
# Backup Tools
sudo apt install -y \
borgbackup rsnapshot
🌐 Web Server Stack
NGINX + PHP
# NGINX Web Server
sudo apt install nginx
# PHP-FPM
sudo apt install php8.2-fpm \
php8.2-mysql php8.2-curl \
php8.2-gd php8.2-xml
# MariaDB
sudo apt install mariadb-server
sudo mysql_secure_installation
Docker Setup
Docker Repository hinzufügen:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Docker installieren:
sudo apt install docker-ce docker-ce-cli containerd.io
Docker Compose installieren:
sudo apt install docker-compose-plugin
User zur Docker-Gruppe hinzufügen:
sudo usermod -aG docker $USER
🔒 Security Hardening
🔥 Firewall (UFW)
# UFW aktivieren
sudo ufw --force reset
sudo ufw default deny incoming
sudo ufw default allow outgoing
# SSH erlauben
sudo ufw allow ssh
# oder spezifischer Port
sudo ufw allow 2222/tcp
# Web Server (optional)
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Firewall aktivieren
sudo ufw enable
# Status prüfen
sudo ufw status verbose
🛡️ SSH Hardening
# SSH Konfiguration anpassen
sudo nano /etc/ssh/sshd_config
# Wichtige Einstellungen:
Port 2222 # Standard-Port ändern
PermitRootLogin no # Root-Login verbieten
PasswordAuthentication no # Nur nach SSH-Key Setup!
PubkeyAuthentication yes # SSH-Keys aktivieren
MaxAuthTries 3 # Login-Versuche begrenzen
ClientAliveInterval 300 # Timeout setzen
# SSH Service neustarten
sudo systemctl restart ssh
SSH-Keys generieren:
# Auf Client-System:
ssh-keygen -t ed25519 -C "your_email@example.com"
ssh-copy-id -p 2222 username@server-ip
🔧 System Hardening
# Fail2Ban für SSH-Schutz
sudo apt install fail2ban
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
# Automatic Updates
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
# AppArmor (Application Armor)
sudo apt install apparmor apparmor-utils
sudo systemctl enable apparmor
# Intrusion Detection
sudo apt install aide
sudo aideinit
sudo mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db
# Log Monitoring
sudo apt install logwatch
sudo nano /etc/logwatch/conf/logwatch.conf
✅ Best Practices
📋 Debian Checklist
⚠️ Häufige Fehler
Testing/Unstable in Production
❌ Instabil, nur Stable für Server
Root-Account aktiviert lassen
❌ Sicherheitsrisiko, sudo nutzen
Firewall deaktiviert
❌ UFW sofort nach Installation aktivieren
Keine Updates
❌ Security-Updates sind kritisch