Tyleo-Scripts/irp-rhel

54 lines
2.2 KiB
Text
Raw Normal View History

2024-02-18 18:06:30 +00:00
#!/usr/bin/env bash
if ! command -v rpm &> /dev/null
then
echo "Systéme non RPM - Lancement annulé"
echo "Utilisez irp-deb pour DEB."
echo "https://tyleodev.fr/scripts-crees-par-tyleo/"
exit
fi
echo -------------------------------------------------------------
curl https://static.tyleodev.fr/astra/banner-rhel
echo "Version 2.3 - Script de Déploiement Public avec DUF 0.8.1"
echo "Ajout support pour Rocky Linux 9.1+"
echo "Ajout support Docker Compose, Version Validée : v2.17.3"
sudo dnf update -y
wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.rpm
wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.rpm
sudo rpm -i gotop_v4.1.4_linux_amd64.rpm
sudo rpm -i duf_0.8.1_linux_amd64.rpm
sudo dnf install epel-release -y
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce
sudo dnf install -y netdata-web
sudo dnf install -y wget
sudo systemctl start docker.socket
sudo systemctl enable docker.socket
sudo usermod -aG docker $USER
sudo dnf install cockpit cockpit-machines virt-manager libvirt curl nano fish zsh git davfs2 curl wget mc htop nethogs figlet nano util-linux-user ntfs-3g -y
sudo dnf install -y https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
sudo usermod -a -G docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /bin/docker-compose
sudo chmod +x /bin/docker-compose
docker-compose --version
echo Docker is now ready.
echo "----------------------"
echo "- Daemon OK -"
echo "- Composer OK -"
echo "- Service Enabled OK -"
echo "----------------------"
# SERVICES ENABLING
sudo systemctl enable cockpit.socket
sudo systemctl enable libvirt-guests
sudo systemctl enable docker
# START
sudo systemctl start cockpit.socket
sudo systemctl start cockpit
sudo systemctl start libvirt-guests
sudo systemctl start docker
# CTOP
sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop