From 1064bf1e8c61df9df76051754e8378f538e48e79 Mon Sep 17 00:00:00 2001 From: NW Date: Wed, 15 Jan 2025 12:30:02 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20setup=5Fvps.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_vps.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 setup_vps.sh diff --git a/setup_vps.sh b/setup_vps.sh new file mode 100644 index 0000000..3375895 --- /dev/null +++ b/setup_vps.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Обновление пакетов и установка базовых утилит +sudo apt-get update && sudo apt-get upgrade -y +sudo apt-get install -y tmux mc dry git + +# Установка Docker +sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg +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" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt-get update +sudo apt-get install -y docker-ce docker-ce-cli containerd.io + +# Установка Docker Compose (без использования docker-compose) +DOCKER_COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d') +sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose + +# Добавление текущего пользователя в группу docker, чтобы не использовать sudo для docker команд +sudo usermod -aG docker $USER + +# Вывод версий установленных программ +echo "Установленные версии:" +tmux -V +mc -V +dry --version +docker --version +docker-compose --version +git --version + +echo "Установка завершена!" \ No newline at end of file