CentOS7.9にApache Guacamoleをインストールする

環境
1.OSバージョンの確認
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
2.dockerバージョンの確認

# docker --version
Docker version 20.10.12, build e91ed57

3.docker composeバージョンの確認
# docker-compose version
Docker Compose version v2.2.2

インストールの方法
1.guacamole-docker-composeのダウンロード

# git clone "https://github.com/boschkundendienst/guacamole-docker-compose.git"
Cloning into 'guacamole-docker-compose'...
remote: Enumerating objects: 101, done.
略
Resolving deltas: 100% (45/45), done.

2.docker-compose.ymlの内容を確認します
# cd guacamole-docker-compose/
# cat docker-compose.yml

3.データベースに初期化ファイルを作成します
初期化ファイルを実行します

# ./prepare.sh
略
Creating SSL certificates
Generating a 2048 bit RSA private key
...........................+++
........................................................................+++
writing new private key to 'nginx/ssl/self-ssl.key'
-----
You can use your own certificates by placing the private key in nginx/ssl/self-ssl.key and the cert in nginx/ssl/self.cert
done

ファイルの内容を確認します
# cat prepare.sh

#!/bin/sh
#
# check if docker is running
if ! (docker ps >/dev/null 2>&1)
then
        echo "docker daemon not running, will exit here!"
        exit
fi
echo "Preparing folder init and creating ./init/initdb.sql"
mkdir ./init >/dev/null 2>&1
mkdir -p ./nginx/ssl >/dev/null 2>&1
chmod -R +x ./init
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > ./init/initdb.sql
echo "done"
echo "Creating SSL certificates"
openssl req -nodes -newkey rsa:2048 -new -x509 -keyout nginx/ssl/self-ssl.key -out nginx/ssl/self.cert -subj '/C=DE/ST=BY/L=Hintertupfing/O=Dorfwirt/OU=Theke/CN=www.createyourown.domain/emailAddress=docker@createyourown.domain'
echo "You can use your own certificates by placing the private key in nginx/ssl/self-ssl.key and the cert in nginx/ssl/self.cert"
echo "done"

4.docker composeを実行します
# docker-compose up -d

5.ファイアウォールを設定します

8443番ポートを許可します
# firewall-cmd --add-port=8443/tcp --zone=public --permanent
success
# firewall-cmd --reload
success

6.Apache Guacamole確認
webブラウザから https://サーバーアドレス:8443 にアクセスします。
username:guacadmin
password:guacadmin

CentOS 7

Posted by arkgame