rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum groupinstall -y "GNOME Desktop" "Graphical Administration Tools"
# 修改配置文件
vi /etc/gdm/custom.conf
# 增加如下配置
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=root
# 从命令行切换到桌面环境
startx
# 获取当前启动模式
systemctl get-default
# 修改启动模式为图形化
systemctl set-default graphical.target
# 修改启动模式为命令行
systemctl set-default multi-user.target
# Windows 远程登录需要安装 Xrdp,需要 epel 源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y xrdp
# Xrdp 会调用 VNC,安装 tigervnc-server
yum install -y tigervnc-server
# 修改 Xrdp 最大连接数
vim /etc/xrdp/xrdp.ini
max_bpp=32
# 启动 Xrdp 并设置开机启动
systemctl start xrdp
systemctl enable xrdp
# 开放 3389 端口,或者关闭防火墙
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
# 关闭防火墙
systemctl stop firewalld
# 禁止防火墙开机启动
systemctl disable firewalld
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。