Guacamole 分为两个部分:一部分是guacamole-server,它提供guacd 代理和关联包;另一部分是guacamole-client,它通过servlet容器在Tomcat上给客户端提供服务。
编译guacamole-server
guacamole-server包含所有Guacamole连接远程桌面所需的本地、服务端组件。它还提供一个通用的C库——libguac、所有其它本地组建的依赖、以及为每个支持的协议单独的库和Guacamole的核心 guacd。,
guacd是运行在Guacamole服务端上代理服务的守护进程,接收用户请求Guacamole web应用的隧道连接,然后代替用户连接远程桌面。编译guacd生成可执行文件,它可以手动执行,如果你愿意,也可以让它开机自启动。
为了编译guacamole-server,你需要C编译器(例如:GCC)以及guacamole-server所依赖的库。一些依赖是必需的,还有一些是可选择的。但可选择的那些依赖可以增加一些额外的特性。
必需依赖
为了编译guacamole-server,你需要这些包:Cairo, libjpeg, libpng, and the OSSP UUID。这些包在任何情况下都是必须安装的,没有它们Guacamole就编译不了。
Library name |
Features |
||||||||
Cairo |
Cairo 是被libguac 用来绘图的. 没有它Guacamole就实现不了此功能。
|
||||||||
libjpeg-turbo |
libjpeg-turbo 为libguac 提供 JPEG 的支持. 没有它Guacamole就无法编译。
If libjpeg-turbo is unavailable on your platform, and you do not wish to build it from source, libjpeg will work as well, though it will not be quite as fast:
|
||||||||
libpng |
libpng is used by libguac to write PNG images, the core image type used by the Guacamole protocol. Guacamole cannot function without libpng.
|
||||||||
OSSP UUID |
OSSP UUID is used by libguac to assign unique IDs to each Guacamole connection. These unique IDs are the basis for connection sharing support.
|
可选择依赖
可选择性的依赖决定Guacamole哪些支持的协议会被安装,并且决定关于这些协议的额外特性是否可用。
Guacamole目前支持的协议有:VNC、RDP、SSH和telnet。每一种协议对应一个独立的库,如果你安装了它对应的依赖,这些独立的库就会随着guacamole-server被编译。
VNC的支持依赖于libvncclient,它是libVNCServer的一部分,RDP的支持依赖于FreeRDP 1.0或更高的版本,SSH的支持依赖于libssh2,telnet依赖于libtelnet。Pango是一个字体、文本布局库,为SSH和telnet提供支持。
Library name |
Features |
||||
FreeRDP |
FreeRDP is required for RDP support. If you do not wish to build RDP support, this library is not needed.
|
||||
Pango |
Pango is a text layout library which Guacamole‘s SSH and telnet support uses to render text. If you do not wish to build SSH or telnet support, this library is not needed.
|
||||
libssh2 |
libssh2 is required for SSH support. If you do not wish to build SSH support, this library is not needed.
|
||||
libtelnet |
libtelnet is required for telnet support. If you do not wish to build telnet support, this library is not needed.
|
||||
libVNCServer |
libVNCServer provides libvncclient, which is required for VNC support. If you do not wish to build VNC support, this library is not needed.
|
||||
PulseAudio |
PulseAudio provides libpulse, which is used by Guacamole‘s VNC support to provide experimental audio support. If you are not going to be using the experimental audio support for VNC, you do not need this library.
|
||||
OpenSSL |
OpenSSL provides support for SSL and TLS - two common encryption schemes that make up the majority of encrypted web traffic. If you have libssl installed, guacd will be built with SSL support, allowing communication between the web application and guacd to be encrypted. This library is also required for SSH support for the sake of manipulating public/private keys. Without SSL support, there will be no option to encrypt communication to guacd, and support for SSH cannot be built.
|
||||
libvorbis |
libvorbis provides support for Ogg Vorbis - a free and open standard for sound compression. If installed, libguac will be built with support for Ogg Vorbis, and protocols supporting audio will use Ogg Vorbis compression when possible. Otherwise, sound will only be encoded as WAV (uncompressed), and will only be available if your browser also supports WAV.
|
||||
libwebp |
libwebp is used by libguac to write WebP images. Though support for WebP is not mandated by the Guacamole protocol, WebP images will be used if supported by both the browser and by libguac. Lacking WebP support, Guacamole will simply use JPEG in cases that it would have preferred WebP.
|
获取源代码
你可以在Guacamole的项目网站上获取一份guacamole-server 源码。最新的稳定发行版是经过了Guacamole小组的测试,认为适合公众使用的版本。从项目网站上下载的.tar.gz格式压缩包,可以用过下列命令解压:
$ tar -xzf guacamole-server-0.9.9.tar.gz
$ cd guacamole-server-0.9.9/
$
如果你想得到最新的代码,并且不关心它没有经过稳定发行版一样严格的测试,你也可以用Guacamole团队在Github上的仓库里克隆一份:
$
git clone git://github.com/glyptodon/guacamole-server.git
Cloning into ‘guacamole-server‘...
remote: Counting objects: 6769, done.
remote: Compressing objects: 100% (2244/2244), done.
remote: Total 6769 (delta 3058), reused 6718 (delta 3008)
Receiving objects: 100% (6769/6769), 2.32 MiB | 777 KiB/s, done.
Resolving deltas: 100% (3058/3058), done.
$
编译流程
当你把guacamole-server源码下载下来,并且解压后,就可以运行configure命令。这是一个被GNU Autotools自动触发的shell脚本,GNU Autotools是一种流行的编译系统,也被Guacamole 所使用。正在运行的configure
命令会判断哪些库在你的系统上有效,并且会根据你所安装的依赖选择合适的组件来编译。
未完待续。。