Last active
February 7, 2024 19:01
-
-
Save RafaelAPB/80d49dd6afff1be797ac3c42791ae318 to your computer and use it in GitHub Desktop.
André's magic script - Cacti setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# For Ubuntu Docker | |
export DEBIAN_FRONTEND=noninteractive | |
export TZ=Europe/Lisbon | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install nano less git npm default-jdk | |
sudo apt-get -y install software-properties-common | |
sudo apt-get -y install unzip | |
sudo apt-get -y install build-essential | |
sudo apt-get -y install libssl-dev | |
sudo apt-get -y install libffi-dev | |
sudo apt-get install -y gnupg | |
sudo apt-get -y install python3-dev | |
sudo apt-get -y install python3-pip | |
sudo apt-get -y install snapd | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
nvm install 18.18.2 | |
nvm use 18.18.2 | |
nvm alias default 18.18.2 | |
# Add Docker's official GPG key: | |
sudo apt-get update | |
sudo apt-get -y install ca-certificates curl gnupg | |
sudo install -m 0755 -d /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
# Add the repository to Apt sources: | |
echo \ | |
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ | |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt-get update | |
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment