日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發(fā)布時間:2024/1/18 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 guacamole1.3.0安装向导(部分官方人工翻译)centos7 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

目錄

  • 安裝包簡介
  • Guacamole源碼安裝
    • guacamole-server
    • guacamole-client
  • 部署Guacamole
  • 配置
    • GUACAMOLE_HOME(/etc/guacamole)
    • guacamole.properties
      • 配置實例
  • 默認(rèn)配置
    • user-mapping
    • Mysql數(shù)據(jù)庫--管理Guacamole
      • 下載數(shù)據(jù)庫擴(kuò)展
      • 創(chuàng)建數(shù)據(jù)庫
      • 設(shè)置數(shù)據(jù)庫訪問權(quán)限
      • 運行數(shù)據(jù)庫腳本
      • 配置Guacamole
      • 登錄
  • 訪問
  • 參考連接
  • 參考文檔

安裝包簡介

Linux的許多發(fā)行版系統(tǒng)的鏡像倉庫中都有Guacamole的安裝包。如果你的linux系統(tǒng)有Guacamole包,那是最合適的安裝方法。如果你的系統(tǒng)沒提供Guacamole的安裝包,或者版本太老,也可以很容易地通過源代碼構(gòu)建安裝。

注意:
Guacamole是一個遠(yuǎn)程桌面網(wǎng)關(guān)(類似跳板機(jī)),被連接的服務(wù)器沒有某種遠(yuǎn)程桌面連接服務(wù)或者沒開是不能訪問你的遠(yuǎn)程桌面。Guacamole本身不提供VNC或者RDP服務(wù),本文也不是指導(dǎo)你安裝VNC或RDP服務(wù)端

VNC或者RDP的安裝啟動,參考對應(yīng)的系統(tǒng)文檔
直接從系統(tǒng)的guacamole安裝包安裝一般要安裝web應(yīng)用(guacamole.war),guacd代理(guacamole-server),vnc協(xié)議支持(libguac-client-vnc).如果你想要支持RDP,或者VNC就要安裝對應(yīng)的支持庫。

Guacamole源碼安裝

從源碼構(gòu)建并不困難,前提是已經(jīng)安裝了必要的安裝工具。所有的Guacamole源碼都可以很方便地從官方網(wǎng)站下載,每個都是以組件名命名。每個包都包含了README文件,有詳細(xì)的構(gòu)建和安裝說明。

Guacamole被分為2部分:guacamole-server,包含guacad代理和相關(guān)的庫。guacamole-client,通過servlet容器(一般是Tomcat)使用的客戶端。大多數(shù)情況下,只需要構(gòu)建guacamole-server,并且下載對應(yīng)的guacamole.war來提供客戶端訪問。只有在你想編輯源碼或者嘗試未發(fā)布的版本才需要去構(gòu)建guacamole-client。

編譯C語言組件,你需要C編譯器(如gcc)和每個組件相關(guān)的lib庫。注意,很多l(xiāng)inux發(fā)行版都將lib分為lib和"development“包;這些”development“也需要安裝。它們通常以dev或者devel結(jié)尾(建議直接使用yum install gcc*).

guacamole-server

guacamole-server包含所有本體和服務(wù)端組件,都是連接遠(yuǎn)程桌面所需要的。具體是一個常用C lib,libguac,組件的依賴以及各種協(xié)議的支持庫,代理程序,guacd。

guacd是guacamole 服務(wù)器上的代理進(jìn)程,從Guacamole的客戶端web程序接受遠(yuǎn)程連接信息。通過動態(tài)地加載協(xié)議插件在常用遠(yuǎn)程桌面協(xié)議如VNC或RDP中有效地轉(zhuǎn)換。構(gòu)建guacd或生成一個可執(zhí)行g(shù)uacd文件,它可以手動運行,也可以配置開機(jī)自啟。
為了構(gòu)建guacamole-server,你需要Cairo,libpng,libjpeg。在所有地情況下這些都是必須的,否則不能編輯構(gòu)建。OSSP UUID 庫也是需要地,為了使Guacamole地連接有唯一的標(biāo)識符。除此之外都是可選地,取決于要支持地協(xié)議。

Guacamole目前支持VND,RDP,SSH和telnet。如果你有安裝了相應(yīng)地支持插件,對應(yīng)地協(xié)議也會和guacamole-server一起構(gòu)建。如果你安裝了對應(yīng)的庫,這些協(xié)議都會啟用

Libray名稱是否必須描述和centos對應(yīng)的包名
Cairo用于圖像顯示,沒有它不能運行:cairo-devel
libpng寫入PND圖片,沒有它不能運行:libpng-devel
libjpeg-turbo提供JPEG支持: libjpeg-turbo-devel,沒有的話可用libjpeg-devel替代,盡管沒那么快
libtools編譯需要,沒有它不能運行: libtool
OSSP UUID使Guacamole地連接有唯一的標(biāo)識符,沒有它不能運行:uuid-devel
FFmpeg包含了libavcodec, libavformat, libavutil, libswscale libraries,guacenc在翻譯Guacamole會話時編碼視頻流:ffmpeg-devel
FreeRDPRDP協(xié)議必需支持RDP遠(yuǎn)程桌面協(xié)議: freerdp-devel
Pangossh和telnet必需用于文本顯示:pango-devel
libssh2ssh必需ssh支持: libssh2-devel
libtelnettelnet必需telnet支持:libtelnet-devel
libVNCServerVNC必需VNC協(xié)議支持:libvncserver-devel
libwebsocketskubernets必須kubernets支持:libwebsockets-devel
OpenSSLssh和ssl連接必需libssl支持SSL和TLS-2種常用的加密web流量的方法;如果安裝了libssl,guacd構(gòu)建時會提供SSL支持,用于加密guacd和web客戶端之間的會話:openssl-devel
PulseAudioVNC協(xié)議音頻相關(guān)的:pulseaudio-libs-devel
libvorbis聲音壓縮工具,否則不會壓縮:libvorbis-devel
libwebpWebP 圖片相關(guān)的:libwebp-devel

從官方網(wǎng)站下載的包是經(jīng)過測試的,符合大眾的。下載的是.tar.gz結(jié)尾的,需要解壓

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

如果想要最新的代碼,并且不在乎沒有像穩(wěn)定版一樣經(jīng)過嚴(yán)格的測試,可以從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決定了你系統(tǒng)上可用的組件和協(xié)議,會選擇你安裝過的組件來編譯。

注意: 從GitHub上下載的沒有configure腳本,也沒有自動生成的代碼。你需要手動去生成configure:

$ cd guacamole-server/ $ autoreconf -fi $

這個命令需要安裝GNU Autotools

運行configure之后,可以看到被發(fā)現(xiàn)即將安裝的插件和lib庫和支持的協(xié)議

$ ./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 ............ yespango ............... yeslibavcodec .......... yeslibavformat ......... yeslibavutil ........... yeslibssh2 ............. yeslibssl .............. yeslibswscale .......... yeslibtelnet ........... yeslibVNCServer ........ yeslibvorbis ........... yeslibpulse ............ yeslibwebsockets ....... yeslibwebp ............. yeswsock32 ............. noProtocol support:Kubernetes .... yesRDP ........... yesSSH ........... yesTelnet ........ yesVNC ........... yesServices / tools:guacd ...... yesguacenc .... yesguaclog .... yesInit scripts: /etc/init.dSystemd units: noType "make" to compile guacamole-server.$

–with-init-dir=/etc/init.d參數(shù)是在/et/init.d文件夾內(nèi)安裝個啟動腳本,方便啟動和開機(jī)自啟。不需要則取消該選項。如果你的系統(tǒng)啟動路徑不是放在這里,自己找對應(yīng)的系統(tǒng)資料
如果你沒有對應(yīng)的依賴項或包(或者版本不對)上面會提示"no",如果缺少必須要的包,則會失敗,你要重新安裝依賴,解決之后重新運行configure。
注意:
SSH和telnet都需要安裝字體,否則輸出異常。但是沒有安裝字體也會構(gòu)建成功,但是使用會失敗

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的系統(tǒng)緩存

# 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/libIf 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 variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring 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 #

現(xiàn)在一切都安裝好了,但是guacd還沒運行。安裝好客戶端后運行g(shù)uacd才能使用Guacamole。
安裝并啟動guacd之后,需要去激活自啟服務(wù)才能自啟,不同系統(tǒng)設(shè)置方式不同,自行查閱相關(guān)文檔
Centos7

# systemctl start guacd

guacamole-client

guacamole-client包含了Guacamole的所有JAVA和Maven組件(guacamole,guacamole-common,guacamole-ext,guacamole-common-js).這些組件最終會安裝成web應(yīng)用程序,給用戶提供HTML5 Guacamole 客戶端服務(wù)來連接你的guacamole-server服務(wù)端。web應(yīng)用程序會連接guacd,guacamole-server,為網(wǎng)站用戶提供他們有權(quán)限訪問的遠(yuǎn)程桌面。

通常你不需要去構(gòu)建guacamole-client,因為已經(jīng)寫入到JAVA了并且是跨平臺的。guacamole-client最簡單的獲取方法是從官網(wǎng)上下載最新的guacamolo.war(編譯好的guacamole-client)。

編譯guacamole需要Apache Maven 和 Java JDK。大多數(shù)Linux系統(tǒng)會提供這些包。

如果你需要最新的代碼,可以從官方網(wǎng)站上下載,這些版本都是經(jīng)過測試的,符合大眾的。下載的包是.tar.gz結(jié)尾的,需要解壓:

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

也可以從GitHub上下載未經(jīng)測試的版本

$ 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上下載的代碼,也不需要在構(gòu)建前運行任何腳本
構(gòu)建guacamole-client只需運行”mvn package“。這回引導(dǎo)Maven自動構(gòu)建,并打包所有組件,生成一個.war文件,包含了web應(yīng)用程序:

$ 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] ------------------------------------------------------------------------ $

構(gòu)建之后,.war文件會在當(dāng)前路徑(運行mvn package的路徑)的guacamole/target/文件夾內(nèi)。這個war文件包含了web應(yīng)用程序,所有依賴。

部署Guacamole

Guacamole的部署涉及有2個關(guān)鍵的文件:
guacamole.war,包含web應(yīng)用程序;
guacamole.properties,Guacamole的主配置文件。
安裝Guacamole的標(biāo)準(zhǔn)方法是將這些文件放在標(biāo)準(zhǔn)路,并創(chuàng)建軟連接以便于Tomcat找到它們。

不管是構(gòu)建還是直接下載的,最終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安裝在不同于上述的路徑,則需要根據(jù)自己的情況來變更。

Guacamole部署完成后,Tomcat和guacd進(jìn)程需要重啟,重啟之后即可使用。啟動命令不同系統(tǒng)可能用所不同。一般是在腳本后加 ”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成功安裝完成,雖然它不會完整地運行。當(dāng)前狀態(tài)下是完全未配置地。

配置

安裝Guacamole之后,運行之前你需要配置用戶和連接。
Guacamole默認(rèn)的認(rèn)證方法是從user-mapping.xml的配置文件讀取用戶和鏈接。這種認(rèn)證方式適用于以下情況:
1.Guacamole的小型部署
2.相對容易地驗證guacamole是否被正確地設(shè)置
另外,更多復(fù)雜的認(rèn)證方法,如使用數(shù)據(jù)庫在其它地方講
無論使用那種認(rèn)證方式,Guacamole的配配置文件主要包含2部分:引用叫GUACAMOLE_HOME的目錄,配置文件的主要搜索路徑;guacamole.properties,Guacamole使用的主要的配置文件和擴(kuò)展配置

GUACAMOLE_HOME(/etc/guacamole)

GUACAMOLE_HOME是放置Guacamole配置文件的目錄,默認(rèn)是/etc/guacamole。所有的文件,擴(kuò)展等都在此目錄中。GUACAMOLE_HOME的結(jié)構(gòu)被嚴(yán)格定義,包含以下可選文件:

guacamole.properties主要的配置文件,里面的屬性決定了Guacamole怎么連接guacd,配置另外的的認(rèn)證方式 logback.xmlGuacamole對所有的消息使用的日志系統(tǒng)叫Logback 。默認(rèn)情況下,Guacamole只會記錄console信息,但是可通過Logback配置文件改變 extensions/安裝Guacamole的額外擴(kuò)展。Guacamole在啟動時會自動加載此目錄下的.jar文件 lib/Guacamole需要額外的lib包都會在此文件夾內(nèi)搜索。Guacamole會將此文件夾內(nèi)的所有.jar文件加載到所有可用的擴(kuò)展上去。如果擴(kuò)展包需要額外的lib包,比如數(shù)據(jù)庫驅(qū)動,可以上傳到這里

