Difference between revisions of "Apache Guacamole"

From Khem Geek Wiki
Jump to navigation Jump to search
Line 77: Line 77:
'''Set Up MySQL Connector'''
'''Set Up MySQL Connector'''


<code>wget </nowiki>https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-auth-jdbc-1.4.0.tar.gz<nowiki></code>
<code>wget </nowiki>https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-auth-jdbc-1.4.0.tar.gz</code>
 
<code>tar -xf guacamole-auth-jdbc-1.4.0.tar.gz</code>
<code>tar -xf guacamole-auth-jdbc-1.4.0.tar.gz</code>


Line 83: Line 84:


<code>cat schema/*.sql | mysql -u root -p guacamole_db</code>
<code>cat schema/*.sql | mysql -u root -p guacamole_db</code>
'''Connect Guac to MySQL'''
'''Connect Guac to MySQL'''


Line 94: Line 96:


<code>exit</code>
<code>exit</code>
<code>cd guacamole-auth-jdbc-1.4.0/mysql/</code>
<code>cp guacamole-auth-jdbc-mysql-1.4.0.jar /etc/guacamole/extensions/guacamole-auth-jdbc-mysql.jar</code>
<code>wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java_8.0.28-1ubuntu20.04_all.deb</code>
<code>dpkg -i mysql-connector-java_8.0.28-1ubuntu20.04_all.deb</code>
<code>cp /usr/share/java/mysql-connector-java-8.0.28.jar /etc/guacamole/lib/mysql-connector.jar</code>
'''Edit Guac config to work with MySQL'''
Edit guacamole.properties
<code>nano /etc/guacamole/guacamole.properties</code>
Add the following:
<code>mysql-hostname: localhost<br />
mysql-port: 3306<br />
mysql-database: guacamole_db<br />
mysql-username: guacamole_user<br />
mysql-password: StrongPassword</code>
Edit guacd.conf:
<code>nano /etc/guacamole/guacd.conf</code>
Add the following:
<code>[server]<br />
bind_host = 0.0.0.0<br />
bind_port = 4822</code>
'''Restart Services'''
<code>sudo systemctl restart tomcat9 guacd</code>
'''Get Guacamole client'''
<code>wget https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-1.4.0.war<br />
mv guacamole-1.4.0.war guacamole.war<br />
cp guacamole.war /var/lib/tomcat9/webapps<br />
ls /var/lib/tomcat9/webapps</code>
'''Edit tomcat server Config'''
<code>nano /etc/tomcat9/server.xml</code>
Add the following:
<Valve className="org.apache.catalina.valves.RemoteIpValve"
            internalProxies="127.0.0.1"
            remoteIpHeader="x-forwarded-for"
            remoteIpProxiesHeader="x-forwarded-by"
            protocolHeader="x-forwarded-proto" />
== 2nd section title ==
== 2nd section title ==
text
text

Revision as of 18:08, 18 August 2022

Apache Guacamole is a self hosted web application for Remote Desktop services. Guacamole allows remote desktop services to be accessed over HTTP.

The main page for Apache Guacamole can be accessed here:

https://guacamole.apache.org/

Installation

This guide is best suited for a Guacamole installation on Ubuntu Server 20.04 LTS

Run as Root

sudo su

Update System

apt update && apt upgrade

Install MariaDB

apt install mariadb-server

Install Dependencies

apt install -y build-essential libcairo2-dev libjpeg62-turbo-dev libpng-dev libtool-bin libossp-uuid-dev libavutil-dev libswscale-dev freerdp2-dev libpango1.0-dev libssh2-1-dev libvncserver-dev libtelnet-dev libwebsockets-dev libssl-dev libvorbis-dev libwebp-dev libpulse-dev sudo vim

Install tomcat9

<code?sudo apt install tomcat9 -y

Enable tomcat

sudo systemctl enable --now tomcat9

sudo systemctl status tomcat9

Get Guacamole server code

wget https://dlcdn.apache.org/guacamole/1.4.0/source/guacamole-server-1.4.0.tar.gz

untar

tar -xzf guacamole-server-1.4.0.tar.gz

Install

cd guacamole-server-1.4.0/

./configure --with-systemd-dir=/etc/systemd/system/ --disable-dependency-tracking

make

make install

sudo ldconfig

sudo systemctl daemon-reload

sudo systemctl enable --now guacd

sudo systemctl status guacd

Edit Guac Config

echo GUACAMOLE_HOME=/etc/guacamole >> /etc/default/tomcat9

mkdir -p /etc/guacamole/{extensions,lib}

touch /etc/guacamole/{guacamole.properties,guacd.conf}

Set Up MariaDB

mysql -u root -p

CREATE DATABASE guacamole_db;

exit

Set Up MySQL Connector

wget </nowiki>https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-auth-jdbc-1.4.0.tar.gz

tar -xf guacamole-auth-jdbc-1.4.0.tar.gz

cd guacamole-auth-jdbc-1.4.0/mysql/

cat schema/*.sql | mysql -u root -p guacamole_db

Connect Guac to MySQL

mysql -u root -p

CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'StrongPassword';

GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';

FLUSH PRIVILEGES;

exit

cd guacamole-auth-jdbc-1.4.0/mysql/

cp guacamole-auth-jdbc-mysql-1.4.0.jar /etc/guacamole/extensions/guacamole-auth-jdbc-mysql.jar

wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java_8.0.28-1ubuntu20.04_all.deb

dpkg -i mysql-connector-java_8.0.28-1ubuntu20.04_all.deb

cp /usr/share/java/mysql-connector-java-8.0.28.jar /etc/guacamole/lib/mysql-connector.jar

Edit Guac config to work with MySQL

Edit guacamole.properties

nano /etc/guacamole/guacamole.properties

Add the following:

mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole_db
mysql-username: guacamole_user
mysql-password: StrongPassword

Edit guacd.conf:

nano /etc/guacamole/guacd.conf

Add the following:

[server]
bind_host = 0.0.0.0
bind_port = 4822

Restart Services

sudo systemctl restart tomcat9 guacd

Get Guacamole client

wget https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-1.4.0.war
mv guacamole-1.4.0.war guacamole.war
cp guacamole.war /var/lib/tomcat9/webapps
ls /var/lib/tomcat9/webapps


Edit tomcat server Config

nano /etc/tomcat9/server.xml

Add the following:

<Valve className="org.apache.catalina.valves.RemoteIpValve"

           internalProxies="127.0.0.1"
           remoteIpHeader="x-forwarded-for"
           remoteIpProxiesHeader="x-forwarded-by"
           protocolHeader="x-forwarded-proto" />

2nd section title

text

See also

  •  
  •  

References

<references />

Bibliography

External links

  •  
  •