1
0
mirror of https://git.koehlerweb.org/frodovdr/guac-install synced 2024-11-14 22:47:14 +01:00
guac-install/README.md

178 lines
5.9 KiB
Markdown
Raw Permalink Normal View History

2016-08-14 20:05:46 +02:00
# guac-install
2023-04-25 00:32:46 +02:00
I've maintained this script for quite a few years now with the help of the other contributors and it seems to be getting more and more fragmented as libraries and system OSes diverge in their package management. I do **not** plan on maintaining this beyond perhaps approving other people's PRs and letting people continue to discuss issues, so I won't archive it but I'm also not actively maintaining it 🤷‍♂️
You can also check out this other [Guacamole-Setup](https://github.com/itiligent/Guacamole-Setup) repo which sets up a complete **Virtual Desktop/Jump Server appliance with MFA, Active Directory integration & Nginx SSL reverse proxy** for more inspiration.
2021-03-10 17:01:34 +01:00
2021-06-22 18:27:28 +02:00
## NOTE: The fixes below are not to be used UNLESS you're having issues, don't run these for no reason, use the distro maintainers version unless there's a reason not to.
2021-01-27 15:38:44 +01:00
## NOTE: Ubuntu users having issues with RDP have reported the following fix:
2020-03-22 02:51:41 +01:00
```
sudo add-apt-repository ppa:remmina-ppa-team/remmina-next
2020-03-22 02:51:41 +01:00
sudo apt-get update
sudo apt-get install freerdp2-dev freerdp2-x11
```
2021-01-27 15:38:55 +01:00
## NOTE: Debian users having issues with RDP have reported the following fix:
```
sudo bash -c 'echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list'
sudo apt update
sudo apt -y -t buster-backports install freerdp2-dev libpulse-dev
```
2023-08-16 23:43:52 +02:00
Script for installing Guacamole 1.5.3 on Ubuntu 16.04 or newer (with MySQL, or remote MySQL). It should also work on pure [Debian](https://www.debian.org/), [Raspbian](https://www.raspberrypi.org/downloads/raspbian/), [Linux Mint](https://linuxmint.com/) (18/LMDE 4 or newer) or [Kali Linux](https://www.kali.org/). I have tested this with Debian 10.3.0 (Buster). **If other versions don't work please open an issue.** It is likely due to a required library having a different name.
2016-08-14 20:31:26 +02:00
Run script, enter MySQL Root Password and Guacamole User password. Guacamole User is used to connect to the Guacamole Database. Be sure to save these!
2016-08-14 20:31:26 +02:00
The script attempts to install `tomcat9` by default (it will fall back on `tomcat8` **if the available version is 8.5.x or newer**, otherwise it will fall back to `tomcat7`). If you want to manually specify a tomcat version there's a commented out line you can modify. Have at it.
2017-08-02 13:31:42 +02:00
## MFA/2FA
By default the script will not install MFA support (QR code for Google/Microsoft Authenticator, Duo Mobile, etc. or Duo Push), if you do want MFA support you can use the `-t` or `--totp` or for Duo `-d` or `--duo` flags on the command line. Or modify the script variables `installTOTP=true` or `installDuo=true`. **Do not install both!**
2020-03-22 02:51:41 +01:00
## FYI
Here's a cool PowerShell module for using the Guacamole API: https://github.com/UpperM/guacamole-powershell
Does not work if you have MFA turned on (however, you can authenticate via the gui and get a token to use it that way).
2020-03-22 03:08:12 +01:00
## How to Run:
2017-03-12 19:43:21 +01:00
### Download file directly from here:
2017-03-12 19:42:53 +01:00
2020-07-06 00:53:36 +02:00
`wget https://git.io/fxZq5 -O guac-install.sh`
2016-12-31 23:44:30 +01:00
### Make it executable:
2017-03-12 19:42:53 +01:00
`chmod +x guac-install.sh`
2016-12-31 23:44:30 +01:00
### Run it as root:
Interactive (asks for passwords):
2017-03-12 19:42:53 +01:00
`./guac-install.sh`
2017-07-20 19:14:06 +02:00
Non-Interactive (values provided via cli):
`./guac-install.sh --mysqlpwd password --guacpwd password --nomfa --installmysql`
OR
`./guac-install.sh -r password -gp password -o -i`
Once installation is done you can access Guacamole by browsing to: http://<host_or_ip>:8080/guacamole/
The default credentials are `guacadmin` as both username and password. Please change them or disable guacadmin after install!
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
# guac-upgrade
Script for upgrading currently installed Guacamole instance (previously installed via this script/guide). This will also now update the TOTP or Duo extensions if used.
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
If looks for the tomcat folder in /etc/ (E.G. `/etc/tomcat7` or `/etc/tomcat8`) hopefully that works to identify the correct tomcat version/path :smile: I'm open to suggestions/pull requests for a cleaner method.
## All Switches
Install MySQL:
`-i or --installmysql`
Do *NOT* install MySQL:
`-n or --nomysql`
MySQL Host:
`-h or --mysqlhost`
MySQL Port:
`-p or --mysqlport`
MySQL Root Password:
`-r or --mysqlpwd`
Guacamole Database:
`-db or --guacdb`
Guacamole User:
`-gu or --guacuser`
Guacamole User Password:
`-gp or --guacpwd`
No MFA (No TOTP + Duo):
`-o or --nomfa`
Install TOTP:
`-t or --totp`
Install Duo:
`-d or --duo`
NOTE: Only the switches for MySQL Host, MySQL Port and Guacamole Database are available in the upgrade script.
2019-01-25 16:16:22 +01:00
## WARNING
2023-08-16 23:43:52 +02:00
- Upgrading from versions older than a couple dot fixes ago have not been tested with this script, use at your own risk and take backups first!
2019-01-25 16:16:22 +01:00
## How to Upgrade:
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
### Download file directly from here:
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
`wget https://raw.githubusercontent.com/MysticRyuujin/guac-install/master/guac-upgrade.sh`
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
### Make it executable:
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
`chmod +x guac-upgrade.sh`
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
### Run it as root:
Interactive (asks for passwords):
0.9.14 Release (#23) * Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
2018-01-20 15:23:04 +01:00
`./guac-upgrade.sh`
Non-Interactive (MySQL root password provided via cli):
`./guac-upgrade.sh --mysqlpwd password`
## Post Installation - Reverse Proxies
Make sure that you configure your reverse proxy (NGinx or Apache) as per the [Official Documentation](https://guacamole.apache.org/doc/0.9.7/gug/proxying-guacamole.html)
For Nginx:
2022-02-14 15:09:06 +01:00
```
location /guacamole/ {
proxy_pass http://HOSTNAME:8080/guacamole/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
access_log off;
}
2022-02-14 15:09:06 +01:00
```
For Apache:
2022-02-14 15:09:06 +01:00
```
<Location /guacamole/>
Order allow,deny
Allow from all
ProxyPass http://HOSTNAME:8080/guacamole/ flushpackets=on
ProxyPassReverse http://HOSTNAME:8080/guacamole/
</Location>
2022-02-14 15:09:06 +01:00
```
## NOTE: SSH doesnt work with Ubuntu 22.04:
Guacamole only supports ssh-dss and ssh-rsa, and both have been disabled in Ubuntu 22.04.
In the meantime a workaround is adding ```HostKeyAlgorithms +ssh-rsa``` to the end of ``` /etc/ssh/sshd_config ``` on the Ubuntu machine and restart sshd.
###### :warning: use at your own risk! :warning: