guacamole1.3.0安装向导(部分官方人工翻译)centos7

安装包简介

Linux的许多发行版系统的镜像仓库中都有Guacamole的安装包。如果你的linux系统有Guacamole包,那是最合适的安装方法。如果你的系统没提供Guacamole的安装包,或者版本太老,也可以很容易地通过源代码构建安装。

注意:
Guacamole是一个远程桌面网关(类似跳板机),被连接的服务器没有某种远程桌面连接服务或者没开是不能访问你的远程桌面。Guacamole本身不提供VNC或者RDP服务,本文也不是指导你安装VNC或RDP服务端

VNC或者RDP的安装启动,参考对应的系统文档
直接从系统的guacamole安装包安装一般要安装web应用(guacamole.war),guacd代理(guacamole-server),vnc协议支持(libguac-client-vnc).如果你想要支持RDP,或者VNC就要安装对应的支持库。

Guacamole源码安装

从源码构建并不困难,前提是已经安装了必要的安装工具。所有的Guacamole源码都可以很方便地从官方网站下载,每个都是以组件名命名。每个包都包含了README文件,有详细的构建和安装说明。

Guacamole被分为2部分:guacamole-server,包含guacad代理和相关的库。guacamole-client,通过servlet容器(一般是Tomcat)使用的客户端。大多数情况下,只需要构建guacamole-server,并且下载对应的guacamole.war来提供客户端访问。只有在你想编辑源码或者尝试未发布的版本才需要去构建guacamole-client。

编译C语言组件,你需要C编译器(如gcc)和每个组件相关的lib库。注意,很多linux发行版都将lib分为lib和"development“包;这些”development“也需要安装。它们通常以dev或者devel结尾(建议直接使用yum install gcc*).

guacamole-server

guacamole-server包含所有本体和服务端组件,都是连接远程桌面所需要的。具体是一个常用C lib,libguac,组件的依赖以及各种协议的支持库,代理程序,guacd。

guacd是guacamole 服务器上的代理进程,从Guacamole的客户端web程序接受远程连接信息。通过动态地加载协议插件在常用远程桌面协议如VNC或RDP中有效地转换。构建guacd或生成一个可执行guacd文件,它可以手动运行,也可以配置开机自启。
为了构建guacamole-server,你需要Cairo,libpng,libjpeg。在所有地情况下这些都是必须的,否则不能编辑构建。OSSP UUID 库也是需要地,为了使Guacamole地连接有唯一的标识符。除此之外都是可选地,取决于要支持地协议。

Guacamole目前支持VND,RDP,SSH和telnet。如果你有安装了相应地支持插件,对应地协议也会和guacamole-server一起构建。如果你安装了对应的库,这些协议都会启用

Libray名称是否必须描述和centos对应的包名
Cairo用于图像显示,没有它不能运行:cairo-devel
libpng写入PND图片,没有它不能运行:libpng-devel
libjpeg-turbo提供JPEG支持: libjpeg-turbo-devel,没有的话可用libjpeg-devel替代,尽管没那么快
libtools编译需要,没有它不能运行: libtool
OSSP UUID使Guacamole地连接有唯一的标识符,没有它不能运行:uuid-devel
FFmpeg包含了libavcodec, libavformat, libavutil, libswscale libraries,guacenc在翻译Guacamole会话时编码视频流:ffmpeg-devel
FreeRDPRDP协议必需支持RDP远程桌面协议: freerdp-devel
Pangossh和telnet必需用于文本显示:pango-devel
libssh2ssh必需ssh支持: libssh2-devel
libtelnettelnet必需telnet支持:libtelnet-devel
libVNCServerVNC必需VNC协议支持:libvncserver-devel
libwebsocketskubernets必须kubernets支持:libwebsockets-devel
OpenSSLssh和ssl连接必需libssl支持SSL和TLS-2种常用的加密web流量的方法;如果安装了libssl,guacd构建时会提供SSL支持,用于加密guacd和web客户端之间的会话:openssl-devel
PulseAudioVNC协议音频相关的:pulseaudio-libs-devel
libvorbis声音压缩工具,否则不会压缩:libvorbis-devel
libwebpWebP 图片相关的:libwebp-devel

从官方网站下载的包是经过测试的,符合大众的。下载的是.tar.gz结尾的,需要解压

$ tar -xzf guacamole-server-1.3.0.tar.gz
$ cd guacamole-server-1.3.0/
$

如果想要最新的代码,并且不在乎没有像稳定版一样经过严格的测试,可以从GitHub上下载

$ git clone git://github.com/apache/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脚本,运行configure决定了你系统上可用的组件和协议,会选择你安装过的组件来编译。

注意: 从GitHub上下载的没有configure脚本,也没有自动生成的代码。你需要手动去生成configure:

$ cd guacamole-server/
$ autoreconf -fi
$

这个命令需要安装GNU Autotools

运行configure之后,可以看到被发现即将安装的插件和lib库和支持的协议

$ ./configure --with-init-dir=/etc/init.d
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...

------------------------------------------------
guacamole-server version 1.3.0
------------------------------------------------

   Library status:

     freerdp2 ............ yes
     pango ............... yes
     libavcodec .......... yes
     libavformat ......... yes
     libavutil ........... yes
     libssh2 ............. yes
     libssl .............. yes
     libswscale .......... yes
     libtelnet ........... yes
     libVNCServer ........ yes
     libvorbis ........... yes
     libpulse ............ yes
     libwebsockets ....... yes
     libwebp ............. yes
     wsock32 ............. no

   Protocol support:

      Kubernetes .... yes
      RDP ........... yes
      SSH ........... yes
      Telnet ........ yes
      VNC ........... yes

   Services / tools:

      guacd ...... yes
      guacenc .... yes
      guaclog .... yes

   Init scripts: /etc/init.d
   Systemd units: no

Type "make" to compile guacamole-server.

$

–with-init-dir=/etc/init.d参数是在/et/init.d文件夹内安装个启动脚本,方便启动和开机自启。不需要则取消该选项。如果你的系统启动路径不是放在这里,自己找对应的系统资料
如果你没有对应的依赖项或包(或者版本不对)上面会提示"no",如果缺少必须要的包,则会失败,你要重新安装依赖,解决之后重新运行configure。
注意:
SSH和telnet都需要安装字体,否则输出异常。但是没有安装字体也会构建成功,但是使用会失败

Aug 23 14:09:45 my-server guacd[5606]: Unable to get font "monospace"

如果ssh连接有问题可以查看syslog日志,安装字体(fonts)并重试

configure运行之后,输入"make",guacamole-server会开始编译:

$ make
Making all in src/libguac
make[1]: Entering directory `/home/zhz/guacamole/guacamole-server/src/libguac'
...
make[1]: Leaving directory `/home/zhz/guacamole/guacamole-server/src/protocols/vnc'
make[1]: Entering directory `/home/zhz/guacamole/guacamole-server'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/zhz/guacamole/guacamole-server'
$

输入"make install"安装编译好的组件,然后输入"ldconfig"更新安装lib的系统缓存

# make install
Making install in src/libguac
make[1]: Entering directory `/home/zhz/guacamole/guacamole-server/src/libguac'
make[2]: Entering directory `/home/zhz/guacamole/guacamole-server/src/libguac'
...
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/zhz/guacamole/guacamole-server/src/protocols/vnc'
make[1]: Leaving directory `/home/zhz/guacamole/guacamole-server/src/protocols/vnc'
make[1]: Entering directory `/home/zhz/guacamole/guacamole-server'
make[2]: Entering directory `/home/zhz/guacamole/guacamole-server'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/zhz/guacamole/guacamole-server'
make[1]: Leaving directory `/home/zhz/guacamole/guacamole-server'
# ldconfig
#   

现在一切都安装好了,但是guacd还没运行。安装好客户端后运行guacd才能使用Guacamole。
安装并启动guacd之后,需要去激活自启服务才能自启,不同系统设置方式不同,自行查阅相关文档
Centos7

# systemctl start guacd

guacamole-client

guacamole-client包含了Guacamole的所有JAVA和Maven组件(guacamole,guacamole-common,guacamole-ext,guacamole-common-js).这些组件最终会安装成web应用程序,给用户提供HTML5 Guacamole 客户端服务来连接你的guacamole-server服务端。web应用程序会连接guacd,guacamole-server,为网站用户提供他们有权限访问的远程桌面。

通常你不需要去构建guacamole-client,因为已经写入到JAVA了并且是跨平台的。guacamole-client最简单的获取方法是从官网上下载最新的guacamolo.war(编译好的guacamole-client)。

编译guacamole需要Apache Maven 和 Java JDK。大多数Linux系统会提供这些包。

如果你需要最新的代码,可以从官方网站上下载,这些版本都是经过测试的,符合大众的。下载的包是.tar.gz结尾的,需要解压:

$ tar -xzf guacamole-client-1.3.0.tar.gz
$ cd guacamole-client-1.3.0/
$

也可以从GitHub上下载未经测试的版本

$ git clone git://github.com/apache/guacamole-client.git
Cloning into 'guacamole-client'...
remote: Counting objects: 12788, done.
remote: Compressing objects: 100% (4183/4183), done.
remote: Total 12788 (delta 3942), reused 12667 (delta 3822)
Receiving objects: 100% (12788/12788), 3.23 MiB | 799 KiB/s, done.
Resolving deltas: 100% (3942/3942), done.
$

和guacamole-server不同的是,从gitHUB上下载的代码,也不需要在构建前运行任何脚本
构建guacamole-client只需运行”mvn package“。这回引导Maven自动构建,并打包所有组件,生成一个.war文件,包含了web应用程序:

$ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] guacamole-common
[INFO] guacamole-ext
[INFO] guacamole-common-js
[INFO] guacamole
[INFO] guacamole-auth-cas
[INFO] guacamole-auth-duo
[INFO] guacamole-auth-header
[INFO] guacamole-auth-jdbc
[INFO] guacamole-auth-jdbc-base
[INFO] guacamole-auth-jdbc-mysql
[INFO] guacamole-auth-jdbc-postgresql
[INFO] guacamole-auth-jdbc-sqlserver
[INFO] guacamole-auth-jdbc-dist
[INFO] guacamole-auth-ldap
[INFO] guacamole-auth-openid
[INFO] guacamole-auth-quickconnect
[INFO] guacamole-auth-totp
[INFO] guacamole-example
[INFO] guacamole-playback-example
[INFO] guacamole-client
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] guacamole-common ................................... SUCCESS [ 21.852 s]
[INFO] guacamole-ext ...................................... SUCCESS [  9.055 s]
[INFO] guacamole-common-js ................................ SUCCESS [  1.988 s]
[INFO] guacamole .......................................... SUCCESS [ 18.040 s]
[INFO] guacamole-auth-cas ................................. SUCCESS [  4.203 s]
[INFO] guacamole-auth-duo ................................. SUCCESS [  2.251 s]
[INFO] guacamole-auth-header .............................. SUCCESS [  1.399 s]
[INFO] guacamole-auth-jdbc ................................ SUCCESS [  1.396 s]
[INFO] guacamole-auth-jdbc-base ........................... SUCCESS [  3.266 s]
[INFO] guacamole-auth-jdbc-mysql .......................... SUCCESS [  4.665 s]
[INFO] guacamole-auth-jdbc-postgresql ..................... SUCCESS [  3.764 s]
[INFO] guacamole-auth-jdbc-sqlserver ...................... SUCCESS [  3.738 s]
[INFO] guacamole-auth-jdbc-dist ........................... SUCCESS [  1.214 s]
[INFO] guacamole-auth-ldap ................................ SUCCESS [  1.991 s]
[INFO] guacamole-auth-openid .............................. SUCCESS [  2.204 s]
[INFO] guacamole-auth-quickconnect ........................ SUCCESS [  2.983 s]
[INFO] guacamole-auth-totp ................................ SUCCESS [  8.154 s]
[INFO] guacamole-example .................................. SUCCESS [  0.895 s]
[INFO] guacamole-playback-example ......................... SUCCESS [  0.795 s]
[INFO] guacamole-client ................................... SUCCESS [  7.478 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:41 min
[INFO] Finished at: 2018-10-15T17:08:29-07:00
[INFO] Final Memory: 42M/379M
[INFO] ------------------------------------------------------------------------
$

构建之后,.war文件会在当前路径(运行mvn package的路径)的guacamole/target/文件夹内。这个war文件包含了web应用程序,所有依赖。

部署Guacamole

Guacamole的部署涉及有2个关键的文件:
guacamole.war,包含web应用程序;
guacamole.properties,Guacamole的主配置文件。
安装Guacamole的标准方法是将这些文件放在标准路,并创建软连接以便于Tomcat找到它们。

不管是构建还是直接下载的,最终guacamole.war文件或其链接,必须要放在servlet容器放.war文件的地方

# cp guacamole.war /var/lib/tomcat/webapps
# cp guacamole/target/guacamole-1.3.0.war /var/lib/tomcat/webapps/guacamole.war
#

如果使用的是不同的servlet容器或者Tomcat安装在不同于上述的路径,则需要根据自己的情况来变更。

Guacamole部署完成后,Tomcat和guacd进程需要重启,重启之后即可使用。启动命令不同系统可能用所不同。一般是在脚本后加 ”restart“选项:

# /etc/init.d/tomcat6 restart
Stopping Tomcat... OK
Starting Tomcat... OK
# /etc/init.d/guacd start
Starting guacd: SUCCESS
guacd[6229]: INFO:  Guacamole proxy daemon (guacd) version 0.7.0
guacd[6229]: INFO:  Unable to bind socket to host ::1, port 4822: Address family not supported by
protocol
guacd[6229]: INFO:  Successfully bound socket to host 127.0.0.1, port 4822
guacd[6229]: INFO:  Exiting and passing control to PID 6230
guacd[6230]: INFO:  Exiting and passing control to PID 6231
#

启动Tomcat和guacd之后,Guacamole成功安装完成,虽然它不会完整地运行。当前状态下是完全未配置地。

配置

安装Guacamole之后,运行之前你需要配置用户和连接。
Guacamole默认的认证方法是从user-mapping.xml的配置文件读取用户和链接。这种认证方式适用于以下情况:
1.Guacamole的小型部署
2.相对容易地验证guacamole是否被正确地设置
另外,更多复杂的认证方法,如使用数据库在其它地方讲
无论使用那种认证方式,Guacamole的配配置文件主要包含2部分:引用叫GUACAMOLE_HOME的目录,配置文件的主要搜索路径;guacamole.properties,Guacamole使用的主要的配置文件和扩展配置

GUACAMOLE_HOME(/etc/guacamole)

GUACAMOLE_HOME是放置Guacamole配置文件的目录,默认是/etc/guacamole。所有的文件,扩展等都在此目录中。GUACAMOLE_HOME的结构被严格定义,包含以下可选文件:

guacamole.properties
	主要的配置文件,里面的属性决定了Guacamole怎么连接guacd,配置另外的的认证方式
logback.xml
	Guacamole对所有的消息使用的日志系统叫Logback 。默认情况下,Guacamole只会记录console信息,但是可通过Logback配置文件改变
extensions/
	安装Guacamole的额外扩展。Guacamole在启动时会自动加载此目录下的.jar文件
lib/
	Guacamole需要额外的lib包都会在此文件夹内搜索。Guacamole会将此文件夹内的所有.jar文件加载到所有可用的扩展上去。如果扩展包需要额外的lib包,比如数据库驱动,可以上传到这里

想改变GUACAMOLE_HOME的路径/etc/guaca,可参考下面任意方法:

1.在servlet容器运行用户的家目录创建.guacamole的文件夹
2.使用绝对路径设置环境变量GUACAMOLE_HOME,查看你的servlet容器设置环境变量的方法
3.指定系统的绝对路径替代GUACAMOLE_HOME

guacamole.properties

Guacamole web应用程序的主要配置文件是guacamole.properties。Guacamole及其扩展的所有参数设置都是在这里配置,包括用户身份认证。
在以前的版本中,该文件必须在servlet容器的类路径下。现在guacamole.properties的路径可以通过环境变量或系统属性准确的设置,并且类路径是最后采用的办法。Guacamole会采用以下的顺序检查:

1.上面定义的GUACAMOLE_HOME的路径。
2.servlet容器的类路径

guacamole.properties文件是可选的,在默认配置不满足或者为扩展插件提供配置额外的配置信息时会使用。以下几种参数是通用的:

api-session-timeout
Guacamole在会话(token 认证)不活跃地情况下保持的时间,分钟为单位,如果删除,60分钟后过期

allowed-languages
Guacamole web界面可选择的语言关键字名单。如果你要允许英文和德文,可以这样写:
allowed-languages: en, de
一般不要省略英文。如果删除该参数,所有语言都可用

enable-eviroment-properties
设置为true,环境变量的值会覆盖本配置文件设定的值,一般不要这个参数

guacd-hostname
guacd监听的IP,默认localhost

guacd-port
guacd监听端口,默认4822

guacd-ssl
如果设置为true,Guacamole 会在web应用程序和guacd之间加密。默认不加密
如果启用了该设置,你需要通过guacd 的命令参数选项配置,具体参数看man guacd说明。你需要SSL证书和私钥

skip-if-unavailable
skip-if-unavailable: mysql, ldap
如果名单上的身份认证方式出现内部问题,则跳过他们采用其它认证方式

配置实例

	# Hostname and port of guacamole proxy
guacd-hostname: localhost
guacd-port:     4822

默认配置

Guacamole的默认配置模块很简单,由用户名映射组成。Guacamole简单地从XML文件读取用户名和密码。它始终处于启用状态,但只会从 XML 文件(如果存在)中读取,并且相对于任何其他身份验证扩展插件,它的优先级始终排在最后。

还有其它的认证模块也是可以的。Guacamole提供了数据库身份认证方式去管理连接和用户,通过web界面操作。还可以通过Guacamole web应用程序提供的额外API和guacamole-ext创建认证模块。

user-mapping

默认情况下,通过GUACAMOLE_HOME/user-mapping.xml文件读取账号密码和配置信息。

<user-mapping>

    <!-- Per-user authentication and config information -->
    <authorize username="USERNAME" password="PASSWORD">
        <protocol>vnc</protocol>
        <param name="hostname">localhost</param>
        <param name="port">5900</param>
        <param name="password">VNCPASS</param>
    </authorize>

    <!-- Another user, but using md5 to hash the password
         (example below uses the md5 hash of "PASSWORD") -->
    <authorize
            username="USERNAME2"
            password="319f4d26e3c536b5dd871bb2c52e3178"
            encoding="md5">

        <!-- First authorized connection -->
        <connection name="localhost">
            <protocol>vnc</protocol>
            <param name="hostname">localhost</param>
            <param name="port">5901</param>
            <param name="password">VNCPASS</param>
        </connection>

        <!-- Second authorized connection -->
        <connection name="otherhost">
            <protocol>vnc</protocol>
            <param name="hostname">otherhost</param>
            <param name="port">5900</param>
            <param name="password">VNCPASS</param>
        </connection>

    </authorize>

</user-mapping>

每个 <authorize> 标签对应一个用户,包含了该用户授权的连接。每个连接使用<connection>标签标识,包含了协议和协议参数,分别用<protocal><param>标签标识。
这只是user-mapping.xml文件的一部分标签,其它参数设置参考
https://guacamole.apache.org/doc/1.3.0/gug/configuring-guacamole.html#connection-configuration

Mysql数据库–管理Guacamole

通过在Guacamole网站上下载扩展包可支持Mysql,PostgreSQL,SQL Server等数据库认证方式。使用数据库还能提供额外的功能,比如负载均衡,web管理等。和XML方式不同,所有设置可以立马生效。
不同的认证方式之间可以是从属关系,可以混用
使用扩展认证方式需要以下条件:

1.一个的数据库。
2.创建数据库的权限
3.Guacamole可以访问数据库

下载数据库扩展

数据库身份验证扩展插件与主要的guacamole.war 分开提供。
guacamole-auth-jdbc-1.3.0.tar.gz–版本要和guacamole-server和guacamole.war的版本一致
http://guacamole.apache.org/releases/.
mysql:
包含了Mysql/MariaDB认证扩展包,guacamole-auth-jdbc-1.3.0.tar.gz,和schema/文件夹,包含设置数据库的脚本。guacamole-auth-jdbc-1.3.0.tar.gz需要放在GUACAHOME_HOME/extensions,GUACAMOLE_HOME默认是/etc/guacamole。MYSQL的 JDBC驱动必须放在GUACAHOME_HOME/lib文件夹。
MYSQL的 JDBC驱动需要去自己去找。
https://downloads.mysql.com/archives/c-j/

相关配置
可以通过在guacamole.properties配置mysql-server-timezone参数指定Mysql运行的时区。虽然MYSQL可以自己通过服务匹配时区,但大多数情况下,是有问题的。在这种情况下,MYSQL可能会拒绝连接,除非创建连接时传入时区参数。此参数指定时区以便于连接持续正常,JDBC也可以正确地转换时间戳。格式:
mysql-server-timezone: China/Shanghai

创建数据库

数据库认证模块需要一个数据库去存储认证数据和一个数据访问和操作用户。也可以使用已存在的数据库和用户,但是为了简单和安全,以下配置假设已经创建了一个新的数据库和只用于Guacamole和认证模块的用户
安装数据库,并且有权限创建和管理数据库。
为了方便演示,以下说明以"guacamole_db"为例,也可以是其它名字

$ ls schema/
001-create-schema.sql  002-create-admin-user.sql  upgrade
$ cat schema/*.sql | mysql -u root -p guacamole_db
Enter password: password
$

设置数据库访问权限

为了使数据库执行查询权限,必须创建一个数据库用户并赋予权限管理所有的表。只需要SELECT,UPDATE和DELETE的权限。
以下说明假设用户为"guacamole_user",密码”some_password“,建议设置复杂一点

$ mysql -u root -p
Enter password: password
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 233
Server version: 5.5.29-0ubuntu0.12.10.1 (Ubuntu)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE guacamole_db;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'some_password';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)

mysql> quit
Bye
$

运行数据库脚本

脚本在下载的文件的schema/目录下,该脚本可创建数据库架构和管理用户,这些文件以序号命令以便于一条命令执行:

$ ls schema/
001-create-schema.sql  002-create-admin-user.sql  upgrade
$ cat schema/*.sql | mysql -u root -p guacamole
Enter password: password
$

操作成功后,所有数据库表会被创建成功,数据库就准备好了。接下来配置Guacamole来使用数据库。

注意: 如果你从不支持连接组的旧版本升级,请运行schema/upgrade目录下的脚本

$ ls schema/upgrade/
upgrade-pre-0.8.2.sql
$ mysql -u root -p guacamole < schema/upgrade/upgrade-pre-0.8.2.sql
Enter password: password
$

配置Guacamole

数据库和用户已创建完成,现在创建guacamole.properties文件连接数据库(HOME_GUACAMOLE目录下)

# Auth provider class
auth-provider: net.sourceforge.guacamole.net.auth.mysql.MySQLAuthenticationProvider

# MySQL properties
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole
mysql-username: guacamole
mysql-password: some_password

默认情况下,允许并发访问。
重启servlet容器,如Tomcat

登录

安装Mysql之后你可以登录并且改变密码,添加额外的用户。默认账号密码都是guacadmin,可以在web界面修改。

访问

Tomcat一般是8080.则http://x.x.x.x:8080/guacamole

参考连接

RDP的连接这里要用NLA模式,对应RDP服务端也要修改为NLA
RDP的连接这里要用NLA模式,对应RDP服务端也要修改为NLA

参考文档

https://guacamole.apache.org/doc/0.9.2/gug/guacamole-architecture.html

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值