Upgrade Guacamole server
This section describes how to upgrade the Guacamole server as part of the upgrade to Abiquo 6.1.2 or higher.
This upgrade is for remote access to public cloud and it is optional for customers that only use vCenter with WebMKS
To use the latest version of Guacamole, install and run it in a Docker container on each Remote Services server.
Log in to each Remote Services server, and create and run the following script.
#!/bin/bash
# Check if the file exists
if [ -f "/etc/guacamole/guacd.conf" ]; then
# Check if the line already exists in the file
if grep -q "bind_port = 4820" "/etc/guacamole/guacd.conf"; then
echo "The line 'bind_port = 4820' already exists in the file."
else
# Append the line to the file
echo "bind_port = 4820" | sudo tee -a "/etc/guacamole/guacd.conf" >/dev/null
echo "The line 'bind_port = 4820' has been added to the file."
fi
else
echo "File '/etc/guacamole/guacd.conf' does not exist."
fi
# Start docker
if [ -x /usr/bin/systemctl ]; then
echo "Enabling and starting Docker..."
/usr/bin/systemctl enable docker
/usr/bin/systemctl start docker
/usr/bin/systemctl stop guacd
echo "Docker started successfully."
fi
# Pull docker image container
echo "Pulling Guacamole Docker image..."
docker pull guacamole/guacd
echo "Guacamole Docker image pulled successfully."
echo "Running Guacamole Docker container..."
docker run -t --name guacd -d -p 4822:4822 guacamole/guacd:latest
echo "Guacamole Docker container started successfully."
# Create docker container on boot
echo "Creating Docker service..."
cat > /etc/systemd/system/docker.guacamole.service <<EOF
[Unit]
Wants=docker.service
After=docker.service
[Service]
RemainAfterExit=yes
ExecStart=/usr/bin/docker start guacd
#ExecStop=/usr/bin/docker stop guacd
[Install]
WantedBy=multi-user.target
EOF
echo "Docker service created successfully."
# Enable the Docker service for Guacamole
echo "Enabling Guacamole Docker service..."
/usr/bin/systemctl disable guacd
systemctl enable docker.guacamole.service
echo "Guacamole Docker service enabled successfully."
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved