From 41b7ec2c3821043a99396d1afcbedb1d0bf094e6 Mon Sep 17 00:00:00 2001 From: Tyron Date: Wed, 5 Apr 2017 12:33:25 -0400 Subject: [PATCH] initial file Script to deploy only the server component of Guacamole. This was intended to simplify installation of Guacamole server into a cloud VM to be later captured as a template and deployed into an auto-scaling group behind a load balancer. --- guac-install-server.sh | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 guac-install-server.sh diff --git a/guac-install-server.sh b/guac-install-server.sh new file mode 100644 index 0000000..52f5c06 --- /dev/null +++ b/guac-install-server.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +VERSION="0.9.12" + +# Install Server Features +apt-get update +apt-get -y install build-essential libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libavcodec-dev libavutil-dev \ +libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev \ +libvorbis-dev libwebp-dev jq + +# If Apt-Get fails to run completely the rest of this isn't going to work... +if [ $? != 0 ] +then + echo "apt-get failed to install all required dependencies. Are you on Ubuntu 16.04 LTS?" + exit +fi + +SERVER=$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred|rtrimstr("/")') + +# Download Guacample Files +wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/source/guacamole-server-${VERSION}-incubating.tar.gz + +# Extract Guacamole Files +tar -xzf guacamole-server-${VERSION}-incubating.tar.gz + +# MAKE DIRECTORIES +mkdir /etc/guacamole + +# Install GUACD +cd guacamole-server-${VERSION}-incubating +./configure --with-init-dir=/etc/init.d +make +make install +ldconfig +cd .. + +# Configure guacamole.properties +echo "[server]" >> /etc/guacamole/guacd.conf +echo "bind_host = 0.0.0.0" >> /etc/guacamole/guacd.conf +echo "bind_port = 4822" >> /etc/guacamole/guacd.conf + +# Configure startup +systemctl enable guacd +systemctl start guacd + +# Cleanup +rm -rf guacamole-*