Proxmox Virtual Environment (VE) 7.1-8 – installing Apache Guacamole v1.4.0 natively on Debian 11 (Bullseye) Server

root@pve-iot-jsho-guacamole-01:~# apt-get install -y build-essential libcairo2-dev libjpeg62-turbo-dev libtool-bin uuid-dev libossp-uuid-dev 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
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
build-essential is already the newest version (12.9).
libcairo2-dev is already the newest version (1.16.0-5).
libavcodec-dev is already the newest version (7:4.3.3-0+deb11u1).
libavformat-dev is already the newest version (7:4.3.3-0+deb11u1).
libavutil-dev is already the newest version (7:4.3.3-0+deb11u1).
libswscale-dev is already the newest version (7:4.3.3-0+deb11u1).
freerdp2-dev is already the newest version (2.3.0+dfsg1-2).
libjpeg62-turbo-dev is already the newest version (1:2.0.6-4).
libssh2-1-dev is already the newest version (1.9.0-2).
libtelnet-dev is already the newest version (0.21-5+b1).
libtool-bin is already the newest version (2.4.6-15).
libvncserver-dev is already the newest version (0.9.13+dfsg-2).
libvorbis-dev is already the newest version (1.3.7-1).
libwebp-dev is already the newest version (0.6.1-2.1).
libwebsockets-dev is already the newest version (4.0.20-2).
libssl-dev is already the newest version (1.1.1k-1+deb11u1).
libossp-uuid-dev is already the newest version (1.6.2-1.5+b9).
libpango1.0-dev is already the newest version (1.46.2-3).
libpulse-dev is already the newest version (14.2-2).
uuid-dev is already the newest version (2.36.1-8).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# apt-get install git
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
git is already the newest version (1:2.30.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# git clone git://github.com/apache/guacamole-server.git
Cloning into ‚guacamole-server’…
remote: Enumerating objects: 24296, done.
remote: Counting objects: 100% (2405/2405), done.
remote: Compressing objects: 100% (214/214), done.
remote: Total 24296 (delta 2292), reused 2194 (delta 2191), pack-reused 21891
Receiving objects: 100% (24296/24296), 7.41 MiB | 3.94 MiB/s, done.
Resolving deltas: 100% (16091/16091), done.
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# cd guacamole-server
root@pve-iot-jsho-guacamole-01:~/guacamole-server# autoreconf -fi
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, ‚build-aux‘.
libtoolize: copying file ‚build-aux/ltmain.sh‘
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, ‚m4‘.
libtoolize: copying file ‚m4/libtool.m4‘
libtoolize: copying file ‚m4/ltoptions.m4‘
libtoolize: copying file ‚m4/ltsugar.m4‘
libtoolize: copying file ‚m4/ltversion.m4‘
libtoolize: copying file ‚m4/lt~obsolete.m4‘
configure.ac:27: installing ‚build-aux/compile‘
configure.ac:27: installing ‚build-aux/config.guess‘
configure.ac:27: installing ‚build-aux/config.sub‘
configure.ac:23: installing ‚build-aux/install-sh‘
configure.ac:23: installing ‚build-aux/missing‘
configure.ac:33: installing ‚build-aux/tap-driver.sh‘
src/common-ssh/Makefile.am: installing ‚build-aux/depcomp‘
parallel-tests: installing ‚build-aux/test-driver‘
root@pve-iot-jsho-guacamole-01:~/guacamole-server#
root@pve-iot-jsho-guacamole-01:~/guacamole-server# ./configure –with-init-dir=/etc/init.d

————————————————
guacamole-server version 1.4.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
Type „make“ to compile guacamole-server.
root@pve-iot-jsho-guacamole-01:~/guacamole-server#
root@pve-iot-jsho-guacamole-01:~/guacamole-server# make
root@pve-iot-jsho-guacamole-01:~/guacamole-server# make install
root@pve-iot-jsho-guacamole-01:~/guacamole-server# ldconfig
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# systemctl daemon-reload
root@pve-iot-jsho-guacamole-01:~# systemctl enable –now guacd
guacd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable guacd
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# systemctl start guacd
root@pve-iot-jsho-guacamole-01:~# systemctl status guacd
* guacd.service – LSB: Guacamole proxy daemon
Loaded: loaded (/etc/init.d/guacd; generated)
Active: active (running) since Mon 2022-01-17 12:03:29 UTC; 6s ago
Docs: man:systemd-sysv-generator(8)
Process: 25121 ExecStart=/etc/init.d/guacd start (code=exited, status=0/SUCCESS)
Tasks: 1 (limit: 17845)
Memory: 9.9M
CPU: 18ms
CGroup: /system.slice/guacd.service
`-25124 /usr/local/sbin/guacd -p /var/run/guacd.pid
Jan 17 12:03:29 pve-iot-jsho-guacamole-01 systemd[1]: Starting LSB: Guacamole proxy daemon…
Jan 17 12:03:29 pve-iot-jsho-guacamole-01 guacd[25122]: Guacamole proxy daemon (guacd) version 1.4.0 started
Jan 17 12:03:29 pve-iot-jsho-guacamole-01 guacd[25121]: Starting guacd:
Jan 17 12:03:29 pve-iot-jsho-guacamole-01 guacd[25122]: guacd[25122]: INFO: Guacamole proxy daemon (guacd) version 1.4.0 started
Jan 17 12:03:29 pve-iot-jsho-guacamole-01 guacd[25121]: SUCCESS
Jan 17 12:03:29 pve-iot-jsho-guacamole-01 systemd[1]: Started LSB: Guacamole proxy daemon.
Jan 17 12:03:29 pve-iot-jsho-guacamole-01 guacd[25124]: Listening on host ::1, port 4822
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# apt-get install -y tomcat9 tomcat9-admin tomcat9-common tomcat9-user
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
tomcat9 is already the newest version (9.0.43-2~deb11u3).
tomcat9-admin is already the newest version (9.0.43-2~deb11u3).
tomcat9-common is already the newest version (9.0.43-2~deb11u3).
tomcat9-user is already the newest version (9.0.43-2~deb11u3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# systemctl status tomcat9.service
* tomcat9.service – Apache Tomcat 9 Web Application Server
Loaded: loaded (/lib/systemd/system/tomcat9.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-01-17 12:05:51 UTC; 2min 28s ago
Docs: https://tomcat.apache.org/tomcat-9.0-doc/index.html
Process: 26829 ExecStartPre=/usr/libexec/tomcat9/tomcat-update-policy.sh (code=exited, status=0/SUCCESS)
Main PID: 26833 (java)
Tasks: 35 (limit: 17845)
Memory: 290.2M
CPU: 9.822s
CGroup: /system.slice/tomcat9.service
`-26833 /usr/lib/jvm/default-java/bin/java -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties -Djava.util.logging.>
Jan 17 12:05:55 pve-iot-jsho-guacamole-01 tomcat9[26833]: Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml] has >
Jan 17 12:05:55 pve-iot-jsho-guacamole-01 tomcat9[26833]: Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml]
Jan 17 12:05:55 pve-iot-jsho-guacamole-01 tomcat9[26833]: The path attribute with value [/manager] in deployment descriptor [/etc/tomcat9/Catalina/lo>
Jan 17 12:05:56 pve-iot-jsho-guacamole-01 tomcat9[26833]: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this >
Jan 17 12:05:56 pve-iot-jsho-guacamole-01 tomcat9[26833]: Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has finis>
Jan 17 12:05:56 pve-iot-jsho-guacamole-01 tomcat9[26833]: Deploying web application directory [/var/lib/tomcat9/webapps/ROOT]
Jan 17 12:05:56 pve-iot-jsho-guacamole-01 tomcat9[26833]: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this >
Jan 17 12:05:56 pve-iot-jsho-guacamole-01 tomcat9[26833]: Deployment of web application directory [/var/lib/tomcat9/webapps/ROOT] has finished in [76>
Jan 17 12:05:56 pve-iot-jsho-guacamole-01 tomcat9[26833]: Starting ProtocolHandler [„http-nio-8080“]
Jan 17 12:05:56 pve-iot-jsho-guacamole-01 tomcat9[26833]: Server startup in [3469] milliseconds
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# ss -altnp | grep 80
LISTEN 0 100 *:8080 *:* users:((„java“,pid=26833,fd=37))
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# mkdir /etc/guacamole
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# wget https://downloads.apache.org/guacamole/1.4.0/binary/guacamole-1.4.0.war -O /etc/guacamole/guacamole.war
–2022-01-17 12:13:39– https://downloads.apache.org/guacamole/1.4.0/binary/guacamole-1.4.0.war
Resolving downloads.apache.org (downloads.apache.org)… 88.99.95.219, 135.181.214.104, 2a01:4f9:3a:2c57::2, …
Connecting to downloads.apache.org (downloads.apache.org)|88.99.95.219|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 13011205 (12M)
Saving to: ‚/etc/guacamole/guacamole.war‘
/etc/guacamole/guacamole.war 100%[=====================>] 12.41M 10.3MB/s in 1.2s
2022-01-17 12:13:41 (10.3 MB/s) – ‚/etc/guacamole/guacamole.war‘ saved [13011205/13011205]
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# ln -s /etc/guacamole/guacamole.war /var/lib/tomcat9/webapps
root@pve-iot-jsho-guacamole-01:~# systemctl restart tomcat9 guacd
root@pve-iot-jsho-guacamole-01:~# mkdir /etc/guacamole/{extensions,lib}
root@pve-iot-jsho-guacamole-01:~# echo „GUACAMOLE_HOME=/etc/guacamole“ >> /etc/default/tomcat9
root@pve-iot-jsho-guacamole-01:~# vi /etc/guacamole/guard.conf
[server]
bind_host = 0.0.0.0

bind_port = 4822
root@pve-iot-jsho-guacamole-01:~# cat > /etc/guacamole/guacamole.properties << EOL
guacd-hostname: localhost
guacd-port: 4822
user-mapping: /etc/guacamole/user-mapping.xml
auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider
EOL
root@pve-iot-jsho-guacamole-01:~# ln -s /etc/guacamole /usr/share/tomcat9/.guacamole
root@pve-iot-jsho-guacamole-01:~# echo -n password | openssl md5
(stdin)= 5f4dcc3b5aa765d61d8327deb882cf99
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# apt-get install vim
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
vim is already the newest version (2:8.2.2434-3+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@pve-iot-jsho-guacamole-01:~#
root@pve-iot-jsho-guacamole-01:~# vim /etc/guacamole/user-mapping.xml
<user-mapping>
<authorize
username=“admin“
password=“5f4dcc3b5aa765d61d8327deb882cf99″ encoding=“md5″>
<connection name=“bpi-iot-jsho-minio-01″>
<protocol>ssh</protocol>
<param name=“hostname“>192.168.1.168</param>
<param name=“port“>22</param>
</connection>
</authorize>
</user-mapping>

root@pve-iot-jsho-guacamole-01:~# vim /etc/guacamole/user-mapping.xml
<user-mapping>
<authorize username=“admin“
password=“5f4dcc3b5aa765d61d8327deb882cf99″ encoding=“md5″>
<connection name=“bpi-iot-jsho-minio-01″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.168</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-02″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.147</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-03″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.192</param>
<param name=“port“>22</param>
</connection>
</authorize>
</user-mapping>

root@pve-iot-jsho-guacamole-01:~# vim /etc/guacamole/user-mapping.xml
<user-mapping>
<authorize username=“admin“
password=“5f4dcc3b5aa765d61d8327deb882cf99″ encoding=“md5″>
<connection name=“bpi-iot-jsho-minio-01″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.168</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-02″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.147</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-03″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.192</param>
<param name=“port“>22</param>
</connection>
<connection name=“W2k22STD-01″>
<protocol>rdp</protocol> <param name=“hostname“>192.168.1.112</param>
<param name=“port“>3389</param>
<param name=“security“>NLA</param>
<param name=“ignore-cert“>true</param>
<!– <param name=“username“>…</param> –>
<!– <param name=“password“>…</param> –>
<!– <param name=“color-depth“>…</param> –>
</connection>
</authorize>
</user-mapping>

root@pve-iot-jsho-guacamole-01:~# vim /etc/guacamole/user-mapping.xml

<connection name=“VA-DC-101″>

<protocol>rdp</protocol> <param name=“hostname“>192.168.1.189</param>
<param name=“port“>27101</param>
<param name=“security“>NLA</param>
<param name=“ignore-cert“>true</param>
</connection>

root@pve-iot-jsho-guacamole-01:~# vim /etc/guacamole/user-mapping.xml
<user-mapping>
<authorize username=“admin“
password=“5f4dcc3b5aa765d61d8327deb882cf99″ encoding=“md5″>
<connection name=“bpi-iot-jsho-minio-01″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.168</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-02″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.147</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-03″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.192</param>
<param name=“port“>22</param>
</connection>
<connection name=“W2k22STD-01″>
<protocol>rdp</protocol> <param name=“hostname“>192.168.1.112</param>
<param name=“port“>3389</param>
<param name=“security“>NLA</param>
<param name=“ignore-cert“>true</param>
<!– <param name=“username“>…</param> –>
<!– <param name=“password“>…</param> –>
<!– <param name=“color-depth“>…</param> –>
</connection>
<connection name=“VA-DC-101″>
<protocol>rdp</protocol> <param name=“hostname“>192.168.1.189</param>
<param name=“port“>27101</param>
<param name=“security“>NLA</param>
<param name=“ignore-cert“>true</param>
</connection>
</authorize>
<authorize username=“admin2″
password=“5f4dcc3b5aa765d61d8327deb882cf99″ encoding=“md5″>
<connection name=“bpi-iot-jsho-minio-01″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.168</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-02″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.147</param>
<param name=“port“>22</param>
</connection>
<connection name=“bpi-iot-jsho-minio-03″>
<protocol>ssh</protocol> <param name=“hostname“>192.168.1.192</param>
<param name=“port“>22</param>
</connection>
</authorize>

</user-mapping>

Leave a Reply

You must be logged in to post a comment.