想改變GUACAMOLE_HOME的路徑/etc/guaca,可參考下面任意方法:

1.在servlet容器運行用戶的家目錄創(chuàng)建.guacamole的文件夾 2.使用絕對路徑設(shè)置環(huán)境變量GUACAMOLE_HOME,查看你的servlet容器設(shè)置環(huán)境變量的方法 3.指定系統(tǒng)的絕對路徑替代GUACAMOLE_HOME

guacamole.properties

Guacamole web應(yīng)用程序的主要配置文件是guacamole.properties。Guacamole及其擴(kuò)展的所有參數(shù)設(shè)置都是在這里配置,包括用戶身份認(rèn)證。
在以前的版本中,該文件必須在servlet容器的類路徑下。現(xiàn)在guacamole.properties的路徑可以通過環(huán)境變量或系統(tǒng)屬性準(zhǔn)確的設(shè)置,并且類路徑是最后采用的辦法。Guacamole會采用以下的順序檢查:

1.上面定義的GUACAMOLE_HOME的路徑。 2.servlet容器的類路徑

guacamole.properties文件是可選的,在默認(rèn)配置不滿足或者為擴(kuò)展插件提供配置額外的配置信息時會使用。以下幾種參數(shù)是通用的:

api-session-timeout Guacamole在會話(token 認(rèn)證)不活躍地情況下保持的時間,分鐘為單位,如果刪除,60分鐘后過期allowed-languages Guacamole web界面可選擇的語言關(guān)鍵字名單。如果你要允許英文和德文,可以這樣寫: allowed-languages: en, de 一般不要省略英文。如果刪除該參數(shù),所有語言都可用enable-eviroment-properties 設(shè)置為true,環(huán)境變量的值會覆蓋本配置文件設(shè)定的值,一般不要這個參數(shù)guacd-hostname guacd監(jiān)聽的IP,默認(rèn)localhostguacd-port guacd監(jiān)聽端口,默認(rèn)4822guacd-ssl 如果設(shè)置為true,Guacamole 會在web應(yīng)用程序和guacd之間加密。默認(rèn)不加密 如果啟用了該設(shè)置,你需要通過guacd 的命令參數(shù)選項配置,具體參數(shù)看man guacd說明。你需要SSL證書和私鑰skip-if-unavailable skip-if-unavailable: mysql, ldap 如果名單上的身份認(rèn)證方式出現(xiàn)內(nèi)部問題,則跳過他們采用其它認(rèn)證方式

配置實例

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

默認(rèn)配置

Guacamole的默認(rèn)配置模塊很簡單,由用戶名映射組成。Guacamole簡單地從XML文件讀取用戶名和密碼。它始終處于啟用狀態(tài),但只會從 XML 文件(如果存在)中讀取,并且相對于任何其他身份驗證擴(kuò)展插件,它的優(yōu)先級始終排在最后。

還有其它的認(rèn)證模塊也是可以的。Guacamole提供了數(shù)據(jù)庫身份認(rèn)證方式去管理連接和用戶,通過web界面操作。還可以通過Guacamole web應(yīng)用程序提供的額外API和guacamole-ext創(chuàng)建認(rèn)證模塊。

user-mapping

默認(rèn)情況下,通過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") --><authorizeusername="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> 標(biāo)簽對應(yīng)一個用戶,包含了該用戶授權(quán)的連接。每個連接使用<connection>標(biāo)簽標(biāo)識,包含了協(xié)議和協(xié)議參數(shù),分別用<protocal>和<param>標(biāo)簽標(biāo)識。
這只是user-mapping.xml文件的一部分標(biāo)簽,其它參數(shù)設(shè)置參考
https://guacamole.apache.org/doc/1.3.0/gug/configuring-guacamole.html#connection-configuration

Mysql數(shù)據(jù)庫–管理Guacamole

通過在Guacamole網(wǎng)站上下載擴(kuò)展包可支持Mysql,PostgreSQL,SQL Server等數(shù)據(jù)庫認(rèn)證方式。使用數(shù)據(jù)庫還能提供額外的功能,比如負(fù)載均衡,web管理等。和XML方式不同,所有設(shè)置可以立馬生效。
不同的認(rèn)證方式之間可以是從屬關(guān)系,可以混用
使用擴(kuò)展認(rèn)證方式需要以下條件:

