December 5, 2018

Install Apache Guacamole on CentOS 7.6

Here is how to install Apache Guacamole, a clientless remote desktop gateway, on CentOS 7.6. We'll install all the packages and configure Firewalld.


These instructions assume you have a working knowledge of Red Hat based Linux operating systems and the yum package manager.


Install Packages
Install the following packages from CentOS base:
wget
tomcat
cairo-devel
libjpeg-turbo-devel
libjpeg-devel
libpng-devel
uuid-devel
freerd-devel
pango-devel
libssh2-devel
libtelnet-devel
libvncserver-devel
pulseaudio-libs-devel
openssl-devel
libvorbis-devel
libwebp-devel
epel-release

We need the following packages from the epel repository we just installed.
guacd
libguac
libguac-client-ssh
libguac-client-rdp
libguac-client-telnet

We need another repository for the next package. Install the Nux Desktop repo and install the following package.
ffmpeg-devel

Setup
Download the latest Guacamole Client war file from your closest Apache mirror. As of this writing, 0.9.14 is the latest version.
~]# wget http://mirrors.ibiblio.org/apache/guacamole/0.9.14/binary/guacamole-0.9.14.war

 Copy or move the guacamole*.war file to tomcat's webapps directory and remove the version number.
~]# cp guacamole*.war /usr/share/tomcat/webapps/guacamole.war

Now let's create the configuration folder and create our default login.
~]# mkdir -p /etc/guacamole/{extensions,lib}
~]# touch /etc/guacamole/guacamole.properties
~]# touch /etc/guacamole/user-mapping.xml
~]# echo '<user-mapping>
<authorize username="guac" password="guac">
</authorize>
</user-mapping>' > /etc/guacamole/user-mapping.xml

Start the services
~]# systemctl enable guacd && systemctl start guacd
~]# systemctl enable tomcat && systemctl start tomcat

Open the firewall
~]# firewall-cmd --permanent --add-port=8080/tcp
~]# firewall-cmd --reload

Login
Open your browser to htp://your-server-ip:8080/guacamole/ and login using the credentials we set earlier.

For more information, see the Apache Guacamole Manual.