本文章实现:

(1)在Ubuntu客户端安装FreeRDP

(2)在centos7服务端安装xfce界面和Xrdp

(3)实现Linux远程控制Linux

前期准备:

1.开启RDP3389端口

2.关闭防火墙

//临时关闭 systemctl stop firewalld //禁止开机启动 systemctl disable firewalld

3.根据《3-0.自制centos7镜像》制作了可以远程SSH登陆的镜像:user:root PWD;1234

4.其他远程登录问题:《3-3.xrdp远程登录问题》

本文章全程使用root用户进行操作

--------------------------------------------配置前准备-----------------------------------------------------

1.升级更新(可选) 

更新资源,避免资源过旧出现问题

yum update

2.安装额外yum源

yum install epel-release

--------------------------------------------安装XRDP-----------------------------------------------------

3.安装XRDP,分为两步

yum install epel-release

yum install xrdp

4.配置Xrdp开启自动开启

systemctl enable xrdp.service

5.如果启动不成功,保持3389和3350端口开启监听状态

chcon -t bin_t /usr/sbin/xrdp /usr/sbin/xrdp-sesman

---------------------------------------------安装Xfce界面---------------------------------------------------

4.安装Xfce

yum groups install Xfce

5.配置Xfce(可选)

安装中文字体

# yum install cjkuni-ukai-fonts

安装中文输入法 

安装ibus中文输入法

# yum install ibus.x86_64 # yum install ibus-libpinyin.x86_64

安装输入法选择器

# yum install im-chooser.x86_64

设置Xfce中文显示

# vim /etc/locale.conf

LANG=en_US.UTF-8

改为

LANG=zh_CN.UTF-8

6.配置xfce为默认桌面 

打开用户目录下的.Xclients文件

# vim ~/.Xclients

把下面内容写入文件,不要有多余的空格

#!/bin/bash XFCE="$(which xfce4-session 2>/dev/null)" exec "$XFCE"

增加权限

# chmod +x ~/.Xclients

重启xrdp

# systemctl restart xrdp

此时,通过远程桌面登录后,默认显示的就是Xfce桌面了。

------------------------------------------------登录---------------------------------------------------

登录命令,在客户端ubuntu配置Freerdp之后:

配置FreeRDP参考:https://blog.csdn.net/github_37157365/article/details/80278483

xfreerdp /u:root /p:1234 /f /v:172.24.4.9:3389

 

参考链接;https://blog.csdn.net/zhuyf0522/article/details/52702594

http://blog.51cto.com/13528032/2120925

Logo

更多推荐