1.一個的數(shù)據(jù)庫。 2.創(chuàng)建數(shù)據(jù)庫的權(quán)限 3.Guacamole可以訪問數(shù)據(jù)庫

下載數(shù)據(jù)庫擴(kuò)展

數(shù)據(jù)庫身份驗證擴(kuò)展插件與主要的guacamole.war 分開提供。
guacamole-auth-jdbc-1.3.0.tar.gz–版本要和guacamole-server和guacamole.war的版本一致
http://guacamole.apache.org/releases/.
mysql:
包含了Mysql/MariaDB認(rèn)證擴(kuò)展包,guacamole-auth-jdbc-1.3.0.tar.gz,和schema/文件夾,包含設(shè)置數(shù)據(jù)庫的腳本。guacamole-auth-jdbc-1.3.0.tar.gz需要放在GUACAHOME_HOME/extensions,GUACAMOLE_HOME默認(rèn)是/etc/guacamole。MYSQL的 JDBC驅(qū)動必須放在GUACAHOME_HOME/lib文件夾。
MYSQL的 JDBC驅(qū)動需要去自己去找。
https://downloads.mysql.com/archives/c-j/

相關(guān)配置
可以通過在guacamole.properties配置mysql-server-timezone參數(shù)指定Mysql運行的時區(qū)。雖然MYSQL可以自己通過服務(wù)匹配時區(qū),但大多數(shù)情況下,是有問題的。在這種情況下,MYSQL可能會拒絕連接,除非創(chuàng)建連接時傳入時區(qū)參數(shù)。此參數(shù)指定時區(qū)以便于連接持續(xù)正常,JDBC也可以正確地轉(zhuǎn)換時間戳。格式:
mysql-server-timezone: China/Shanghai

創(chuàng)建數(shù)據(jù)庫

數(shù)據(jù)庫認(rèn)證模塊需要一個數(shù)據(jù)庫去存儲認(rèn)證數(shù)據(jù)和一個數(shù)據(jù)訪問和操作用戶。也可以使用已存在的數(shù)據(jù)庫和用戶,但是為了簡單和安全,以下配置假設(shè)已經(jīng)創(chuàng)建了一個新的數(shù)據(jù)庫和只用于Guacamole和認(rèn)證模塊的用戶
安裝數(shù)據(jù)庫,并且有權(quán)限創(chuàng)建和管理數(shù)據(jù)庫。
為了方便演示,以下說明以"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 $

設(shè)置數(shù)據(jù)庫訪問權(quán)限

為了使數(shù)據(jù)庫執(zhí)行查詢權(quán)限,必須創(chuàng)建一個數(shù)據(jù)庫用戶并賦予權(quán)限管理所有的表。只需要SELECT,UPDATE和DELETE的權(quán)限。
以下說明假設(shè)用戶為"guacamole_user",密碼”some_password“,建議設(shè)置復(fù)雜一點

$ 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 $

運行數(shù)據(jù)庫腳本

腳本在下載的文件的schema/目錄下,該腳本可創(chuàng)建數(shù)據(jù)庫架構(gòu)和管理用戶,這些文件以序號命令以便于一條命令執(zhí)行:

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

操作成功后,所有數(shù)據(jù)庫表會被創(chuàng)建成功,數(shù)據(jù)庫就準(zhǔn)備好了。接下來配置Guacamole來使用數(shù)據(jù)庫。

注意: 如果你從不支持連接組的舊版本升級,請運行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

數(shù)據(jù)庫和用戶已創(chuàng)建完成,現(xiàn)在創(chuàng)建guacamole.properties文件連接數(shù)據(jù)庫(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

默認(rèn)情況下,允許并發(fā)訪問。
重啟servlet容器,如Tomcat

登錄

安裝Mysql之后你可以登錄并且改變密碼,添加額外的用戶。默認(rèn)賬號密碼都是guacadmin,可以在web界面修改。

訪問

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

參考連接

RDP的連接這里要用NLA模式,對應(yīng)RDP服務(wù)端也要修改為NLA

參考文檔

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

總結(jié)

以上是生活随笔為你收集整理的guacamole1.3.0安装向导(部分官方人工翻译)centos7的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。