CentOS7配置图形界面及设置vnc远程连接、windows远程桌面连接

安装CentOS桌面

yum groupinstall "GNOME Desktop"

重启,进入终端,将启动模式变更为图形模式

systemctl set-default graphical.target

重启

方式一:安装和配置VNC服务器

yum install tigervnc-server

创建远程登录用户uservnc(可替换为其他用户名)

useradd uservnc

设置密码

passwd uservnc

附:VNC Viewer官网https://www.realvnc.com/en/download/vnc/

注意:防火墙开启5901端口,且客户端连接时IP:5901

方式二:实现Windows远程桌面连接

配置源

yum install epel* -y

安装xrdp

yum --enablerepo=epel -y install xrdp

启动xrdp并设置开机启动

systemctl start xrdp

systemctl enable xrdp

检查xrdp是否启动成功,xrdp监听3389端口

netstat -antup | grep xrdp

开启防火墙对应端口

firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload

原文地址:https://www.cnblogs.com/sheng9hhd/p/7267778.html