Fleet

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen


Installation von FleetDM

Systemvoraussetzungen

  • Betriebssystem: Linux (Debian/Ubuntu/RHEL) oder macOS
  • Mindestanforderungen:
    • 2 CPU-Kerne
    • 2 GB RAM
    • 10 GB freier Speicherplatz
  • Abhängigkeiten:
    • Docker
    • Node.js 18.x+
    • Git

Installationsanleitung

Schritt 1: Paketinstallation

# Docker installieren
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker

# Node.js 20x (LTS)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# Git installieren
sudo apt-get install -y git

Schritt 2: FleetDM Installation

# Repository klonen
git clone https://github.com/fleetdm/fleet.git
cd fleet

# Abhängigkeiten installieren
npm install --legacy-peer-deps
npm run build

Schritt 3: Konfiguration

# Konfigurationsdatei erstellen
cp config/default.yml config/local.yml

# Konfiguration bearbeiten
nano config/local.yml

Schritt 4: Datenbankeinrichtung

# Docker-Container starten
docker-compose up -d

# Datenbankmigrationen durchführen
npm run db:migrate

Betrieb

Befehl Beschreibung
npm run dev Entwicklungsmodus starten
npm start Produktionsmodus starten
npm run test Testsuite ausführen

Wartung

# Datenbankmigration
npm run db:migrate

# Letzte Migration rückgängig machen
npm run db:rollback

# Container stoppen
docker-compose down

Troubleshooting

  • Port-Konflikte:
lsof -i :8080
kill -9 [PID]
  • Docker-Probleme:
docker-compose logs
docker ps -a
  • Node.js Probleme:
node -v
npm cache clean --force
rm -rf node_modules
npm install

Siehe auch