Centos7安装图形化界面并使用Windows远程桌面连接(包含离线部署)
一、在centos7 中部署远程桌面所使用的程序
1、关闭防火墙和selinux(xrdp是通过3389端口远程桌面连接 )
[root@localhost ~]# systemctl stop firewalld #临时关闭防火墙[root@localhost ~]# systemctl disable firewalld.service #永久关闭防火墙
[root@localhost ~]# setenforce 0 #临时关闭selinux[root@localhost ~]# sed -i 's/enforcing/disabled/g' /etc/selinux/config #永久关闭selinux
2、查看可用环境分组是否有Server with GUI group
[root@localhost ~]# yum group list

3、直接安装Server with GUI
[root@localhost ~]# yum groupinstall "Server with GUI" -y

4、设置系统启动默认加入GUI界面,通过以下命令以启用GUI作为默认值,以便系统启动进入图形模式
[root@localhost ~]# systemctl set-default graphical

5、安装epel库和xrdp
[root@localhost ~]# yum install -y epel-release xrdp
6、安装tigervnc-server(因为Xrdp最终会自动启用VNC,所以必须安装tigervnc-server,否则xrdp无法使用)
[root@localhost ~]# yum install -y tigervnc-server
7、启动xrdp并设置成开机自启
[root@localhost ~]# systemctl stsrt xrdp[root@localhost ~]# systemctl enable xrdp
8、查看xrdp程序、端口是否启动[root@localhost ~]# systemctl status xrdp
[root@localhost ~]# netstat -antpl | grep 3389 #查看3389端口是否启动
二、在win电脑上面mstsc远程桌面连接centos7的地址
Centos7安装图形化界面并使用Windows远程桌面连接离线部署
1、关闭防火墙和selinux
略
2、只下载不安装Server with GUI
[root@localhost ~]# yum install "Server with GUI" --downloadonly --downloaddir=/opt/GUI #–downloadonly --downloaddir=/opt/GUI 只下载不安装 GUI所需要的rpm包到/opt/GUI
3、同理只下载不安装epel、xrdp、tigervnc-server
[root@localhost ~]# yum install epel-release --downloadonly --downloaddir=/opt/epel # 分别下载到/opt/对应的目录epel、xrdp、tigervnc
4、rpm安装对应目录里的Server with GUI、epel、xrdp、tigervnc-server包
[root@localhost GUI]# pwd/opt/GUI[root@localhost GUI]# rpm -ivh *.rpm --force --nodeps # --force --nodeps 强制安装
在分别去opt下这三个目录epel、xrdp、tigervnc安装对应的rpm包
5、设置系统启动默认加入GUI界面,通过以下命令以启用GUI作为默认值,以便系统启动进入图形模式
[root@localhost ~]# systemctl set-default graphical
6、启动xrdp并设置成开机自启
[root@localhost ~]# systemctl stsrt xrdp[root@localhost ~]# systemctl enable xrdp
7、查看xrdp程序、端口是否启动
[root@localhost ~]# systemctl status xrdp
8、win直接远程桌面访问即可
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐


所有评论(0)