-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_dependencies.sh
More file actions
executable file
·56 lines (45 loc) · 1.56 KB
/
install_dependencies.sh
File metadata and controls
executable file
·56 lines (45 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -e # Exit on error
# Detect OS (Debian or Ubuntu)
if [ -f /etc/os-release ]; then
. /etc/os-release
OS=$ID
else
echo "Fehler: Kann Betriebssystem nicht erkennen"
exit 1
fi
if [ "$OS" != "debian" ] && [ "$OS" != "ubuntu" ]; then
echo "Fehler: Nur Debian und Ubuntu werden unterstützt"
exit 1
fi
echo "=== Erkanntes System: $OS ==="
echo "=== Docker Installation ==="
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/$OS/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources > /dev/null <<EOF
Types: deb
URIs: https://download.docker.com/linux/$OS
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
sudo systemctl enable docker
sudo docker run hello-world
echo "=== Containerlab Installation ==="
curl -sL https://containerlab.dev/setup | sudo -E bash -s "all"
containerlab version check
echo "=== PostgreSQL Installation ==="
sudo apt-get install -y postgresql postgresql-client
sudo systemctl start postgresql
sudo systemctl enable postgresql
echo "=== DMZ.sh ausführbar machen ==="
[ -f "DMZ.sh" ] && sudo chmod +x DMZ.sh || echo "DMZ.sh nicht gefunden"
echo ""
echo "✓ Installation abgeschlossen!"
echo "Tipp: sudo usermod -aG docker $USER"