Windows远程linux云主机

1 远程安装图形化界面(此操作只为实现图形化)

(1)查询yum源是否有GUI

[root@VM_0_9_centos /]# yum groups list  | grep GUI
   Server with GUI

(2)安装 Server with GUI

[root@VM_0_9_centos /]#yum -y groupinstall "Server with GUI"

(3)开启图形化界面(本人是secureCRT远程连接的,所以开启界面是无效的,然后就会报错)

[root@VM_0_9_centos /]# startx

(4)查询运行级别(multi-user.target 处于多用户的文本界面)

[root@VM_0_9_centos /]# systemctl get-default
multi-user.target

(5)设置永久的图形化界面

[root@VM_0_9_centos /]# systemctl set-default graphical.target anaconda.target
 

2安装xrdp

(1)介绍

     xrdp: An open source remote desktop protocol(rdp) server.

(2)下包

wget http://jaist.dl.sourceforge.net/project/xrdp/xrdp/0.6.1/xrdp-v0.6.1.tar.gz

(3)解包

  tar -xf xrdp-v0.6.1.tar.gz

  cd xrdp-v0.6.1/

(4)安装依赖包

 

yum installautoconf automake libtool openssl openssl-devel pam-devel libX11-devellibXfixes-devel

(5)开始安装

./bootstrap

./configure

 make

make install

(6)设置权限

 chmod 755 /etc/xrdp/xrdp.sh

(7)启动服务

/etc/xrdp/xrdp.sh start

(8)查询开放的端口(默认端口tcp3389)

netstat –ntl

 (9)写入配置文件,开机自启

 

 vim /etc/rc.local

 /etc/xrdp/xrdp.sh start

(10)写入防火墙规则

firewall-cmd --permanent --add-port=3389/tcp

 firewall-cmd --reload
 

3打开windows的远程连接就可以搞定了

 

 

 

 

 

你可能感兴趣的:(Windows远程linux云主机)