440 lines
9.5 KiB
Markdown
440 lines
9.5 KiB
Markdown
# USB-SSD Management System - Detaillierte Installation
|
|
|
|
## Übersicht
|
|
|
|
Diese Anleitung führt Sie Schritt-für-Schritt durch die Installation des USB-SSD Management Systems auf Ubuntu/Linux-Servern. Das System ist speziell für KMU-Infrastrukturen optimiert und bietet professionelle Verwaltung wechselbarer USB-C SSDs.
|
|
|
|
## Systemanforderungen
|
|
|
|
### Mindestanforderungen
|
|
- **Betriebssystem**: Ubuntu 20.04+ / Debian 11+ / CentOS 8+ / RHEL 8+
|
|
- **Hardware**: USB-C Port, mindestens 1GB freier Speicher
|
|
- **Berechtigungen**: `sudo` Zugriff für Installation
|
|
- **Netzwerk**: Internetverbindung für Package-Downloads
|
|
|
|
### Empfohlene Konfiguration
|
|
- **RAM**: 4GB+ für Performance-Tests
|
|
- **CPU**: 2+ Cores für parallele Operationen
|
|
- **Storage**: 10GB+ freier Speicher für Logs und Caches
|
|
- **USB**: USB 3.0+ für optimale Performance
|
|
|
|
### Unterstützte Distributionen
|
|
| Distribution | Version | Status | Notizen |
|
|
|--------------|---------|--------|---------|
|
|
| Ubuntu | 20.04+ | ✅ Vollständig | Empfohlen für Produktionsumgebungen |
|
|
| Debian | 11+ | ✅ Vollständig | Stabile Alternative zu Ubuntu |
|
|
| CentOS | 8+ | ✅ Vollständig | Enterprise-Umgebungen |
|
|
| RHEL | 8+ | ✅ Vollständig | Enterprise-Support verfügbar |
|
|
| Fedora | 35+ | ⚠️ Beta | Community-Support |
|
|
| Arch Linux | Rolling | ⚠️ Beta | Für erfahrene Benutzer |
|
|
|
|
## Vor der Installation
|
|
|
|
### 1. System-Update
|
|
```bash
|
|
# Ubuntu/Debian
|
|
sudo apt update && sudo apt upgrade -y
|
|
|
|
# CentOS/RHEL
|
|
sudo yum update -y
|
|
|
|
# Fedora
|
|
sudo dnf update -y
|
|
```
|
|
|
|
### 2. Git installieren
|
|
```bash
|
|
# Ubuntu/Debian
|
|
sudo apt install git -y
|
|
|
|
# CentOS/RHEL
|
|
sudo yum install git -y
|
|
|
|
# Fedora
|
|
sudo dnf install git -y
|
|
```
|
|
|
|
### 3. System-Informationen sammeln
|
|
```bash
|
|
# Betriebssystem-Version
|
|
lsb_release -a
|
|
|
|
# Verfügbarer Speicher
|
|
df -h
|
|
|
|
# USB-Ports identifizieren
|
|
lsusb
|
|
|
|
# Aktuelle Benutzer-Gruppen
|
|
groups $USER
|
|
```
|
|
|
|
## Installation
|
|
|
|
### Schritt 1: Repository klonen
|
|
```bash
|
|
# In Home-Verzeichnis wechseln
|
|
cd ~
|
|
|
|
# Repository klonen
|
|
git clone https://git.gitcover.de/KMU/usb-ssd.git
|
|
|
|
# In Projekt-Verzeichnis wechseln
|
|
cd usb-ssd
|
|
|
|
# Repository-Struktur prüfen
|
|
ls -la
|
|
```
|
|
|
|
### Schritt 2: Installations-Script ausführen
|
|
```bash
|
|
# Standard-Installation (empfohlen)
|
|
sudo ./scripts/installation/install.sh
|
|
|
|
# Installation mit Verbose-Output
|
|
sudo ./scripts/installation/install.sh --verbose
|
|
|
|
# Interaktive Installation mit Benutzer-Eingaben
|
|
sudo ./scripts/installation/install.sh --interactive
|
|
```
|
|
|
|
### Schritt 3: Installation verifizieren
|
|
```bash
|
|
# Installierte Scripts prüfen
|
|
ls -la /usr/local/bin/ssd-*
|
|
|
|
# Systemd-Services prüfen
|
|
sudo systemctl status ssd-detection.service
|
|
|
|
# Udev-Rules prüfen
|
|
ls -la /etc/udev/rules.d/99-ssd-*
|
|
|
|
# Benutzer-Berechtigungen prüfen
|
|
groups $USER
|
|
```
|
|
|
|
## Erweiterte Installationsoptionen
|
|
|
|
### Custom-Installation
|
|
```bash
|
|
# Installation in Custom-Verzeichnis
|
|
sudo ./scripts/installation/install.sh --prefix /opt/ssd-tools
|
|
|
|
# Nur bestimmte Komponenten installieren
|
|
sudo ./scripts/installation/install.sh --components "detection,management"
|
|
|
|
# Installation ohne Systemd-Services
|
|
sudo ./scripts/installation/install.sh --no-systemd
|
|
|
|
# Installation mit Custom-Konfiguration
|
|
sudo ./scripts/installation/install.sh --config /path/to/custom.conf
|
|
```
|
|
|
|
### Benutzer-spezifische Installation
|
|
```bash
|
|
# Installation nur für aktuellen Benutzer (ohne sudo)
|
|
./scripts/installation/install.sh --user-install
|
|
|
|
# Scripts werden installiert nach:
|
|
# ~/.local/bin/ssd-*
|
|
# ~/.config/ssd-management/
|
|
```
|
|
|
|
### Entwicklungs-Installation
|
|
```bash
|
|
# Installation mit Debug-Modus
|
|
sudo ./scripts/installation/install.sh --debug --verbose
|
|
|
|
# Installation mit Entwicklungs-Tools
|
|
sudo ./scripts/installation/install.sh --dev-tools
|
|
|
|
# Symlinks statt Kopien (für Entwicklung)
|
|
sudo ./scripts/installation/install.sh --symlink
|
|
```
|
|
|
|
## Post-Installation Konfiguration
|
|
|
|
### 1. Benutzer-Berechtigungen
|
|
```bash
|
|
# Aktuellen Benutzer zu ssd-users Gruppe hinzufügen
|
|
sudo usermod -a -G ssd-users $USER
|
|
|
|
# Disk-Gruppe für Hardware-Zugriff
|
|
sudo usermod -a -G disk $USER
|
|
|
|
# Neue Gruppen-Mitgliedschaft aktivieren
|
|
newgrp ssd-users
|
|
|
|
# Berechtigungen prüfen
|
|
groups
|
|
```
|
|
|
|
### 2. Systemd-Services konfigurieren
|
|
```bash
|
|
# Services aktivieren
|
|
sudo systemctl enable ssd-detection.service
|
|
sudo systemctl enable ssd-automount.service
|
|
|
|
# Services starten
|
|
sudo systemctl start ssd-detection.service
|
|
sudo systemctl start ssd-automount.service
|
|
|
|
# Status prüfen
|
|
sudo systemctl status ssd-detection.service
|
|
sudo systemctl status ssd-automount.service
|
|
```
|
|
|
|
### 3. Udev-Rules aktivieren
|
|
```bash
|
|
# Udev-Rules neu laden
|
|
sudo udevadm control --reload-rules
|
|
sudo udevadm trigger
|
|
|
|
# Test mit angeschlossener USB-SSD
|
|
sudo udevadm test /sys/block/sdb
|
|
```
|
|
|
|
### 4. Logging konfigurieren
|
|
```bash
|
|
# Log-Verzeichnisse erstellen
|
|
sudo mkdir -p /var/log/ssd-management
|
|
|
|
# Log-Rotation aktivieren
|
|
sudo systemctl enable logrotate.timer
|
|
|
|
# Erste Logs prüfen
|
|
sudo tail -f /var/log/ssd-detection.log
|
|
```
|
|
|
|
## Erste Verwendung
|
|
|
|
### 1. USB-C SSD anschließen
|
|
```bash
|
|
# SSD anschließen und erkennen lassen
|
|
# Automatische Erkennung durch udev-rules
|
|
|
|
# Manuelle Erkennung
|
|
ssd-detect.sh
|
|
|
|
# Erkannte Geräte anzeigen
|
|
lsblk | grep -E "sd[b-z]"
|
|
```
|
|
|
|
### 2. Erste Mount-Operation
|
|
```bash
|
|
# Automatisches Mounting
|
|
ssd-mount-manager.sh mount
|
|
|
|
# Mount-Status prüfen
|
|
ssd-mount-manager.sh status
|
|
|
|
# Mount-Point prüfen
|
|
ls -la /mnt/ssd-storage/
|
|
```
|
|
|
|
### 3. Test-Suite ausführen
|
|
```bash
|
|
# Schnelle Tests
|
|
ssd-test-suite.sh --quick
|
|
|
|
# Vollständige Tests
|
|
ssd-test-suite.sh all
|
|
|
|
# Performance-Benchmark
|
|
ssd-test-suite.sh --benchmark
|
|
```
|
|
|
|
### 4. Sichere Entfernung
|
|
```bash
|
|
# Safe-Eject ausführen
|
|
ssd-safe-eject.sh
|
|
|
|
# Status nach Eject prüfen
|
|
ssd-mount-manager.sh status
|
|
```
|
|
|
|
## Konfiguration anpassen
|
|
|
|
### 1. Haupt-Konfigurationsdatei
|
|
```bash
|
|
# Konfigurationsdatei bearbeiten
|
|
sudo nano /etc/ssd-management/config.conf
|
|
|
|
# Beispiel-Konfiguration:
|
|
SSD_MOUNT_POINT="/mnt/ssd-storage"
|
|
SSD_LOG_LEVEL="INFO"
|
|
SSD_AUTO_MOUNT="true"
|
|
SSD_SMB_READY="true"
|
|
```
|
|
|
|
### 2. Mount-Optionen anpassen
|
|
```bash
|
|
# NTFS-Mount-Optionen
|
|
SSD_MOUNT_OPTIONS="uid=1000,gid=1000,umask=022,windows_names"
|
|
|
|
# Performance-Optimierungen
|
|
SSD_MOUNT_OPTIONS="$SSD_MOUNT_OPTIONS,big_writes,cache=strict"
|
|
```
|
|
|
|
### 3. Logging-Level anpassen
|
|
```bash
|
|
# Debug-Logging aktivieren
|
|
export SSD_LOG_LEVEL=DEBUG
|
|
|
|
# Syslog-Integration
|
|
export SSD_USE_SYSLOG=true
|
|
|
|
# Log-Datei-Pfad
|
|
export SSD_LOG_FILE="/var/log/ssd-management.log"
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### Häufige Installations-Probleme
|
|
|
|
#### Problem: "Permission denied"
|
|
```bash
|
|
# Lösung: Installation mit sudo ausführen
|
|
sudo ./scripts/installation/install.sh
|
|
|
|
# Benutzer-Berechtigungen prüfen
|
|
sudo -l
|
|
```
|
|
|
|
#### Problem: "Package not found"
|
|
```bash
|
|
# Lösung: Repository-Updates durchführen
|
|
sudo apt update # Ubuntu/Debian
|
|
sudo yum update # CentOS/RHEL
|
|
|
|
# EPEL-Repository aktivieren (CentOS/RHEL)
|
|
sudo yum install epel-release
|
|
```
|
|
|
|
#### Problem: "Systemd service failed"
|
|
```bash
|
|
# Service-Status prüfen
|
|
sudo systemctl status ssd-detection.service
|
|
|
|
# Service-Logs anzeigen
|
|
sudo journalctl -u ssd-detection.service
|
|
|
|
# Service neu starten
|
|
sudo systemctl restart ssd-detection.service
|
|
```
|
|
|
|
#### Problem: "USB device not detected"
|
|
```bash
|
|
# USB-Geräte auflisten
|
|
lsusb
|
|
|
|
# Block-Geräte anzeigen
|
|
lsblk
|
|
|
|
# Udev-Events überwachen
|
|
sudo udevadm monitor
|
|
|
|
# NTFS-Support prüfen
|
|
sudo modprobe ntfs
|
|
```
|
|
|
|
### Diagnose-Tools
|
|
|
|
#### System-Diagnose
|
|
```bash
|
|
# Installations-Status prüfen
|
|
./scripts/installation/install.sh --status
|
|
|
|
# Abhängigkeiten validieren
|
|
./scripts/installation/install.sh --check-dependencies
|
|
|
|
# Konfiguration testen
|
|
./scripts/installation/install.sh --validate
|
|
```
|
|
|
|
#### Hardware-Diagnose
|
|
```bash
|
|
# USB-Controller prüfen
|
|
lspci | grep -i usb
|
|
|
|
# Kernel-Module prüfen
|
|
lsmod | grep -E "(usb|ntfs)"
|
|
|
|
# Hardware-Logs prüfen
|
|
dmesg | grep -i usb
|
|
```
|
|
|
|
## Deinstallation
|
|
|
|
### Vollständige Deinstallation
|
|
```bash
|
|
# Deinstallations-Script ausführen
|
|
sudo ./scripts/installation/uninstall.sh
|
|
|
|
# Manuelle Bereinigung (falls nötig)
|
|
sudo rm -rf /usr/local/bin/ssd-*
|
|
sudo rm -rf /etc/ssd-management/
|
|
sudo rm -f /etc/systemd/system/ssd-*.service
|
|
sudo rm -f /etc/udev/rules.d/99-ssd-*.rules
|
|
```
|
|
|
|
### Konfiguration beibehalten
|
|
```bash
|
|
# Nur Scripts entfernen
|
|
sudo ./scripts/installation/uninstall.sh --keep-config
|
|
|
|
# Logs beibehalten
|
|
sudo ./scripts/installation/uninstall.sh --keep-logs
|
|
```
|
|
|
|
## Upgrade-Prozess
|
|
|
|
### Standard-Upgrade
|
|
```bash
|
|
# Repository aktualisieren
|
|
cd ~/usb-ssd
|
|
git pull origin main
|
|
|
|
# Upgrade ausführen
|
|
sudo ./scripts/installation/install.sh --upgrade
|
|
|
|
# Services neu starten
|
|
sudo systemctl restart ssd-detection.service ssd-automount.service
|
|
```
|
|
|
|
### Backup vor Upgrade
|
|
```bash
|
|
# Konfiguration sichern
|
|
sudo cp -r /etc/ssd-management /etc/ssd-management.backup.$(date +%Y%m%d)
|
|
|
|
# Scripts sichern
|
|
sudo mkdir -p /tmp/ssd-backup
|
|
sudo cp /usr/local/bin/ssd-* /tmp/ssd-backup/
|
|
```
|
|
|
|
## Support und Hilfe
|
|
|
|
### Community-Support
|
|
- **Issues**: [Repository Issues](https://git.gitcover.de/KMU/usb-ssd/issues)
|
|
- **Discussions**: Repository-Discussions
|
|
- **Wiki**: [Repository Wiki](https://git.gitcover.de/KMU/usb-ssd/wiki)
|
|
|
|
### Logs für Support
|
|
```bash
|
|
# System-Informationen sammeln
|
|
sudo ./scripts/installation/install.sh --system-info > system-info.txt
|
|
|
|
# Logs sammeln
|
|
sudo tar -czf ssd-logs.tar.gz /var/log/ssd-*.log
|
|
|
|
# Konfiguration anonymisieren
|
|
sudo cp /etc/ssd-management/config.conf config-anonymized.conf
|
|
```
|
|
|
|
### Enterprise-Support
|
|
Für professionellen Support und Custom-Entwicklungen kontaktieren Sie die GitCover® Organization.
|
|
|
|
---
|
|
|
|
**⚠️ Wichtiger Hinweis**: Diese Installation manipuliert System-Konfigurationen und Hardware-Zugriffe. Führen Sie die Installation nur auf Systemen durch, auf denen Sie vollständige administrative Rechte haben und verstehen die Auswirkungen der Änderungen.
|