在 CentOS Minimal(最小安装版)下,默认通常没有图形界面,也不自带远程桌面,一般通过 SSH 远程命令行 来连接。下面从最常见到可选方案给你说明。
CentOS Minimal 有时没装 openssh-server:
rpm -qa | grep openssh-server
如果没有,安装:
sudo yum install -y openssh-server
sudo systemctl start sshd
sudo systemctl enable sshd
检查状态:
systemctl status sshd
ip addr
或
hostname -I
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
ssh user@服务器IP
ssh user@服务器IP
ss -tunlp | grep ssh
ping 服务器IP
CentOS Minimal 默认无桌面,需要额外安装:
yum groupinstall "GNOME Desktop"
yum install tigervnc-server
yum install epel-release
yum install xrdp
systemctl start xrdp
⚠️ 但 Minimal 不推荐图形远程,占用资源大,安全性低。
✅ CentOS Minimal 最佳远程方式:
SSH + 命令行管理
✅ 工具推荐:
如果你告诉我:
我可以给你更精确的步骤。