Rocky linux 8.8 基础环境一键配置

1、有线

dnf install -y net-tools
dnf install -y vim
dnf install -y wget
sudo dnf install epel-release -y
sudo dnf install dkms -y

sudo dnf install -y dnf-utils device-mapper-persistent-data lvm2
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
sudo dnf clean all
sudo dnf -y module install nvidia-driver:latest-dkms
sudo dnf -y install cuda
dnf -y install "kernel-devel-uname-r == $(uname -r)" 
dkms install -m nvidia -v 460.32.03
sudo dnf config-manager --add-repo https://nvidia.github.io/nvidia-docker/centos8/nvidia-docker.repo
sudo dnf install -y nvidia-docker2
sudo systemctl restart docker

如果想安装指定版本的docker

sudo dnf install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io

2)系统时间

# 查看当前系统时区
timedatectl status
sudo timedatectl set-timezone Asia/Shanghai

设置NTP同步

sudo dnf install chrony
sudo systemctl start chronyd
sudo systemctl enable chronyd

2、offline

驱动

sudo dnf install epel-release -y
sudo dnf install dkms -y
dnf -y install "kernel-devel-uname-r == $(uname -r)"
sh cuda_12.2.1_535.86.10_linux.run

你可能感兴趣的:(项目笔记,linux,运维,服务器)