Difference between revisions of "Install Guacamole - HTML5 RDP Gateway"

From Bitbull Wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
* guacamole is a great way to present windows apps and desktops to the internet.<br>
 
* guacamole is a great way to present windows apps and desktops to the internet.<br>
 
You have only one https port open to the internet and the application is working pretty nice and fast.
 
You have only one https port open to the internet and the application is working pretty nice and fast.
* http://guac-dev.org/
+
* https://guacamole.apache.org/
 +
* Tested with Rocky Linux 9
  
 
=install=
 
=install=
yum -y install epel-release
+
* do this steps as root user
 +
 
 +
==setup ansible==
 
  yum  makecache
 
  yum  makecache
 
  yum -y upgrade
 
  yum -y upgrade
 +
curl -L ansible.bitbull.ch | bash
  
yum install -y wget pv dialog gcc cairo-devel libpng-devel libjpeg-turbo-devel uuid-devel freerdp-devel freerdp-plugins pango-devel libssh2-devel libtelnet-devel libvncserver-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel tomcat gnu-free-mono-fonts mariadb mariadb-server
+
==prepare ansible role==
 
+
<pre>
yum -y install ghostscript
+
ansible-galaxy install joe-speedboat.guacamole
 +
ansible-galaxy install joe-speedboat.mariadb
 +
ansible-galaxy collection install ansible.posix
  
wget http://sourceforge.net/projects/guacamoleinstallscript/files/CentOS/guacamole-install-script.sh
+
vim /etc/ansible/playbooks/install_guacamole.yml
sed -i 's/GUACA_VER=.*/GUACA_VER="0.9.11-incubating"/g' guacamole-install-script.sh
+
----------
sed -i 's/|| exit 1//g' guacamole-install-script.sh #/usr/lib64/pkgconfig linking error
+
- hosts: localhost
chmod 700 guacamole-install-script.sh
+
  become: True
./guacamole-install-script.sh
+
  vars:
 
+
    mariadb_user_password: '.change-this_000.'
*Enter the root password for MariaDB: secret123
+
    mariadb_root_password: '.change-this_111.'
*Enter the Guacamole DB name: guacamole
+
  tasks:
*Enter the Guacamole DB username: guacamole
+
  - dnf:
*Enter the Guacamole DB password: secret123
+
      name: firewalld
*Enter the Java KeyStore password (least 6 characters): secret123
+
  - systemd:
*Do you wish to Install the Proxy feature (Nginx)?: yes
+
      name: firewalld
*Enter the Guacamole Server IP addres or hostame (default localhost): ras.bitbull.ch
+
      state: restarted
*Enter the URI path (default guacamole): ras
+
      enabled: True
 
+
  - firewalld:
service tomcat stop
+
      service: https
echo 'JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx512m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC"' >> /etc/tomcat/tomcat.conf
+
      permanent: true
 
+
      state: enabled
<pre>
+
  roles:
mkdir /var/lib/tomcat/webapps/ROOT
+
  - joe-speedboat.guacamole
echo '<HTML>
+
----------
<HEAD>
 
<TITLE>Automatic Redirection</TITLE>
 
<SCRIPT LANGUAGE="JavaScript"><!--
 
function redirect () { setTimeout("go_now()",1); }
 
function go_now ()  { window.location.href = "guacamole/"; }
 
//--></SCRIPT>
 
</HEAD>
 
<BODY onLoad="redirect()">
 
</BODY>
 
</HTML>' > /var/lib/tomcat/webapps/ROOT/index.html
 
</pre>
 
  
systemctl enable tomcat
+
==fire==
systemctl start tomcat
+
  ansible-playbook /etc/ansible/playbooks/install_guacamole.yml
systemctl enable guacd
 
  systemctl start guacd
 
  
firewall-cmd --permanent --zone=public --add-port=8443/tcp
 
firewall-cmd --reload
 
 
[[Category:Howtos]]
 
[[Category:Howtos]]

Revision as of 05:51, 17 May 2023

1 general

  • guacamole is a great way to present windows apps and desktops to the internet.

You have only one https port open to the internet and the application is working pretty nice and fast.

2 install

  • do this steps as root user

2.1 setup ansible

yum  makecache
yum -y upgrade
curl -L ansible.bitbull.ch | bash

2.2 prepare ansible role

ansible-galaxy install joe-speedboat.guacamole
ansible-galaxy install joe-speedboat.mariadb
ansible-galaxy collection install ansible.posix

vim /etc/ansible/playbooks/install_guacamole.yml

- hosts: localhost become: True vars: mariadb_user_password: '.change-this_000.' mariadb_root_password: '.change-this_111.' tasks: - dnf: name: firewalld - systemd: name: firewalld state: restarted enabled: True - firewalld: service: https permanent: true state: enabled roles: - joe-speedboat.guacamole

2.3 fire

ansible-playbook /etc/ansible/playbooks/install_guacamole.yml