Install Guacamole 1.2.0 on CentOS 8 (and Tomcat)

This tutorial assumes, that you have installed Tomcat. If you don't have it installed, you can find the documentation here.

Features of this installation: All Guacamole features and codecs. Also MariaDB and LDAP support.

You should be able to run everything below this line in the console.

dnf -y install make cmake wget gcc zlib-devel

GUACAMOLE_VER="1.2.0"
MARIADB_VER="2.6.1"

# Let's download the first few Guacamole packages.
cd /tmp
wget -nv --content-disposition http://apache.org/dyn/closer.cgi?action=download\&filename=guacamole/${GUACAMOLE_VER}/binary/guacamole-${GUACAMOLE_VER}.war -O guacamole.war
wget -nv --content-disposition http://apache.org/dyn/closer.cgi?action=download\&filename=guacamole/${GUACAMOLE_VER}/binary/guacamole-auth-jdbc-${GUACAMOLE_VER}.tar.gz -O guacamole-auth-jdbc-${GUACAMOLE_VER}.tar.gz
wget -nv --content-disposition https://downloads.mariadb.com/Connectors/java/connector-java-${MARIADB_VER}/mariadb-java-client-${MARIADB_VER}.jar -O mariadb-java-client-${MARIADB_VER}.jar

 


# Get prerequisites

## Libtelnet
LIBTELNET_VER="0.23"
cd /usr/local/src
wget https://github.com/seanmiddleditch/libtelnet/releases/download/${LIBTELNET_VER}/libtelnet-${LIBTELNET_VER}.tar.gz
tar -xf libtelnet-${LIBTELNET_VER}.tar.gz
cd libtelnet-${LIBTELNET_VER}
./configure
make && make install

## Libssh2
dnf -y install make cmake gcc openssl-devel
LIBSSH2_VER="1.9.0"
cd /usr/local/src
wget https://github.com/libssh2/libssh2/releases/download/libssh2-${LIBSSH2_VER}/libssh2-${LIBSSH2_VER}.tar.gz
tar -xf libssh2-${LIBSSH2_VER}.tar.gz
cd libssh2-${LIBSSH2_VER}
./configure
make && make install

## libwebsockets
dnf -y install cmake
LIBWEBSOCKETS_VER=3.2.2
cd /usr/local/src
wget https://github.com/warmcat/libwebsockets/archive/v${LIBWEBSOCKETS_VER}.tar.gz -O libwebsockets-${LIBWEBSOCKETS_VER}.tar.gz
tar xf libwebsockets-${LIBWEBSOCKETS_VER}.tar.gz
cd libwebsockets-${LIBWEBSOCKETS_VER}
mkdir build && cd build
cmake ..
make && make install

dnf config-manager --set-enabled PowerTools
dnf -y install gcc cairo-devel libjpeg-turbo-devel libjpeg-devel libpng-devel libtool uuid-devel ffmpeg-devel freerdp-devel pango-devel libvncserver-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel libssh2-devel libwebsockets-devel libtheora opus lame-libs make


adduser guacd
cd /usr/local/src
wget -nv --content-disposition http://apache.org/dyn/closer.cgi?action=download\&filename=guacamole/${GUACAMOLE_VER}/source/guacamole-server-${GUACAMOLE_VER}.tar.gz -O guacamole-server-${GUACAMOLE_VER}.tar.gz
tar -xzf guacamole-server-${GUACAMOLE_VER}.tar.gz
cd guacamole-server-${GUACAMOLE_VER}
sed -i s/daemon/guacd/ src/guacd/systemd/guacd.service.in
./configure --with-systemd-dir=/etc/systemd/system/
make && make install
ldconfig

# Step 4: Install the client to Tomcat


mkdir -p /etc/guacamole/extensions/
mkdir -p /etc/guacamole/lib

ln -s /etc/guacamole/ /root/.guacamole
cd /tmp
tar -xzf guacamole-auth-jdbc-${GUACAMOLE_VER}.tar.gz
cd guacamole-auth-jdbc-${GUACAMOLE_VER}
mv mysql/guacamole-auth-jdbc-mysql*.jar /etc/guacamole/extensions/
# cat mysql/schema/*.sql | mysql -u root -p guacamole_db ### Uncomment for new install. Run on a computer with mysql.
rm -Rf guacamole-auth-jdbc-${GUACAMOLE_VER}*      # Cleanup

cd /tmp
mv mariadb-java-client-${MARIADB_VER}.jar /etc/guacamole/lib

mv /tmp/guacamole.war /opt/tomcat/webapps # update this location to your tomcat folder

cd /tmp
wget http://apache.org/dyn/closer.cgi?action=download\&filename=guacamole/${GUACAMOLE_VER}/binary/guacamole-auth-ldap-${GUACAMOLE_VER}.tar.gz -O guacamole-auth-ldap-${GUACAMOLE_VER}.tar.gz
tar xf guacamole-auth-ldap-${GUACAMOLE_VER}.tar.gz
mv guacamole-auth-ldap-${GUACAMOLE_VER}/guacamole-auth-ldap-${GUACAMOLE_VER}.jar /etc/guacamole/extensions
rm -Rf guacamole-auth-ldap-${GUACAMOLE_VER}*

firewall-cmd --permanent --add-port=4822/tcp
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --reload
systemctl enable guacd
systemctl daemon-reload
systemctl restart guacd