[笔记] AlmaLinux - 类CentOS企业稳定版

date
Mar 24, 2023
slug
almalinux-note
status
Published
summary
note-
tags
读书笔记
type
Post
URL
 

[笔记] 关于

更新并安装screen

dnf install -y epel-release
dnf update -y && dnf upgrade -y
dnf install -y screen

install docker

dnf -y install dnf-plugins-core
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker

docker-compose

curl -sSL https://get.docker.com | sh

# check version at https://github.com/docker/compose/releases
ARCH=$(uname -m) && [[ "${ARCH}" == "armv7l" ]] && ARCH="armv7"

# https://github.com/docker/compose/releases
curl -sSL --fail "https://github.com/docker/compose/releases/download/v2.24.6/docker-compose-$(uname -s)-${ARCH}" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
mkdir -p /usr/lib/docker/cli-plugins
ln -s /usr/local/bin/docker-compose /usr/lib/docker/cli-plugins/docker-compose
docker-compose --version
docker compose version

systemctl enable --now docker

更新

dnf --refresh update -y && dnf upgrade -y

© Ying Bun 2021 - 2024