1. 程式人生 > 其它 >Guacamole Ubuntu20.04配置

Guacamole Ubuntu20.04配置

最近老大讓我調研一個雲桌面 需要搗鼓Guacamole

順便學習下Linux 開心

配置教程 —— 我還在摸索.... 可以一起探討

全程在root許可權下

下載server 和 client 的壓縮包

wget https://apache.org/dyn/closer.lua/guacamole/1.3.0/source/guacamole-client-1.3.0.tar.gz?action=download
wget https://apache.org/dyn/closer.lua/guacamole/1.3.0/source/guacamole-server-1.3.0.tar.gz?action=download

server端

解壓安裝包

tar -xzvf guacamole-server-1.3.0.tar.gz?action=download

更新庫

sudo apt-get update

下載gcc

sudo apt install build-essential

驗證

gcc --version

下載依賴包

sudo apt-get install libcairo2-dev libjpeg-turbo8-dev libpng-dev libtool-bin libossp-uuid-dev
sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev freerdp2-dev libpango1.0
-dev libssh2-1-dev libtelnet-dev libvncserver-dev libwebsockets-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev

找到了哪些庫以及應該構建哪些庫的列表

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

得到

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 FreeRDP plugins: /usr/lib/x86_64-linux-gnu/freerdp2 Init scripts: /etc/init.d Systemd units: no

編譯:make

make[2]: Leaving directory '/home/galesaur/Guacamole/guacamole-server-1.3.0/src/guaclog'
make[2]: Entering directory '/home/galesaur/Guacamole/guacamole-server-1.3.0'
make[2]: Leaving directory '/home/galesaur/Guacamole/guacamole-server-1.3.0'
make[1]: Leaving directory '/home/galesaur/Guacamole/guacamole-server-1.3.0'

安裝構建的元件:

make install(這裡曾經出錯了,猜測是使用者許可權的問題,換成root許可權下的話是沒有問題的)

更新已安裝庫的系統快取

ldconfig

Client

有兩種安裝方式...
1)原始碼編譯安裝 之前下載的應該是原始碼
2)下載官方提供的

wget https://apache.org/dyn/closer.lua/guacamole/1.3.0/binary/guacamole-1.3.0.war?action=download
下載JDK
sudo apt-get -y --force-yes install default-jre
sudo apt-get -y --force-yes install default-jdk

//參考來自:https://blog.csdn.net/cloudmq/article/details/80815919?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~aggregatepage~first_rank_ecpm_v1~rank_v31_ecpm-7-80815919.pc_agg_new_rank&utm_term=guacamole%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2&spm=1000.2123.3001.4430

下載配置maven

官網:https://maven.apache.org/download.cgi
下載 wget https://dlcdn.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz
解壓 tar -xzvf apache-maven-3.8.4-bin.tar.gz
cd ~ && vim .bashrc
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64 #注意版本
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
配置maven
vim /etc/profile

在最後新增
export MAVEN_HOME=/usr/local/soft/apache-maven-3.8.2
export PATH=$PATH:$MAVEN_HOME/bin
最後使得變數生效
source /etc/profile
驗證下 mvn -v
root@DESKTOP-EBHIKEH:/# mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /usr/local/soft/apache-maven-3.8.4
Java version: 11.0.13, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.10.60.1-microsoft-standard-wsl2", arch: "amd64", fam

參考來自:https://blog.csdn.net/qq_34412086/article/details/88038210

下載Tomcat

mkdir /usr/local/tomcat
下載:wget https://dlcdn.apache.org/tomcat/tomcat-10/v10.0.14/bin/apache-tomcat-10.0.14.tar.gz
解壓: tar -xzvf apache-tomcat-10.0.14.tar.gz
cd apache-tomcat-10.0.14/bin
vim startup.sh

加入這些:

#set java environment
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=${JAVA_HOME}/bin:$PATH

#tomcat
export TOMCAT=/usr/local/tomcat/apache-tomcat-10.0.14

執行命令:apache-tomcat-7.0.75/bin 用來進入bin檔案中。
執行命令:./startup.sh 啟動tomcat服務
執行命令:./shutdown.sh 停止tomcat服務

開啟tomcat服務
root@DESKTOP-EBHIKEH:/usr/local/tomcat/apache-tomcat-10.0.14/bin# sudo ./startup.sh

Using CATALINA_BASE: /usr/local/tomcat/apache-tomcat-10.0.14
Using CATALINA_HOME: /usr/local/tomcat/apache-tomcat-10.0.14
Using CATALINA_TMPDIR: /usr/local/tomcat/apache-tomcat-10.0.14/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/tomcat/apache-tomcat-10.0.14/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-10.0.14/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.

驗證:輸入curl 127.0.0.1:8080 輸出一堆程式碼 就是成功啦
如果沒有的話回輸出curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused

部署Guacamole