guacamole установка

Автор George, Нояб. 13, 2025, 12:03

« назад - далее »

George

1. Install Requirements for Guacamole on Ubuntu 24.04

First, run the system update with the command below:

Код: bash
sudo apt update

Then, you must install the following packages and dependencies for installing Apache Guacamole on Ubuntu 24.04:

Код: bash
sudo apt install build-essential libcairo2-dev libjpeg-turbo8-dev \
    libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev \
    freerdp2-dev libssh2-1-dev libtelnet-dev libwebsockets-dev \
    libpulse-dev libvorbis-dev libwebp-dev libssl-dev \
    libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \
    libavformat-dev -y

2. Download Apache Guacamole Source Code and Install It on Ubuntu 24.04

Now you must visit the Apache Guacamole Downloads page and look for the latest version. At the current time, the latest version of Guacamole is 1.5.5. So you can use the following Wget Command to download the source code of Guacamole on Ubuntu 24.04:

Код: bash
sudo wget https://downloads.apache.org/guacamole/1.5.5/source/guacamole-server-1.5.5.tar.gz

Downloading and Installing Apache Guacamole on Ubuntu 24.04Installing Apache Guacamole on Ubuntu 24.04 – Download Source Code

Then, extract your Guacamole package and navigate to it with the following commands:

Код: bash
sudo tar -xvf guacamole-server-1.5.5.tar.gz

Код: bash
sudo cd guacamole-server-1.5.5

Build and Install Apache Guacamole

At this point, you start building and installing Apache Guacamole on Ubuntu 24.04 with the following commands:

Код: bash
sudo ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots
Код: bash
sudo make
Код: bash
sudo make install

The installation process may take some time to complete. After that, you need to update the installed library cache with the following command:

Код: bash
sudo ldconfig

Enable and Start Guacamole Service

Now you must reload your systemd to apply the changes:

Код: bash
sudo systemctl daemon-reload

Next, use the following commands to enable and start the Guacamole service on Ubuntu 24.04:

Код: bash
sudo systemctl enable guacd
Код: bash
sudo systemctl start guacd

Then, verify your Guacamole service is active and running on Ubuntu 24.04:

Код: bash
sudo systemctl status guacd

Check Guacamole Service is active on Ubuntu 24.04Installing Apache Guacamole on Ubuntu 24.04 – Guacd Status

Important Note: You must create the Guacamole configuration files and extensions. These files will used in the later steps. To do this, you can run the command below:
Код: bash
sudo mkdir -p /etc/guacamole/{extensions,lib}

3. Download and Install Guacamole Frontend Interface on Ubuntu 24.04 (Guacamole Web App)

At this step, you must download and install the Apache Guacamole Web Application. For this purpose, you must install Tomcat. At the current time, Apache Guacamole is compatible with Tomcat 9. Because Tomcat 9 is not available in Ubuntu 24.04, we added the Ubuntu 22.04 repository and then install Tomcat 9 with the commands below:

Код: bash
sudo add-apt-repository -y -s "deb http://archive.ubuntu.com/ubuntu/ jammy main universe"

Код: bash
sudo apt install tomcat9 tomcat9-admin tomcat9-common tomcat9-user -y

Next, use the following command to download the Gucamole web app source code. Just remember that the version of the web app must be the same as the Guacamole version.

Код: bash
sudo wget https://downloads.apache.org/guacamole/1.5.5/binary/guacamole-1.5.5.war

Download and Install Guacamole Frontend Interface on Ubuntu 24.04

Then, you must move the Guacamole Web client to the Tomcat directory with the command below:

Код: bash
sudo mv guacamole-1.5.5.war /var/lib/tomcat9/webapps/guacamole.war

To apply the changes, restart Apache Guacamole and Tomcat services on Ubuntu 24.04:

Код: bash
sudo systemctl restart tomcat9 guacd

4. Set up Guacamole Database Authentication on Ubuntu 24.04

In this step of installing Apache Guacamole on Ubuntu 24.04, you must configure Guacamole database authentication. By default, Guacamole supports basic user authentication that is used for testing. However, we want to use a production-ready database authentication through MariaDB. To do this, follow the steps below:

First, install MariaDB with the following command:
Код: bash
sudo apt install mariadb-server -y

Then, run the MySQL security script to set a password for your MariaDB:
Код: bash
sudo mysql_secure_installation

Set Root password for MySQL Guacamole
Download MySQL Java Connector for Apache Guacamole

Next, you must download the MySQL Java Connector. At the current time, the latest MySQL Java connector is Connector/J 9.1.0. To download the package, run the command below:

Код: bash
sudo wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-9.1.0.tar.gz

Download MySQL Java Connector for Apache Guacamole

Now extract your downloaded file and copy it to the /etc/guacamole/lib/ directory with the following commands:

Код: bash
sudo tar -xf mysql-connector-j-9.1.0.tar.gz

Код: bash
sudo cp mysql-connector-j-9.1.0/mysql-connector-j-9.1.0.jar /etc/guacamole/lib/

Download Apache Guacamole JDBC AUTH Plugin

At this point, you must download the Apache Guacamole JDBC AUTH Plugin. Just remember that the version you will download same as the version of the Guacamole.

Код: bash
sudo wget https://downloads.apache.org/guacamole/1.5.5/binary/guacamole-auth-jdbc-1.5.5.tar.gz

Download Apache Guacamole JDBC AUTH Plugin

Then, extract your downloaded file and copy it to /etc/guacamole/extensions/ directory with the commands below:

Код: bash
sudo tar -xf guacamole-auth-jdbc-1.5.5.tar.gz

Код: bash
sudo mv guacamole-auth-jdbc-1.5.5/mysql/guacamole-auth-jdbc-mysql-1.5.5.jar /etc/guacamole/extensions/

Create Apache Guacamole Database and User

In this step of installing Apache Guacamole on Ubuntu 24.04, you must create a user and database. To do this, log in to your MariaDB shell:

Код: bash
sudo mysql -u root -p

Enter the password you have configured for it. From your MariaDB shell, run the following commands to create a database, user database, and grant the privileges to it:

 
Код: bash
CREATE DATABASE guac_db;
Код: bash
CREATE USER 'guac_user'@'localhost' IDENTIFIED BY 'password';
Код: bash
GRANT SELECT,INSERT,UPDATE,DELETE ON guac_db.* TO 'guac_user'@'localhost';
Код: bash
FLUSH PRIVILEGES;

When you are finished, exit from your MariaDB shell:

Код: bash
 EXIT;

Create Apache Guacamole Database and User
Import SQL Schema Files For Guacamole

At this point, you must navigate to the MySQL Schema directory with the command below:

Код: bash
cd guacamole-auth-jdbc-1.5.5/mysql/schema

From there, run the command below to import the SQL schema files to the MySQL database:

Код: bash
cat *.sql | mysql -u root -p guac_db

Enter your MariaDB root password to complete the process.
Create Properties Files For Apache Guacamole

Now use your desired text editor like Vi Editor or Nano Editor to create the properties files for Guacamole:

Код: bash
sudo vi /etc/guacamole/guacamole.properties

Add the following configuration settings to the file with your database credentials:

Код: bash
# MySQL properties
mysql-hostname: 127.0.0.1
mysql-port: 3306
mysql-database: guac_db
mysql-username: guac_user
mysql-password: password

Once you are done, save and close the file.
Create Properties Files For Apache Guacamole

Finally, restart the services to apply the changes:

Код: bash
sudo systemctl restart tomcat9 guacd mysql
5. Access Apache Guacamole Dashboard via Web Interface

Now that you are finished with installing Apache Guacamole on Ubuntu 24.04, you can access the Guacamole dashboard by following the URL below from your Web browser:

http://server-ip:8080/guacamole

You must see the Guacamole login screen. Enter the following credentials to log in:

username: guacadmin
password: guacadmin
  •  

🡱 🡳

Отметьте интересные вам фрагменты текста и они станут доступны по уникальной ссылке в адресной строке браузера.