- 更新ssh并初始化环境
echo -e '\nPermitRootLogin yes\nTCPKeepAlive yes\nClientAliveInterval 5\nClientAliveCountMax 3'>>/etc/ssh/sshd_config && systemctl restart sshd && echo -e '\n/usr/local/lib'>>/etc/ld.so.conf && echo -e '\nexport PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"' >>/etc/profi
- 执行命令下载一些东西
yum -y install epel-release xrdp && yum -y groups install "X Window System" "GNOME Desktop" && systemctl enable xrdp && systemctl start xrdp && systemctl set-default graphical.target && startx
- 开始连接
运行mstsc或打开控制面板远程桌面连接,这一步的重点前提是服务器的安全组要打开相应端口(比如:3389)
输入服务器的root账密后,就是你想要的可视化了