Add Windows PowerShell installer/updater
This commit is contained in:
41
README.md
41
README.md
@ -1,26 +1,41 @@
|
||||
# Zabbix Agent Deployment
|
||||
|
||||
Bash-Skripte zur automatischen Installation und Aktualisierung des Zabbix Agent 2 (Version 7.4) auf Debian/Ubuntu-Systemen – lokal oder per SSH-Remote-Deployment.
|
||||
Skripte zur automatischen Installation und Aktualisierung des Zabbix Agent 2 (Version 7.4) auf Linux- und Windows-Systemen – lokal oder per SSH-Remote-Deployment.
|
||||
|
||||
---
|
||||
|
||||
## Voraussetzungen
|
||||
|
||||
**Linux:**
|
||||
- Zielhost: Debian 11/12/13 oder Ubuntu 20.04 / 22.04 / 24.04
|
||||
- SSH Key-Authentifizierung eingerichtet (`~/.ssh/config`)
|
||||
- Zielhost muss als `root` erreichbar sein
|
||||
- `wget` auf dem Zielhost vorhanden
|
||||
|
||||
**Windows:**
|
||||
- Windows 10/11 oder Windows Server 2016+
|
||||
- PowerShell 5.1 oder neuer
|
||||
- Ausführung als Administrator erforderlich
|
||||
|
||||
---
|
||||
|
||||
## Konfiguration
|
||||
|
||||
In `install-zabbix-agent.sh` die Zabbix-Server-Adresse eintragen:
|
||||
|
||||
**Linux** – in `install-zabbix-agent.sh` und `update-zabbix-agent.sh`:
|
||||
```bash
|
||||
ZABBIX_SERVER="zabbix.example.com" # Zeile 16
|
||||
```
|
||||
|
||||
**Windows** – in `install-update-zabbix-agent.ps1`:
|
||||
```powershell
|
||||
$ZabbixServer = "zabbix.example.com" # Zabbix-Server-Adresse
|
||||
$ZabbixVersion = "7.4.2" # Bei neuen Releases anpassen
|
||||
$ProxyList = @( # Proxy-Liste manuell pflegen
|
||||
"http://proxy01.example.com:3128"
|
||||
"http://proxy02.example.com:3128"
|
||||
)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Skripte
|
||||
@ -87,6 +102,24 @@ bash deploy-update-zabbix-agent.sh webserver
|
||||
|
||||
---
|
||||
|
||||
### `install-update-zabbix-agent.ps1`
|
||||
Installiert oder aktualisiert Zabbix Agent 2 auf Windows – erkennt automatisch ob bereits eine Version vorhanden ist.
|
||||
|
||||
```powershell
|
||||
PowerShell -ExecutionPolicy Bypass -File install-update-zabbix-agent.ps1
|
||||
```
|
||||
|
||||
Was es tut:
|
||||
- Erkennt automatisch: Neuinstallation oder Update
|
||||
- Interaktive Eingabe des Zabbix-Hostnamens (Standard: Computername)
|
||||
- Interaktive Proxy-Auswahl aus gepflegter Liste oder direkte Verbindung
|
||||
- Lädt die MSI von `cdn.zabbix.com` herunter
|
||||
- Installiert/aktualisiert still (`/qn`) ohne Benutzerinteraktion beim MSI
|
||||
- Setzt `SERVER`, `SERVERACTIVE` und `HOSTNAME` direkt beim MSI-Aufruf
|
||||
- Startet den Dienst automatisch
|
||||
|
||||
---
|
||||
|
||||
## Ablauf nach der Installation
|
||||
|
||||
Den Host im Zabbix-Frontend anlegen, falls noch nicht vorhanden:
|
||||
@ -95,7 +128,7 @@ Den Host im Zabbix-Frontend anlegen, falls noch nicht vorhanden:
|
||||
|
||||
- Host name: identisch mit dem beim Skriptaufruf angegebenen `<zabbix-hostname>`
|
||||
- Interface: Agent (aktiv) – keine IP-Adresse notwendig bei reinem Aktiv-Modus
|
||||
- Template: z.B. `Linux by Zabbix agent active`
|
||||
- Template: z.B. `Linux by Zabbix agent active` bzw. `Windows by Zabbix agent active`
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user