{"id":307,"date":"2020-03-26T18:57:25","date_gmt":"2020-03-26T17:57:25","guid":{"rendered":"http:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/?p=307"},"modified":"2020-12-15T12:35:19","modified_gmt":"2020-12-15T11:35:19","slug":"installer-guacamole-avec-ssl-et-authentification-mysql-sou-ubuntu","status":"publish","type":"post","link":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/2020\/03\/26\/installer-guacamole-avec-ssl-et-authentification-mysql-sou-ubuntu\/","title":{"rendered":"Installation de Guacamole avec SSL et Auth Mysql sous ubuntu"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Guacamole est une passerelle de bureau \u00e0 distance sans client. Elle supporte les protocoles standards comme VNC, RDP et SSH. Une fois Guacamole install\u00e9 sur un serveur, tout ce dont vous avez besoin pour acc\u00e9der \u00e0 vos bureaux est un navigateur web.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">D\u00e9pendances<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install -y  gcc-6 g++-6 libcairo2-dev libjpeg-turbo8-dev libpng-dev libossp-uuid-dev libavcodec-dev libavutil-dev libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libvncserver-dev libssl-dev libvorbis-dev libwebp-dev libtelnet-dev libmysql-java freerdp2-dev libpulse-dev libtool-bin libwebsockets-dev\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Installation de Tomcat<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install tomcat8 tomcat8-admin tomcat8-common tomcat8-user -y<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow 8080\nufw reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Installation du serveur Guacamole<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\"T\u00e9l\u00e9charger guacamole-server-1.1.0.tar.gz (s\u2019ouvre dans un nouvel onglet)\" href=\"https:\/\/guacamole.apache.org\/releases\/1.1.0\/\" target=\"_blank\">T\u00e9l\u00e9charger guacamole-server-1.1.0.tar.gz<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar xzf guacamole-server-1.1.0.tar.gz \ncd guacamole-server-1.1.0\nautoreconf -fi<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure --with-init-dir=\/etc\/init.d\n\n      Library status:\n\n     freerdp2 ............ yes\n     pango ............... yes\n     libavcodec .......... yes\n     libavutil ........... yes\n     libssh2 ............. yes\n     libssl .............. yes\n     libswscale .......... yes\n     libtelnet ........... yes\n     libVNCServer ........ yes\n     libvorbis ........... yes\n     libpulse ............ yes\n     libwebsockets ....... yes\n     libwebp ............. yes\n     wsock32 ............. no\n\n   Protocol support:\n\n      Kubernetes .... yes\n      RDP ........... yes\n      SSH ........... yes\n      Telnet ........ yes\n      VNC ........... yes\n\n   Services \/ tools:\n\n      guacd ...... yes\n      guacenc .... yes\n      guaclog .... yes\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>make \nmake install\nldconfig\nsystemctl enable guacd \nsystemctl start guacd<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Installation du client Guacamole sur le serveur<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/guacamole.apache.org\/releases\/1.1.0\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"T\u00e9l\u00e9charger guacamole-1.1.0.war (s\u2019ouvre dans un nouvel onglet)\">T\u00e9l\u00e9charger guacamole-1.1.0.war<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/etc\/guacamole\nmv guacamole-1.1.0.war  \/etc\/guacamole\/guacamole.war\nln -s \/etc\/guacamole\/guacamole.war \/var\/lib\/tomcat8\/webapps\/\nsystemctl restart tomcat8 \nsystemctl restart guacd<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration de la connexion s\u00e9curis\u00e9e<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">R\u00e9cup\u00e9ration du certificat SSL<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get update\napt-get install software-properties-common\nadd-apt-repository universe\nadd-apt-repository ppa:certbot\/certbot\napt-get update\napt-get install certbot python-certbot-apache\nsudo certbot certonly --apache\ncertbot renew --dry-run<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"reverse-proxy-apache\">Cr\u00e9ation du reverse proxy Apache<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install apache2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/apache2\/sites-available\/guacamole.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> \n<VirtualHost *:80>\n     <VirtualHost *:80>\n     ServerName votre-serveur.fr\n     RewriteEngine On\n     RewriteCond %{HTTPS} !=on\n     RewriteRule ^\/?(.*) https:\/\/%{SERVER_NAME}\/$1 [R,L]\n <\/VirtualHost>\n \n <IfModule mod_ssl.c>\n <VirtualHost _default_:443>\n\n     SSLEngine on\n     SSLCertificateFile chemin vers la clef fullchain.pem\n     SSLCertificateKeyFile chemin vers la clef privkey.pem\n\n     ProxyPreserveHost On\n     ProxyRequests On\n     ProxyPass \/ http:\/\/127.0.0.1:8080\/\n     ProxyPassReverse \/ http:\/\/127.0.0.1:8080\n\n <\/VirtualHost>\n <\/IfModule> <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Installation de l&rsquo;authentification mysql<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/etc\/guacamole\/extensions\nmkdir \/etc\/guacamole\/lib\nln -s \/usr\/share\/java\/mysql-connector-java.jar \/etc\/guacamole\/lib\/ <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\"T\u00e9l\u00e9charger l\u2019extension mysql guacamole-auth-jdbc-1.1.0.tar.gz (s\u2019ouvre dans un nouvel onglet)\" href=\"https:\/\/guacamole.apache.org\/releases\/1.1.0\/\" target=\"_blank\">T\u00e9l\u00e9charger l\u2019extension mysql guacamole-auth-jdbc-1.1.0.tar.gz<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar -xvf guacamole-auth-jdbc-1.1.0.tar.gz \ncp guacamole-auth-jdbc-1.1.0\/mysql\/guacamole-auth-jdbc-mysql-1.1.0.jar  \/etc\/guacamole\/extensions\/ <\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Cr\u00e9ation de la base de donn\u00e9e <\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install mysql-server\nmysql_secure_installation <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p\ncreate database guacamole_db;\ncreate user 'guacamole_user'@'localhost' identified by 'P@$$w0rd';\nGRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';\nflush privileges;\nquit <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>cat guacamole-auth-jdbc-1.1.0\/mysql\/schema\/*.sql | mysql -u root -pP@$$w0rd guacamole_db <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration de Guacamole<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"GUACAMOLE_HOME=\/etc\/guacamole\" >> \/etc\/default\/tomcat8<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Cr\u00e9ation du fichier de configuration<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/guacamole\/guacamole.properties<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>guacd-hostname: localhost \nguacd-port:    4822 \nauth-provider:   net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider\n \nmysql-hostname: localhost\nmysql-port: 3306\nmysql-database: guacamole_db\nmysql-username: guacamole_user\nmysql-password: P@$$w0rd <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ln -s \/etc\/guacamole \/usr\/share\/tomcat8\/.guacamole<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart tomcat8.service\nsystemctl restart guacd.service <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>L&rsquo;installation est termin\u00e9e.  Acc\u00e9dez \u00e0 votre nouvelle application depuis l&rsquo;adresse : https:\/\/votre-serveur.fr\/guacamole\/<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Les identifiants par d\u00e9faut sont : <strong>guacadmin:guacadmin<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cr\u00e9ation d&rsquo;utilisateurs et bureau distant<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">voir doc : <a href=\"https:\/\/guacamole.apache.org\/doc\/gug\/administration.html\">https:\/\/guacamole.apache.org\/doc\/gug\/administration.html<\/a> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">R\u00e9f\u00e9rences<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>proxy : <a href=\"https:\/\/blog.adminrezo.fr\/2018\/01\/guacamole-un-proxy-web-dacces-distants\/\">https:\/\/blog.adminrezo.fr\/2018\/01\/guacamole-un-proxy-web-dacces-distants\/<\/a><\/li><li>mysql : <a href=\"https:\/\/www.tutos.snatch-crash.fr\/guacamole-passerelle-rdp-ssh-vnc-telnet\/\">https:\/\/www.tutos.snatch-crash.fr\/guacamole-passerelle-rdp-ssh-vnc-telnet\/<\/a><\/li><li>installation : <a href=\"https:\/\/kifarunix.com\/how-to-setup-guacamole-web-based-remote-desktop-access-tool-on-ubuntu-18-04\/\">https:\/\/kifarunix.com\/how-to-setup-guacamole-web-based-remote-desktop-access-tool-on-ubuntu-18-04\/<\/a><\/li><li>officiel : <a href=\"https:\/\/guacamole.apache.org\/doc\/gug\/\">https:\/\/guacamole.apache.org\/doc\/gug\/<\/a><\/li><li>certificat ssl : <a href=\"https:\/\/certbot.eff.org\/lets-encrypt\/ubuntubionic-apache\">https:\/\/certbot.eff.org\/lets-encrypt\/ubuntubionic-apache<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Guacamole est une passerelle de bureau \u00e0 distance sans client. Elle supporte les protocoles standards comme VNC, RDP et SSH. Une fois Guacamole install\u00e9 sur un serveur, tout ce dont vous avez besoin pour acc\u00e9der \u00e0 vos bureaux est un navigateur web. D\u00e9pendances Installation de Tomcat Installation du serveur Guacamole T\u00e9l\u00e9charger guacamole-server-1.1.0.tar.gz Installation du client &hellip; <a href=\"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/2020\/03\/26\/installer-guacamole-avec-ssl-et-authentification-mysql-sou-ubuntu\/\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Installation de Guacamole avec SSL et Auth Mysql sous ubuntu<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-307","post","type-post","status-publish","format-standard","hentry","category-sys"],"_links":{"self":[{"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/posts\/307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/comments?post=307"}],"version-history":[{"count":30,"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/posts\/307\/revisions"}],"predecessor-version":[{"id":342,"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/posts\/307\/revisions\/342"}],"wp:attachment":[{"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/media?parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/categories?post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lmgc.univ-montp2.fr\/perso\/norbert-deleutre\/wp-json\/wp\/v2\/tags?post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}