Rocky Linux 10 GPU Server 初次安裝
1. 更新系統
sudo dnf upgrade --refresh -y
sudo reboot
2. 啟用 SSH 並開放 22 Port
sudo systemctl enable --now sshd
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
確認:
sudo ss -lntp | grep ':22'
3. 啟用 CRB 與 EPEL
sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --set-enabled crb
sudo dnf install -y epel-release
sudo dnf upgrade --refresh -y
確認:
dnf repolist | grep -E 'crb|epel'
Rocky Linux 10 使用 EPEL 前應啟用 CRB。
4. 安裝常用 Server 套件
sudo dnf group install -y "Development Tools"
sudo dnf install -y \
micro \
uv \
gcc \
gcc-c++ \
make \
cmake \
ninja-build \
pkgconf-pkg-config \
dkms \
kernel-devel-matched \
kernel-headers \
git \
git-lfs \
curl \
wget \
tmux \
htop \
tree \
jq \
rsync \
unzip \
zip \
tar \
bash-completion \
pciutils \
usbutils \
lsof \
bind-utils \
net-tools \
iproute \
iputils \
openssl \
openssl-devel \
python3 \
python3-pip \
podman
micro 與 uv 都由 EPEL 10 提供,可直接使用 DNF 管理。
確認:
micro --version
uv --version
gcc --version
make --version
podman --version
5. 確認 NVIDIA GPU
6. 停用 Nouveau
sudo tee /etc/modprobe.d/blacklist-nouveau.conf >/dev/null <<'EOF'
blacklist nouveau
options nouveau modeset=0
EOF
sudo dracut --force
sudo reboot
重新登入後確認沒有載入 Nouveau:
沒有輸出即可。
7. 加入 NVIDIA 官方 Repository
sudo dnf config-manager --add-repo \
https://developer.download.nvidia.com/compute/cuda/repos/rhel10/x86_64/cuda-rhel10.repo
sudo dnf clean all
sudo dnf makecache
確認:
8. 安裝最新 NVIDIA Open Driver
RTX 3080 Ti 以上使用 Open Kernel Module:
sudo dnf install -y \
nvidia-driver-cuda \
kmod-nvidia-open-dkms
這是 NVIDIA 對 Rocky Linux 9/10 文件列出的安裝組合。
重新開機:
確認:
查看驅動版本:
nvidia-smi --query-gpu=name,driver_version,memory.total --format=csv
9. 安裝最新 CUDA Toolkit
安裝 NVIDIA repository 當下的最新版本:
sudo dnf install -y cuda-toolkit
目前會安裝 CUDA Toolkit 13.3 系列;cuda-toolkit 之後也會隨 repository 升級至新的主要版本。
設定環境:
sudo tee /etc/profile.d/cuda.sh >/dev/null <<'EOF'
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
EOF
source /etc/profile.d/cuda.sh
確認:
nvcc --version
nvidia-smi
需要固定在 CUDA 13 系列、不自動跳到 CUDA 14 時,可改裝:
sudo dnf install -y cuda-toolkit-13
需要固定在 13.3:
sudo dnf install -y cuda-toolkit-13-3
10. 測試 Podman
podman run --rm docker.io/library/alpine:latest cat /etc/os-release
這裡只安裝真正的 Podman,沒有安裝:
docker
docker-ce
podman-docker
11. 最後完整檢查
cat /etc/rocky-release
uname -r
dnf repolist | grep -E 'crb|epel|cuda'
sudo ss -lntp | grep ':22'
micro --version
uv --version
gcc --version
make --version
podman --version
nvidia-smi
nvcc --version
正常結果應包含:
SSH:TCP 22 正在監聽
CRB:已啟用
EPEL:已啟用
micro:可執行
uv:可執行
Podman:可執行
NVIDIA Driver:nvidia-smi 正常
CUDA Toolkit:nvcc 正常
日後更新
sudo dnf upgrade --refresh -y
sudo reboot
更新並重新開機後檢查:
nvidia-smi
nvcc --version
podman --version
Rocky Linux 10 GPU Server 初次安裝
1. 更新系統
2. 啟用 SSH 並開放 22 Port
sudo systemctl enable --now sshd sudo firewall-cmd --permanent --add-service=ssh sudo firewall-cmd --reload確認:
3. 啟用 CRB 與 EPEL
確認:
Rocky Linux 10 使用 EPEL 前應啟用 CRB。
4. 安裝常用 Server 套件
sudo dnf group install -y "Development Tools"micro與uv都由 EPEL 10 提供,可直接使用 DNF 管理。確認:
5. 確認 NVIDIA GPU
lspci | grep -i nvidia6. 停用 Nouveau
重新登入後確認沒有載入 Nouveau:
lsmod | grep nouveau沒有輸出即可。
7. 加入 NVIDIA 官方 Repository
確認:
dnf repolist | grep cuda8. 安裝最新 NVIDIA Open Driver
RTX 3080 Ti 以上使用 Open Kernel Module:
這是 NVIDIA 對 Rocky Linux 9/10 文件列出的安裝組合。
重新開機:
確認:
查看驅動版本:
9. 安裝最新 CUDA Toolkit
安裝 NVIDIA repository 當下的最新版本:
目前會安裝 CUDA Toolkit 13.3 系列;
cuda-toolkit之後也會隨 repository 升級至新的主要版本。設定環境:
source /etc/profile.d/cuda.sh確認:
需要固定在 CUDA 13 系列、不自動跳到 CUDA 14 時,可改裝:
需要固定在 13.3:
10. 測試 Podman
這裡只安裝真正的 Podman,沒有安裝:
11. 最後完整檢查
正常結果應包含:
日後更新
更新並重新開機後檢查: