mirror of
				https://git.koehlerweb.org/frodovdr/guac-install
				synced 2025-10-31 04:06:40 +01:00 
			
		
		
		
	
							
								
								
									
										50
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										50
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,45 +1,43 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| # guac-install | # guac-install | ||||||
|  |  | ||||||
| Script for installing Guacamole 1.1.0 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/) 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. | Script for installing Guacamole 1.1.0 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/) 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. | ||||||
|  |  | ||||||
| Run script, enter MySQL Root Password and Guacamole User password. Guacamole User is used to connect to the Guacamole Database. | Run script, enter MySQL Root Password and Guacamole User password. Guacamole User is used to connect to the Guacamole Database. | ||||||
|  |  | ||||||
| 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. | 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. | ||||||
|  |  | ||||||
| If you're looking to also have NGINX / Let's Encrypt / HTTPS click [HERE](https://github.com/bigredthelogger/guacamole) | If you're looking to also have NGINX / Let's Encrypt / HTTPS click [HERE](https://github.com/bigredthelogger/guacamole) | ||||||
|  |  | ||||||
| ## MFA/2FA | ## 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 need to specify 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** | 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** | ||||||
|  |  | ||||||
| ## How to Run: | ## How to Run: | ||||||
|  |  | ||||||
| ### Download file directly from here: | ### Download file directly from here: | ||||||
|  |  | ||||||
| <code>wget https://git.io/fxZq5</code> | `wget https://git.io/fxZq5` | ||||||
|  |  | ||||||
| ### Make it executable: | ### Make it executable: | ||||||
|  |  | ||||||
| <code>chmod +x guac-install.sh</code> | `chmod +x guac-install.sh` | ||||||
|  |  | ||||||
| ### Run it as root: | ### Run it as root: | ||||||
|  |  | ||||||
| Interactive (asks for passwords): | Interactive (asks for passwords): | ||||||
|  |  | ||||||
| <code>./guac-install.sh</code> | `./guac-install.sh` | ||||||
|  |  | ||||||
| Non-Interactive (values provided via cli): | Non-Interactive (values provided via cli): | ||||||
|  |  | ||||||
| <code>./guac-install.sh --mysqlpwd password --guacpwd password</code> | `./guac-install.sh --mysqlpwd password --guacpwd password --nomfa --installmysql` | ||||||
|  |  | ||||||
| OR | OR | ||||||
|  |  | ||||||
| <code>./guac-install.sh -r password -gp password</code> | `./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/ | 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! | The default credentials are `guacadmin` as both username and password. Please change them or disable guacadmin after install! | ||||||
|  |  | ||||||
| # guac-upgrade | # guac-upgrade | ||||||
|  |  | ||||||
| @@ -51,43 +49,47 @@ If looks for the tomcat folder in /etc/ (E.G. `/etc/tomcat7` or `/etc/tomcat8`) | |||||||
|  |  | ||||||
| Install MySQL: | Install MySQL: | ||||||
|  |  | ||||||
| <code>-i or --installmysql</code> | `-i or --installmysql` | ||||||
|  |  | ||||||
| Do *NOT* install MySQL: | Do *NOT* install MySQL: | ||||||
|  |  | ||||||
| <code>-n or --nomysql</code> | `-n or --nomysql` | ||||||
|  |  | ||||||
| MySQL Host: | MySQL Host: | ||||||
|  |  | ||||||
| <code>-h or --mysqlhost</code> | `-h or --mysqlhost` | ||||||
|  |  | ||||||
| MySQL Port: | MySQL Port: | ||||||
|  |  | ||||||
| <code>-p or --mysqlport</code> | `-p or --mysqlport` | ||||||
|  |  | ||||||
| MySQL Root Password: | MySQL Root Password: | ||||||
|  |  | ||||||
| <code>-r or --mysqlpwd</code> | `-r or --mysqlpwd` | ||||||
|  |  | ||||||
| Guacamole Database: | Guacamole Database: | ||||||
|  |  | ||||||
| <code>-db or --guacdb</code> | `-db or --guacdb` | ||||||
|  |  | ||||||
| Guacamole User: | Guacamole User: | ||||||
|  |  | ||||||
| <code>-gu or --guacuser</code> | `-gu or --guacuser` | ||||||
|  |  | ||||||
| Guacamole User Password: | Guacamole User Password: | ||||||
|  |  | ||||||
| <code>-gp or --guacpwd</code> | `-gp or --guacpwd` | ||||||
|  |  | ||||||
|  | No MFA (No TOTP + Duo): | ||||||
|  |  | ||||||
|  | `-o or --nomfa` | ||||||
|  |  | ||||||
| Install TOTP: | Install TOTP: | ||||||
|  |  | ||||||
| <code>-t or --totp</code> | `-t or --totp` | ||||||
|  |  | ||||||
| Install Duo: | Install Duo: | ||||||
|  |  | ||||||
| <code>-d or --duo</code> | `-d or --duo` | ||||||
|  |  | ||||||
| NOTE: Only the switches for MySQL Host, MySQL Port and Guacamole Database are available in the upgrade script. | NOTE: Only the switches for MySQL Host, MySQL Port and Guacamole Database are available in the upgrade script. | ||||||
|  |  | ||||||
| @@ -100,18 +102,18 @@ NOTE: Only the switches for MySQL Host, MySQL Port and Guacamole Database are av | |||||||
|  |  | ||||||
| ### Download file directly from here: | ### Download file directly from here: | ||||||
|  |  | ||||||
| <code>wget https://raw.githubusercontent.com/MysticRyuujin/guac-install/master/guac-upgrade.sh</code> | `wget https://raw.githubusercontent.com/MysticRyuujin/guac-install/master/guac-upgrade.sh` | ||||||
|  |  | ||||||
| ### Make it executable: | ### Make it executable: | ||||||
|  |  | ||||||
| <code>chmod +x guac-upgrade.sh</code> | `chmod +x guac-upgrade.sh` | ||||||
|  |  | ||||||
| ### Run it as root: | ### Run it as root: | ||||||
|  |  | ||||||
| Interactive (asks for passwords): | Interactive (asks for passwords): | ||||||
|  |  | ||||||
| <code>./guac-upgrade.sh</code> | `./guac-upgrade.sh` | ||||||
|  |  | ||||||
| Non-Interactive (MySQL root password provided via cli): | Non-Interactive (MySQL root password provided via cli): | ||||||
|  |  | ||||||
| <code>./guac-upgrade.sh --mysqlpwd password</code> | `./guac-upgrade.sh --mysqlpwd password` | ||||||
|   | |||||||
| @@ -70,7 +70,7 @@ while [ "$1" != "" ]; do | |||||||
|             ;; |             ;; | ||||||
|         -gp | --guacpwd ) |         -gp | --guacpwd ) | ||||||
|             shift |             shift | ||||||
|             guacpwd="$1" |             guacPwd="$1" | ||||||
|             ;; |             ;; | ||||||
|  |  | ||||||
|         # MFA selection |         # MFA selection | ||||||
| @@ -79,6 +79,11 @@ while [ "$1" != "" ]; do | |||||||
|             ;; |             ;; | ||||||
|         -d | --duo ) |         -d | --duo ) | ||||||
|             installDuo=true |             installDuo=true | ||||||
|  |             ;; | ||||||
|  |         -o | --nomfa ) | ||||||
|  |             installTOTP=false | ||||||
|  |             installDuo=false | ||||||
|  |             ;; | ||||||
|     esac |     esac | ||||||
|     shift |     shift | ||||||
| done | done | ||||||
| @@ -154,28 +159,36 @@ if [ -z "$guacDb" ]; then | |||||||
|     guacDb="guacamole_db" |     guacDb="guacamole_db" | ||||||
| fi | fi | ||||||
|  |  | ||||||
| # Get MySQL "Root" and "Guacamole User" password | if [ -z "${mysqlRootPwd}" ]; then | ||||||
| while true; do |     # Get MySQL "Root" and "Guacamole User" password | ||||||
|     echo |     while true; do | ||||||
|     read -s -p "Enter ${mysqlHost}'s MySQL root password: " mysqlRootPwd |         echo | ||||||
|     echo |         read -s -p "Enter ${mysqlHost}'s MySQL root password: " mysqlRootPwd | ||||||
|     read -s -p "Confirm ${mysqlHost}'s MySQL root password: " PROMPT2 |         echo | ||||||
|     echo |         read -s -p "Confirm ${mysqlHost}'s MySQL root password: " PROMPT2 | ||||||
|     [ "$mysqlRootPwd" = "$PROMPT2" ] && break |         echo | ||||||
|     echo "Passwords don't match. Please try again." |         [ "$mysqlRootPwd" = "$PROMPT2" ] && break | ||||||
| done |         echo "Passwords don't match. Please try again." | ||||||
|  |     done | ||||||
|  | else | ||||||
|  |     echo -e "${BLUE}Read MySQL password from command line argument${NC}" | ||||||
|  | fi | ||||||
| echo | echo | ||||||
|  |  | ||||||
| while true; do | if [ -z "${guacPwd}" ]; then | ||||||
|     echo -e "${BLUE}A new MySQL user will be created (${guacUser})${NC}" |     while true; do | ||||||
|     read -s -p "Enter ${mysqlHost}'s MySQL guacamole user password: " guacPwd |         echo -e "${BLUE}A new MySQL user will be created (${guacUser})${NC}" | ||||||
|     echo |         read -s -p "Enter ${mysqlHost}'s MySQL guacamole user password: " guacPwd | ||||||
|     read -s -p "Confirm ${mysqlHost}'s MySQL guacamole user password: " PROMPT2 |         echo | ||||||
|     echo |         read -s -p "Confirm ${mysqlHost}'s MySQL guacamole user password: " PROMPT2 | ||||||
|     [ "$guacPwd" = "$PROMPT2" ] && break |         echo | ||||||
|     echo "Passwords don't match. Please try again." |         [ "$guacPwd" = "$PROMPT2" ] && break | ||||||
|     echo |         echo "Passwords don't match. Please try again." | ||||||
| done |         echo | ||||||
|  |     done | ||||||
|  | else | ||||||
|  |     echo -e "${BLUE}Read MySQL password from command line argument${NC}" | ||||||
|  | fi | ||||||
| echo | echo | ||||||
|  |  | ||||||
| if [ "$installMySQL" = true ]; then | if [ "$installMySQL" = true ]; then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user