Fleet

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Installation von FleetDM

Systemvoraussetzungen

  • Betriebssystem: Ubuntu 22.04/Debian 11+
  • Mindestanforderungen:
    • 2 CPU-Kerne
    • 4 GB RAM
    • 20 GB freier Speicher

Systemvorbereitung

# System aktualisieren
sudo apt update && sudo apt upgrade -y

# Alte Node.js Versionen entfernen
sudo apt purge nodejs npm -y
sudo rm -rf /usr/local/lib/node_modules

Node.js Installation

# NodeSource-Repository hinzufügen
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -

# Node.js installieren
sudo apt-get install -y nodejs=20.18.1-1nodesource1

Yarn Installation

sudo npm install -g yarn@1.22.21

Docker Installation

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

FleetDM Installation

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

# Abhängigkeiten installieren
yarn install --force
npx lerna run build

# Konfiguration anpassen
cp config/default.yml config/local.yml
nano config/local.yml

Datenbankeinrichtung

# Docker-Container starten
docker-compose up -d

# Datenbankmigration
yarn run db:migrate

Betrieb

Befehl Beschreibung
yarn run dev Entwicklungsmodus
yarn start Produktionsmodus

Problembehandlung

Node.js Version prüfen

node -v  # Muss 20.18.1 anzeigen

Docker-Container Status

docker ps -a
docker-compose logs