Public repo to distribute scripts and config's
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

32 lines
1.5 KiB

  1. #/bin/bash
  2. apt update
  3. # install ops tools
  4. apt install sudo nmon tmux tcpdump nano iputils-ping net-tools -y
  5. # install Docker + docker-compose
  6. apt install ca-certificates curl gnupg lsb-release -y
  7. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  8. echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
  9. apt update
  10. apt install docker-ce docker-ce-cli containerd.io -y
  11. systemctl start docker
  12. curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  13. chmod +x /usr/local/bin/docker-compose
  14. # set TF users
  15. wget https://docs.grid.tf/threefold_public/public/raw/branch/master/add-tf-users.sh
  16. sh add-tf-users.sh
  17. # install Caddy
  18. apt install -y debian-keyring debian-archive-keyring apt-transport-https
  19. curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | tee /etc/apt/trusted.gpg.d/caddy-stable.asc
  20. curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
  21. curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
  22. apt update
  23. apt install caddy -y
  24. # set propper sshd config
  25. wget https://docs.grid.tf/threefold_public/public/raw/branch/master/sshd_config
  26. cp sshd_config /etc/ssh/
  27. systemctl restart ssh