{"id":2264,"date":"2019-02-23T15:52:37","date_gmt":"2019-02-23T12:52:37","guid":{"rendered":"http:\/\/kifarunix.com\/?p=2264"},"modified":"2019-03-02T10:59:41","modified_gmt":"2019-03-02T07:59:41","slug":"how-to-install-and-setup-guacamole-on-debian-9-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-and-setup-guacamole-on-debian-9-8\/","title":{"rendered":"How to Install and Setup Guacamole on Debian 9.8"},"content":{"rendered":"<p>Welcome to our tutorial on how to install and Setup Guacamole on Debian 9.8. We covered a similar setup on Ubuntu 18.04 in our previous article which you can check using the link below;<\/p>\n<ul>\n<li class=\"entry-title td-module-title\"><a title=\"How to Setup Guacamole Web-based Remote Desktop Access Tool on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-setup-guacamole-web-based-remote-desktop-access-tool-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Setup Guacamole Web-based Remote Desktop Access Tool on Ubuntu 18.04<\/a><\/li>\n<li><a href=\"https:\/\/kifarunix.com\/how-to-install-and-configure-guacamole-on-fedora-29\/\" target=\"_blank\" rel=\"noopener\">How to Install and Configure Guacamole on Fedora 29<\/a><\/li>\n<\/ul>\n<p>You may as well would like to learn how to setup NoMachine on Ubuntu 18.04;<\/p>\n<ul>\n<li class=\"entry-title td-module-title\"><a title=\"How to Install and Use NoMachine Remote Desktop Tool on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-install-and-use-nomachine-remote-desktop-tool-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Use NoMachine Remote Desktop Tool on Ubuntu 18.04<\/a><\/li>\n<\/ul>\n<h2>How to Install and Setup Guacamole on Debian 9.8<\/h2>\n<h3>Prerequisites<\/h3>\n<p>As a pre-requisite to install and setup Guacamole on Debian 9.8, install the following required dependencies.<\/p>\n<pre>apt install -y  gcc-6 g++-6 libcairo2-dev libjpeg62-turbo-dev libpng-dev \\\r\nlibossp-uuid-dev libavcodec-dev libavutil-dev libswscale-dev libfreerdp-dev \\\r\nlibpango1.0-dev libssh2-1-dev libvncserver-dev libssl-dev libvorbis-dev libwebp-dev<\/code><\/pre>\n<h3>Install Tomcat application server<\/h3>\n<p>Once the installation of the dependencies above is done, proceed to install Tomcat servelet container for serving guacamole client contents to users connecting to the Guacamole server via web.<\/p>\n<pre>apt install tomcat8 tomcat8-admin tomcat8-common tomcat8-user<\/code><\/pre>\n<h3>Installing Guacamole server on Debian 9<\/h3>\n<p>As much as Guacamole server is available on the default Debian repositories, it may not be upto-date. Hence, building it from the source code is a sure bet to get the latest version installed. In that case, navigate to <a href=\"https:\/\/sourceforge.net\/projects\/guacamole\/files\/current\/source\/\" target=\"_blank\" rel=\"noopener\">Guacamole Source code download page<\/a> and grab the latest version.<\/p>\n<p>Once you obtain the download link, you can use wget to pull the source code to your server.<\/p>\n<pre>wget https:\/\/sourceforge.net\/projects\/guacamole\/files\/current\/source\/guacamole-server-0.9.14.tar.gz<\/code><\/pre>\n<p>Extract the tarball and proceed to install Guacamole Server on Debian 9.<\/p>\n<pre>tar xzf guacamole-server-0.9.14.tar.gz<\/code><\/pre>\n<p>Navigate to the Guacamole source code directory and initialize the installation process by running the configure script as shown below;<\/p>\n<pre>cd guacamole-server-0.9.14\/\r\n.\/configure --with-init-dir=\/etc\/init.d<\/code><\/pre>\n<p>This generates a Makefile that adapts Guacamole to the Debian system. After that, proceed to compile Guacamole by running the <code>make<\/code> command as shown below;<\/p>\n<pre>make<\/code><\/pre>\n<p>Once the compilation is done, you can install Guacamole server by running the <code>make install<\/code> command.<\/p>\n<pre>make install<\/code><\/pre>\n<p>Run <code>ldconfig<\/code> command to create the necessary links and cache to the shared\u00a0Guacamole libraries.<\/p>\n<p>Start and enable Guacamole server to run on system boot.<\/p>\n<pre>systemctl enable guacd\r\nsystemctl start guacd<\/code><\/pre>\n<h3>Install Guacamole Client<\/h3>\n<p>Guacamole client <span class=\"st\">is an HTML5 web application that provides a client to be served by the Tomcat servelet container. Guacamole client is available as binary and can be downloaded from the <a href=\"https:\/\/sourceforge.net\/projects\/guacamole\/files\/current\/source\/\" target=\"_blank\" rel=\"noopener\">Guacamole source page<\/a>. The Guacamole client should be placed under the Guacamole configuration directory, <code>\/etc\/guacamole<\/code>, which is not available by default and hence can be created as shown below;<br \/>\n<\/span><\/p>\n<pre>mkdir \/etc\/guacamole\r\nwget https:\/\/sourceforge.net\/projects\/guacamole\/files\/current\/binary\/guacamole-0.9.14.war -O \/etc\/guacamole\/guacamole.war<\/code><\/pre>\n<p>Next, create a symbolic link of the guacamole client to Tomcat webapps libraries.<\/p>\n<pre>ln -s \/etc\/guacamole\/guacamole.war \/var\/lib\/tomcat8\/webapps\/<\/code><\/pre>\n<p>Once that is done, restart Tomcat to deploy the Guacamole client web application. Restart Guacamole daemon after that.<\/p>\n<pre>systemctl restart tomcat8\r\nsystemctl restart guacd<\/code><\/pre>\n<h3>Configuring Guacamole<\/h3>\n<p>The major configuration files for Guacamole server resides under <span class=\"st\"><code>\/etc\/guacamole<\/code>. You therefore need to create the extensions and libraries configuration directories.<br \/>\n<\/span><\/p>\n<pre>mkdir \/etc\/guacamole\/{extensions,lib}<\/code><\/pre>\n<p>Guacamole references <span class=\"st\"><code>\/etc\/guacamole<\/code><\/span> as its home directory and hence, you need to create the environment variable for this under the tomcat configuration file.<\/p>\n<pre>echo \"GUACAMOLE_HOME=\/etc\/guacamole\" | sudo tee -a \/etc\/default\/tomcat8<\/code><\/pre>\n<p>Guacamole Web application used the <code class=\"filename\">guacamole.properties<\/code> as its main configuration file. Therefore, we are going to define the authentication providers for Guacamole in this file.<\/p>\n<p>In this guide, we are going to use MySQL database for authentications. Hence, install MariaDB server as shown below;<\/p>\n<pre>apt install mariadb-server -y<\/code><\/pre>\n<p>Run the initial MySQL security script to remove default test databases, anonymous users and set the root user password.<\/p>\n<pre>mysql_secure_installation<\/code><\/pre>\n<p>Next, login to the MySQL as root user and create Guacamole database and the database user for accessing and manipulating data. You can use whatever database and user names.<\/p>\n<pre>mysql -u root -p\r\ncreate database guacamole;\r\ngrant SELECT,INSERT,UPDATE,DELETE ON guacamole.* to guadmin@localhost identified by 'P@ssWord';\r\nflush privileges;\r\nquit<\/code><\/pre>\n<p class=\"line874\">Install the Java database (JDBC) driver for MySQL or MariaDB <span id=\"line-87\" class=\"anchor\"><\/span><span id=\"line-88\" class=\"anchor\"><\/span><\/p>\n<pre>apt install libmysql-java<\/code><\/pre>\n<p>Create a symlink\u00a0 of MySQL JDBC driver to Guacamole libraries.<\/p>\n<pre>ln -s \/usr\/share\/java\/mysql-connector-java.jar \/etc\/guacamole\/lib\/<\/code><\/pre>\n<p>Next, you need to download the Guacamole java driver authentication component from <a href=\"https:\/\/sourceforge.net\/projects\/guacamole\/files\/current\/extensions\/\" target=\"_blank\" rel=\"noopener\">Guacamole extensions page<\/a>.<\/p>\n<pre>wget https:\/\/sourceforge.net\/projects\/guacamole\/files\/current\/extensions\/guacamole-auth-jdbc-0.9.14.tar.gz<\/code><\/pre>\n<p>Extract the archive and copy MySQL authentication extension to the Guacamole extensions directory.<\/p>\n<pre>tar xzf guacamole-auth-jdbc-0.9.14.tar.gz\r\ncp guacamole-auth-jdbc-0.9.14\/mysql\/guacamole-auth-jdbc-mysql-0.9.14.jar \/etc\/guacamole\/extensions\/<\/code><\/pre>\n<p>Import the MySQL JDBC driver schemas to Guacamole database you created above.<\/p>\n<pre>cat guacamole-auth-jdbc-0.9.14\/mysql\/schema\/*.sql | mysql -u root -p guacamole<\/code><\/pre>\n<p>The database is now ready for authentication purposes. Next, edit <code class=\"filename\">guacamole.properties<\/code> and define the how clients will connect to Guacamole server.<\/p>\n<pre>vim \/etc\/guacamole\/guacamole.properties<\/code><\/pre>\n<pre># Hostname and Guacamole server port\r\nguacd-hostname: localhost\r\nguacd-port: 4822\r\n\r\n# MySQL Connection Details\r\nmysql-hostname: <strong>localhost<\/strong>\r\nmysql-port: <strong>3306<\/strong>\r\nmysql-database: <strong>guacamole<\/strong>\r\nmysql-username: <strong>guadmin<\/strong>\r\nmysql-password: <strong>P@ssWord<\/strong><\/code><\/pre>\n<p>Save the configuration file and create a symlink of the Guacamole configurations to Tomcat servlet .<\/p>\n<p><code>ln -s \/etc\/guacamole \/usr\/share\/tomcat8\/.guacamole<\/code><\/p>\n<p>Restart both Tomcat and guacd to effect the changes.<\/p>\n<pre>systemctl restart tomcat8\r\nsystemctl restart guacd<\/code><\/pre>\n<p>Next, login to Guacamole Web interface by navigating to <code>http:\/\/server-IP:8080\/guacamole<\/code>. The default login credentials are: <code>guacadmin<\/code> for both password and username.<\/p>\n<p><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-UI-login.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2269 size-full\" title=\"Install and Setup Guacamole on Debian 9.8\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-UI-login.png\" alt=\"Install and Setup Guacamole on Debian 9.8\" width=\"1004\" height=\"729\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-UI-login.png 1004w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-UI-login-768x558.png 768w\" sizes=\"(max-width: 1004px) 100vw, 1004px\" \/><\/a><\/p>\n<p>If you need to reset the guacadmin user password, Navigate to user profile icon and click on the dropdown, Settings and Preferences.<\/p>\n<p><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2270\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-settings.png\" alt=\"Install and Setup Guacamole on Debian 9.8\" width=\"1914\" height=\"405\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-settings.png 1914w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/02\/guacamole-settings-768x163.png 768w\" sizes=\"(max-width: 1914px) 100vw, 1914px\" \/><\/a><\/p>\n<p>If you need to create other users, click on the <code>New User<\/code> button.<\/p>\n<p>To create a new connection, click on the <code>Connections<\/code> tab and set the connection details. There you go. That is all about how to Install and Setup Guacamole on Debian 9.8. We hope you enjoyed this.<\/p>\n<p>You can also learn about file transfer over Guacamole by following the link below;<\/p>\n<ul>\n<li class=\"entry-title td-module-title\"><a title=\"How to Enable RDP\/SSH File Transfer Over Guacamole\" href=\"https:\/\/kifarunix.com\/how-to-enable-rdp-ssh-file-transfer-over-guacamole\/\" target=\"_blank\" rel=\"bookmark noopener\">How to Enable RDP\/SSH File Transfer Over Guacamole<\/a><\/li>\n<\/ul>\n<p>To learn more about Guacamole, check their <a href=\"https:\/\/guacamole.apache.org\/doc\/gug\/\" target=\"_blank\" rel=\"noopener\">Documentation Manual<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our tutorial on how to install and Setup Guacamole on Debian 9.8. We covered a similar setup on Ubuntu 18.04 in our previous<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,214,334],"tags":[287,215,216,71,335],"class_list":["post-2264","post","type-post","status-publish","format-standard","hentry","category-howtos","category-remote-desktop","category-tomcat","tag-debian-9","tag-guacamole","tag-rdp","tag-ssh","tag-vnc","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2264"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=2264"}],"version-history":[{"count":5,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2264\/revisions"}],"predecessor-version":[{"id":2323,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2264\/revisions\/2323"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}