华为云计算 云知识 Guacamole是什么
Guacamole是什么

简介

Guacamole是一个提供了基于HTML5 Web应用程序的远程桌面代理服务器。通过使用Guacamole服务器,可以很轻松地在浏览器上远程访问Guacamole代理的主机。

编译和测试方式

1.配置编译环境

1)安装wget工具。

yum install wget -y

2)安装依赖包。

yum -y install cairo-devel libjpeg-devel libpng-devel uuid-devel

yum -y install ffmpeg-devel freerdp-devel pango-devel libssh2-devel

yum -y install libtelnet-devel libvncserver-devel pulseaudio-libs-devel

yum -y install openssl-devel libvorbis-devel libwebp-devel

yum -y install freerdp-plugins

3)安装Open JDK。

yum install java-1.8.0-openjdk

4)安装Tomcat。

Tomcat安装请参照鲲鹏社区的Tomcat使用教程:/kunpeng/software/tomcat.html

----结束

2.获取源码

1)下载服务端软件包。

wget https://mirrors.tuna.tsinghua.edu.cn/apache/guacamole/1.0.0/source/guacamole-server-1.0.0.tar.gz

2)获取客户端代码:

wget http://mirror.bit.edu.cn/apache/guacamole/1.0.0/binary/guacamole-1.0.0.war

3)将服务端软件包和客户端代码复制至 云服务器 的“/usr/local/src”目录。

----结束

3.编译和安装

1)解压软件包。

tar -zxvf guacamole-server-1.0.0.tar.gz

2)进入“guacamole-server-1.0.0”安装目录。

cd guacamole-server-1.0.0

3)生成makefile文件。

./configure --with--dir=/etc/init.d

4)编译guacamole-server源码。

make -j4

make install

4.运行和验证

1)把guacamole客户端代码包“guacamole-1.0.0.war”移动到tomcat的“webapps”目录下。

mv guacamole-1.0.0.war /usr/local/tomcat/webapps

2)创建guacamole的配置目录。

mkdir /etc/guacamole

3)创建“guacamole.properties”和“user-mapping.xml”文件。

cd /etc/guacamole

vim guacamole.properties

“guacamole.properties”内容如下:

guacd-hostname: localhost

guacd-port:4822

user-mapping:/etc/guacamole/user-mapping.xml

vim user-mapping.xml

“user-mapping.xml”内容如下:

<user-mapping>

        <authorize username="admin" password="[mypassword]">

            <connection name="mycentos">

                <protocol>ssh</protocol>

                <param name="hostname">localhost</param>

                <param name="port">22</param>

                <param name="username">root</param>

                <param name="password">[password]</param>

            </connection>

        </authorize>

</user-mapping>

其中“[mypassword]”为Guacamole的访问密码,“[password]”为节点的SSH登录密码,请结合实际填写。

4)执行以下命令, 配置“GUACAMOLE_HOME”环境变量。

echo "export GUACAMOLE_HOME=/etc/guacamole" >> /etc/profile

source /etc/profile

5)重启Tomcat。

sh /usr/local/tomcat/bin/shutdown.sh

sh /usr/local/tomcat/bin/startup.sh

6)启动guacamole-server。

service guacd start

7)浏览器访问如下网址。

http://[ECS IP]:8080/guacamole-1.0.0

界面显示如图6-1所示。

账号密码为“user-mapping.xml”中与“authorize”同一行的“username”和“password”的值。

GUACAMOLE界面

上一篇:深信服VPN云平台配置 下一篇:弹性云服务器的产品架构