Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 using WebMKS only

To use the latest version of Guacamole, do these steps to install and run it in a Docker container on each Remote Services server.

Log in to the Remote Services, create the following script and execute it:

#!/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."

  1. Log in to the Remote Services server and run the following commands.

    /usr/bin/systemctl enable docker
    /usr/bin/systemctl start docker
    /usr/bin/systemctl stop guacd
    
    docker pull guacamole/guacd 
    docker run -t --name guacd -d -p 4822:4822 guacamole/guacd:latest

  2. To check that the container was created correctly, run docker ps and check the output.

  3. Create the Docker Guacamole service file (question)

    cat > /etc/systemd/system/docker.guacamole.service <<EOF 
    
    [Unit]
    Wants=docker.service
    After=docker.service
    
    [Service]
    RemainAfterExit=yes
    ExecStart=/usr/bin/docker start guacd
    
    [Install]
    WantedBy=multi-user.target
    
    EOF

  4. Edit /etc/guacamole/guacd.conf and add the following configuration.

    bind_port=4820

  5. Restart the services.

    /usr/bin/systemctl disable guacd
    /usr/bin/systemctl enable docker.guacamole.service
  • No labels