I will show you How to create a clientless remote desktop gateway server-free and easy way.
#Install Guacamole Server in ubuntu
Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH.
Install Guacamole Server
Step 1: Server Preparation
Log in to the Compute Instance over SSH or Lish.Install all required dependencies. For Debian users, replace libjpeg-turbo8-dev with libjpeg62-turbo-dev.
sudo apt update
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
Download the Guacamole source code
wget https://downloads.apache.org/guacamole/1.3.0/source/guacamole-server-1.3.0.tar.gz
Extract the file and navigate to its directory.
tar -xvf guacamole-server-1.3.0.tar.gz
cd guacamole-server-1.3.0
Build the Guacamole Server using the downloaded source files.
sudo ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots
sudo make
sudo make install
Update installed library cache and reload system
sudo ldconfig
sudo systemctl daemon-reload
Start guacd
sudo systemctl start guacd
sudo systemctl enable guacd
Create a directory to store Guacamole configuration files and extensions. These directories are used in later steps.
sudo mkdir -p /etc/guacamole/{extensions,lib}
Step 2: Install Apache Tomcat
Install Apache Tomcat
Download the Guacamole Client
Move the client to the Tomcat web directory.
Restart both Apache Tomcat and Guacd.
Step 3: Setting up Database Authentication
While Apache Guacamole does support basic user authentication via a user-mapping.xml file, it should only be used for testing. For this guide, we will use production-ready database authentication through MySQL/MariaDB.
Install either MySQL or MariaDB on your system.
Run the following command to perform the initial security configuration:
Before populating the database, install the MySQL Connector/J library and Guacamole JDBC authenticator plugin.
Extract the tar file and copy it to /etc/guacamole/extensions/.
Log in to mysql as the root user.
The prompt should change again to mysql>.
While in the MySQL prompt, change the root password, create a database, and create a new user for that database. When running the below commands, replace any instance of password with a secure password string for the MySQL root user and the new user for your database, respectively.
Exit the MySQL prompt by typing quit.
Locate the scheme files in the extracted directory for the JDBC plugin.
Import those SQL schema files into the MySQL database.
Create the properties file for Guacamole.
Paste in the following configuration settings, replacing [password] with the password of the new guacamole_user that you created for the database.
Restart all related services.
You’ll also want to set the guacamole home directory environment variable in /etc/default/tomcat9 configuration file.
After that, create a user-mapping.xml file. This file will contain settings to access the web portal.
You’ll need a password hash for the user-mapping configuration. To generate a password, use the commands below.
echo -n type_your_password | openssl md5
Replace type_your_password with your real password. That should out a password hash. Copy the hash value to use in the config below.
(stdin)= 36879e235d55b4d4e23789a4798ee37a8d
Next, run the commands below to create a new user-mapping.xml
sudo nano /etc/guacamole/user-mapping.xml
Then copy and paste the content below into the file and save.
Save and exit.
Next, restart Tomcat and Guacamole services to apply the changes.
sudo systemctl restart tomcat9
0 মন্তব্যসমূহ