参考官方WIKI:https://github.com/FreeRDP/FreeRDP/wiki/Compilation
第一步:安装git (安装freerdp,必须先安装git)
[root@flc repos]# yum install git
详细请参阅:CentOS安装Git 和创建共享资源库Repository
第二步:创建共享资源库
[root@flc repos]# cd /usr/local/
[root@flc repos]# mkdir repos
[root@flc repos]# cd repos
Initialized empty Git repository in /usr/local/repos/.git/
[root@flc repos]# git add .
[root@flc repos]# git commit
***********************************************************************
选择一
[root@flc repos]# git clone https://github.com/FreeRDP/FreeRDP.git
Initialized empty Git repository in /usr/local/repos/FreeRDP/.git/
remote: Counting objects: 26052, done.
remote: Compressing objects: 100% (7514/7514), done.
remote: Total 26052 (delta 19799), reused 24499 (delta 18427)
Receiving objects: 100% (26052/26052), 7.77 MiB | 41 KiB/s, done.
Resolving deltas: 100% (19799/19799), done.
************************************************************************
选择二
[root@flc ~]# cp /root/freerdp-1.0.1.tar.gz /usr/local/repos/
[root@flc ~]# tar -xzvf freerdp-1.0.1.tar.gz
[root@flc repos]# git add freerdp-1.0.1
[root@flc repos]# git status
************************************************************************
第三步:查看安装所需的依赖包
[root@flc repos]# cd FreeRDP/
[root@flc FreeRDP]# cat freerdp.spec | less
或者
[root@flc FreeRDP]# cd ..
[root@flc repos]# cd freerdp-1.0.1
[root@flc freerdp-1.0.1]# cat freerdp.spec | less
BuildRequires: openssl-devel
BuildRequires: libX11-devel, libXcursor-devel, libXext-devel, libXinerama-devel, libXdamage-devel, libXv-devel, libxkbfile-devel
BuildRequires: cups-devel
BuildRequires: alsa-lib-devel
BuildRequires: pcsc-lite-devel
第四步:安装依赖包
[root@flc freerdp-1.0.1]# yum install gcc cmake openssl-devel libX11-devel libXext-devel libXinerama-devel libXcursor-devel libXdamage-devel libXv-deve
libxkbfile-devel cups-devel alsa-lib-devel pcsc-lite-devel
第五步:开始编译安装
[root@flc freerdp-1.0.1]# cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON
-- FreeRDP GIT
-- Skipping optional package PulseAudio.
-- Enable this using "-DWITH_PULSEAUDIO=ON".
-- Skipping optional package PCSC.
-- Enable this using "-DWITH_PCSC=ON".
-- Skipping optional package CUnit.
-- Enable this using "-DWITH_CUNIT=ON".
-- Skipping optional package DirectFB.
-- Enable this using "-DWITH_DIRECTFB=ON".
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/repos/freerdp-1.0.1
[root@flc freerdp-1.0.1]# make
... ...
[100%] Building C object client/test/CMakeFiles/freerdp-test.dir/freerdp.c.o
Linking C executable freerdp-test
[100%] Built target freerdp-test
[root@flc freerdp-1.0.1]# make install
第六步:创建freerdp.conf文件
[root@flc freerdp-1.0.1]# vi /etc/ld.so.conf.d/freerdp.conf
/usr/local/lib/freerdp
/usr/local/lib/
~
~
[root@flc freerdp-1.0.1]# ldconfig
至此,安装完成!
第七步:远程桌面测试
[root@flc ld.so.conf.d]# which xfreerdp
/usr/bin/xfreerdp
[root@flc ld.so.conf.d]# cd ~/.freerdp/
[root@flc .freerdp]# xfreerdp 192.168.10.188 -u administrator -p 123
connected to 192.168.10.188:3389
connected to 192.168.10.188:3389
connected to 192.168.10.188:3389
官方网站:http://www.freerdp.com/
安装完后运行的命令是:xfreerdp 192.168.10.188 -u administrator -p 123
1、连接机器ip地址是 192.168.10.188,
2、登录远程机的账户密码是:-u administrator -p 123
3、使用全屏浏览: -f
4、把本地的/media/folder目录共享给远程机,
其中disk:后面先接远程机的用户名,然后才是本地目录路径:
–plugin rdpdr –data disk:administrator:/media/folder
注意的事项:
1、从远程机的全屏切换回来的快捷键是:ctrl+alt+enter
2、在挂载了共享给远程机的目录后,远程机的ip地址前面有一个空格,然后才是双短横 — ,而其他地方的双短横都是紧接命令的。
3、为了不每次输入这么长的一段命令,可以写入.bashrc中(仅对当前环境有效),alias myconn=’command’
4、更多的使用方法,请参考官方文档。