当前位置: 首页 > news >正文

guacamole docker一键部署脚本

前言

在我学习guacamole的过程中发现全网大致有两种方式安装guacamole的方式:

1. 直接安装(下载java环境/mysql/, 修改配置)

2. docker安装(和直接安装类似,需要下载相关环境,然后做配置)

然后最近项目需要为了偷懒,于是学习了docker-compose,编写了docker-compose-guacamole脚本,最后测试成功跑通。

具体步骤

新建文件:docker-compose-guacamole.yml

将如下内容粘贴保存

version: '3'services:guacamole:image: guacamole/guacamoledepends_on:- guacd- guacamole-mysql-serverenvironment:MYSQL_HOSTNAME: guacamole-mysql-serverMYSQL_DATABASE: guacamole_dbMYSQL_USER: guacamoleMYSQL_PASSWORD: winring2023GUACD_HOSTNAME: guacdports:- "9000:8080"networks:- my-guacamole-networksguacd:image: guacamole/guacddepends_on:- guacamole-mysql-servernetworks:- my-guacamole-networksguacamole-mysql-server:image: mysql/mysql-servervolumes:- ./initdb.sql:/docker-entrypoint-initdb.d/initdb.sqlrestart: alwaysenvironment:MYSQL_ROOT_PASSWORD: winring2023MYSQL_DATABASE: guacamole_dbMYSQL_USER: guacamoleMYSQL_PASSWORD: winring2023networks:- my-guacamole-networksnetworks:my-guacamole-networks:driver: bridge

新建initdb.sql数据库

将如下内容粘贴保存

--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements.  See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership.  The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License.  You may obtain a copy of the License at
--
--   http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied.  See the License for the
-- specific language governing permissions and limitations
-- under the License.
----
-- Table of connection groups. Each connection group has a name.
--CREATE TABLE `guacamole_connection_group` (`connection_group_id`   int(11)      NOT NULL AUTO_INCREMENT,`parent_id`             int(11),`connection_group_name` varchar(128) NOT NULL,`type`                  enum('ORGANIZATIONAL','BALANCING') NOT NULL DEFAULT 'ORGANIZATIONAL',-- Concurrency limits`max_connections`          int(11),`max_connections_per_user` int(11),`enable_session_affinity`  boolean NOT NULL DEFAULT 0,PRIMARY KEY (`connection_group_id`),UNIQUE KEY `connection_group_name_parent` (`connection_group_name`, `parent_id`),CONSTRAINT `guacamole_connection_group_ibfk_1`FOREIGN KEY (`parent_id`)REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of connections. Each connection has a name, protocol, and
-- associated set of parameters.
-- A connection may belong to a connection group.
--CREATE TABLE `guacamole_connection` (`connection_id`       int(11)      NOT NULL AUTO_INCREMENT,`connection_name`     varchar(128) NOT NULL,`parent_id`           int(11),`protocol`            varchar(32)  NOT NULL,-- Guacamole proxy (guacd) overrides`proxy_port`              integer,`proxy_hostname`          varchar(512),`proxy_encryption_method` enum('NONE', 'SSL'),-- Concurrency limits`max_connections`          int(11),`max_connections_per_user` int(11),-- Load-balancing behavior`connection_weight`        int(11),`failover_only`            boolean NOT NULL DEFAULT 0,PRIMARY KEY (`connection_id`),UNIQUE KEY `connection_name_parent` (`connection_name`, `parent_id`),CONSTRAINT `guacamole_connection_ibfk_1`FOREIGN KEY (`parent_id`)REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of base entities which may each be either a user or user group. Other
-- tables which represent qualities shared by both users and groups will point
-- to guacamole_entity, while tables which represent qualities specific to
-- users or groups will point to guacamole_user or guacamole_user_group.
--CREATE TABLE `guacamole_entity` (`entity_id`     int(11)            NOT NULL AUTO_INCREMENT,`name`          varchar(128)       NOT NULL,`type`          enum('USER','USER_GROUP') NOT NULL,PRIMARY KEY (`entity_id`),UNIQUE KEY `guacamole_entity_name_scope` (`type`, `name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of users. Each user has a unique username and a hashed password
-- with corresponding salt. Although the authentication system will always set
-- salted passwords, other systems may set unsalted passwords by simply not
-- providing the salt.
--CREATE TABLE `guacamole_user` (`user_id`       int(11)      NOT NULL AUTO_INCREMENT,`entity_id`     int(11)      NOT NULL,-- Optionally-salted password`password_hash` binary(32)   NOT NULL,`password_salt` binary(32),`password_date` datetime     NOT NULL,-- Account disabled/expired status`disabled`      boolean      NOT NULL DEFAULT 0,`expired`       boolean      NOT NULL DEFAULT 0,-- Time-based access restriction`access_window_start`    TIME,`access_window_end`      TIME,-- Date-based access restriction`valid_from`  DATE,`valid_until` DATE,-- Timezone used for all date/time comparisons and interpretation`timezone` VARCHAR(64),-- Profile information`full_name`           VARCHAR(256),`email_address`       VARCHAR(256),`organization`        VARCHAR(256),`organizational_role` VARCHAR(256),PRIMARY KEY (`user_id`),UNIQUE KEY `guacamole_user_single_entity` (`entity_id`),CONSTRAINT `guacamole_user_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`)ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of user groups. Each user group may have an arbitrary set of member
-- users and member groups, with those members inheriting the permissions
-- granted to that group.
--CREATE TABLE `guacamole_user_group` (`user_group_id` int(11)      NOT NULL AUTO_INCREMENT,`entity_id`     int(11)      NOT NULL,-- Group disabled status`disabled`      boolean      NOT NULL DEFAULT 0,PRIMARY KEY (`user_group_id`),UNIQUE KEY `guacamole_user_group_single_entity` (`entity_id`),CONSTRAINT `guacamole_user_group_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`)ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of users which are members of given user groups.
--CREATE TABLE `guacamole_user_group_member` (`user_group_id`    int(11)     NOT NULL,`member_entity_id` int(11)     NOT NULL,PRIMARY KEY (`user_group_id`, `member_entity_id`),-- Parent must be a user groupCONSTRAINT `guacamole_user_group_member_parent_id`FOREIGN KEY (`user_group_id`)REFERENCES `guacamole_user_group` (`user_group_id`) ON DELETE CASCADE,-- Member may be either a user or a user group (any entity)CONSTRAINT `guacamole_user_group_member_entity_id`FOREIGN KEY (`member_entity_id`)REFERENCES `guacamole_entity` (`entity_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of sharing profiles. Each sharing profile has a name, associated set
-- of parameters, and a primary connection. The primary connection is the
-- connection that the sharing profile shares, and the parameters dictate the
-- restrictions/features which apply to the user joining the connection via the
-- sharing profile.
--CREATE TABLE guacamole_sharing_profile (`sharing_profile_id`    int(11)      NOT NULL AUTO_INCREMENT,`sharing_profile_name`  varchar(128) NOT NULL,`primary_connection_id` int(11)      NOT NULL,PRIMARY KEY (`sharing_profile_id`),UNIQUE KEY `sharing_profile_name_primary` (sharing_profile_name, primary_connection_id),CONSTRAINT `guacamole_sharing_profile_ibfk_1`FOREIGN KEY (`primary_connection_id`)REFERENCES `guacamole_connection` (`connection_id`)ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of connection parameters. Each parameter is simply a name/value pair
-- associated with a connection.
--CREATE TABLE `guacamole_connection_parameter` (`connection_id`   int(11)       NOT NULL,`parameter_name`  varchar(128)  NOT NULL,`parameter_value` varchar(4096) NOT NULL,PRIMARY KEY (`connection_id`,`parameter_name`),CONSTRAINT `guacamole_connection_parameter_ibfk_1`FOREIGN KEY (`connection_id`)REFERENCES `guacamole_connection` (`connection_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of sharing profile parameters. Each parameter is simply
-- name/value pair associated with a sharing profile. These parameters dictate
-- the restrictions/features which apply to the user joining the associated
-- connection via the sharing profile.
--CREATE TABLE guacamole_sharing_profile_parameter (`sharing_profile_id` integer       NOT NULL,`parameter_name`     varchar(128)  NOT NULL,`parameter_value`    varchar(4096) NOT NULL,PRIMARY KEY (`sharing_profile_id`, `parameter_name`),CONSTRAINT `guacamole_sharing_profile_parameter_ibfk_1`FOREIGN KEY (`sharing_profile_id`)REFERENCES `guacamole_sharing_profile` (`sharing_profile_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of arbitrary user attributes. Each attribute is simply a name/value
-- pair associated with a user. Arbitrary attributes are defined by other
-- extensions. Attributes defined by this extension will be mapped to
-- properly-typed columns of a specific table.
--CREATE TABLE guacamole_user_attribute (`user_id`         int(11)       NOT NULL,`attribute_name`  varchar(128)  NOT NULL,`attribute_value` varchar(4096) NOT NULL,PRIMARY KEY (user_id, attribute_name),KEY `user_id` (`user_id`),CONSTRAINT guacamole_user_attribute_ibfk_1FOREIGN KEY (user_id)REFERENCES guacamole_user (user_id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of arbitrary user group attributes. Each attribute is simply a
-- name/value pair associated with a user group. Arbitrary attributes are
-- defined by other extensions. Attributes defined by this extension will be
-- mapped to properly-typed columns of a specific table.
--CREATE TABLE guacamole_user_group_attribute (`user_group_id`   int(11)       NOT NULL,`attribute_name`  varchar(128)  NOT NULL,`attribute_value` varchar(4096) NOT NULL,PRIMARY KEY (`user_group_id`, `attribute_name`),KEY `user_group_id` (`user_group_id`),CONSTRAINT `guacamole_user_group_attribute_ibfk_1`FOREIGN KEY (`user_group_id`)REFERENCES `guacamole_user_group` (`user_group_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of arbitrary connection attributes. Each attribute is simply a
-- name/value pair associated with a connection. Arbitrary attributes are
-- defined by other extensions. Attributes defined by this extension will be
-- mapped to properly-typed columns of a specific table.
--CREATE TABLE guacamole_connection_attribute (`connection_id`   int(11)       NOT NULL,`attribute_name`  varchar(128)  NOT NULL,`attribute_value` varchar(4096) NOT NULL,PRIMARY KEY (connection_id, attribute_name),KEY `connection_id` (`connection_id`),CONSTRAINT guacamole_connection_attribute_ibfk_1FOREIGN KEY (connection_id)REFERENCES guacamole_connection (connection_id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of arbitrary connection group attributes. Each attribute is simply a
-- name/value pair associated with a connection group. Arbitrary attributes are
-- defined by other extensions. Attributes defined by this extension will be
-- mapped to properly-typed columns of a specific table.
--CREATE TABLE guacamole_connection_group_attribute (`connection_group_id` int(11)       NOT NULL,`attribute_name`      varchar(128)  NOT NULL,`attribute_value`     varchar(4096) NOT NULL,PRIMARY KEY (connection_group_id, attribute_name),KEY `connection_group_id` (`connection_group_id`),CONSTRAINT guacamole_connection_group_attribute_ibfk_1FOREIGN KEY (connection_group_id)REFERENCES guacamole_connection_group (connection_group_id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of arbitrary sharing profile attributes. Each attribute is simply a
-- name/value pair associated with a sharing profile. Arbitrary attributes are
-- defined by other extensions. Attributes defined by this extension will be
-- mapped to properly-typed columns of a specific table.
--CREATE TABLE guacamole_sharing_profile_attribute (`sharing_profile_id` int(11)       NOT NULL,`attribute_name`     varchar(128)  NOT NULL,`attribute_value`    varchar(4096) NOT NULL,PRIMARY KEY (sharing_profile_id, attribute_name),KEY `sharing_profile_id` (`sharing_profile_id`),CONSTRAINT guacamole_sharing_profile_attribute_ibfk_1FOREIGN KEY (sharing_profile_id)REFERENCES guacamole_sharing_profile (sharing_profile_id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of connection permissions. Each connection permission grants a user or
-- user group specific access to a connection.
--CREATE TABLE `guacamole_connection_permission` (`entity_id`     int(11) NOT NULL,`connection_id` int(11) NOT NULL,`permission`    enum('READ','UPDATE','DELETE','ADMINISTER') NOT NULL,PRIMARY KEY (`entity_id`,`connection_id`,`permission`),CONSTRAINT `guacamole_connection_permission_ibfk_1`FOREIGN KEY (`connection_id`)REFERENCES `guacamole_connection` (`connection_id`) ON DELETE CASCADE,CONSTRAINT `guacamole_connection_permission_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of connection group permissions. Each group permission grants a user
-- or user group specific access to a connection group.
--CREATE TABLE `guacamole_connection_group_permission` (`entity_id`           int(11) NOT NULL,`connection_group_id` int(11) NOT NULL,`permission`          enum('READ','UPDATE','DELETE','ADMINISTER') NOT NULL,PRIMARY KEY (`entity_id`,`connection_group_id`,`permission`),CONSTRAINT `guacamole_connection_group_permission_ibfk_1`FOREIGN KEY (`connection_group_id`)REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE,CONSTRAINT `guacamole_connection_group_permission_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of sharing profile permissions. Each sharing profile permission grants
-- a user or user group specific access to a sharing profile.
--CREATE TABLE guacamole_sharing_profile_permission (`entity_id`          integer NOT NULL,`sharing_profile_id` integer NOT NULL,`permission`         enum('READ','UPDATE','DELETE','ADMINISTER') NOT NULL,PRIMARY KEY (`entity_id`, `sharing_profile_id`, `permission`),CONSTRAINT `guacamole_sharing_profile_permission_ibfk_1`FOREIGN KEY (`sharing_profile_id`)REFERENCES `guacamole_sharing_profile` (`sharing_profile_id`) ON DELETE CASCADE,CONSTRAINT `guacamole_sharing_profile_permission_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of system permissions. Each system permission grants a user or user
-- group a system-level privilege of some kind.
--CREATE TABLE `guacamole_system_permission` (`entity_id`  int(11) NOT NULL,`permission` enum('CREATE_CONNECTION','CREATE_CONNECTION_GROUP','CREATE_SHARING_PROFILE','CREATE_USER','CREATE_USER_GROUP','ADMINISTER') NOT NULL,PRIMARY KEY (`entity_id`,`permission`),CONSTRAINT `guacamole_system_permission_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of user permissions. Each user permission grants a user or user group
-- access to another user (the "affected" user) for a specific type of
-- operation.
--CREATE TABLE `guacamole_user_permission` (`entity_id`        int(11) NOT NULL,`affected_user_id` int(11) NOT NULL,`permission`       enum('READ','UPDATE','DELETE','ADMINISTER') NOT NULL,PRIMARY KEY (`entity_id`,`affected_user_id`,`permission`),CONSTRAINT `guacamole_user_permission_ibfk_1`FOREIGN KEY (`affected_user_id`)REFERENCES `guacamole_user` (`user_id`) ON DELETE CASCADE,CONSTRAINT `guacamole_user_permission_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of user group permissions. Each user group permission grants a user
-- or user group access to a another user group (the "affected" user group) for
-- a specific type of operation.
--CREATE TABLE `guacamole_user_group_permission` (`entity_id`              int(11) NOT NULL,`affected_user_group_id` int(11) NOT NULL,`permission`             enum('READ','UPDATE','DELETE','ADMINISTER') NOT NULL,PRIMARY KEY (`entity_id`, `affected_user_group_id`, `permission`),CONSTRAINT `guacamole_user_group_permission_affected_user_group`FOREIGN KEY (`affected_user_group_id`)REFERENCES `guacamole_user_group` (`user_group_id`) ON DELETE CASCADE,CONSTRAINT `guacamole_user_group_permission_entity`FOREIGN KEY (`entity_id`)REFERENCES `guacamole_entity` (`entity_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of connection history records. Each record defines a specific user's
-- session, including the connection used, the start time, and the end time
-- (if any).
--CREATE TABLE `guacamole_connection_history` (`history_id`           int(11)      NOT NULL AUTO_INCREMENT,`user_id`              int(11)      DEFAULT NULL,`username`             varchar(128) NOT NULL,`remote_host`          varchar(256) DEFAULT NULL,`connection_id`        int(11)      DEFAULT NULL,`connection_name`      varchar(128) NOT NULL,`sharing_profile_id`   int(11)      DEFAULT NULL,`sharing_profile_name` varchar(128) DEFAULT NULL,`start_date`           datetime     NOT NULL,`end_date`             datetime     DEFAULT NULL,PRIMARY KEY (`history_id`),KEY `user_id` (`user_id`),KEY `connection_id` (`connection_id`),KEY `sharing_profile_id` (`sharing_profile_id`),KEY `start_date` (`start_date`),KEY `end_date` (`end_date`),KEY `connection_start_date` (`connection_id`, `start_date`),CONSTRAINT `guacamole_connection_history_ibfk_1`FOREIGN KEY (`user_id`)REFERENCES `guacamole_user` (`user_id`) ON DELETE SET NULL,CONSTRAINT `guacamole_connection_history_ibfk_2`FOREIGN KEY (`connection_id`)REFERENCES `guacamole_connection` (`connection_id`) ON DELETE SET NULL,CONSTRAINT `guacamole_connection_history_ibfk_3`FOREIGN KEY (`sharing_profile_id`)REFERENCES `guacamole_sharing_profile` (`sharing_profile_id`) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- User login/logout history
--CREATE TABLE guacamole_user_history (`history_id`           int(11)      NOT NULL AUTO_INCREMENT,`user_id`              int(11)      DEFAULT NULL,`username`             varchar(128) NOT NULL,`remote_host`          varchar(256) DEFAULT NULL,`start_date`           datetime     NOT NULL,`end_date`             datetime     DEFAULT NULL,PRIMARY KEY (history_id),KEY `user_id` (`user_id`),KEY `start_date` (`start_date`),KEY `end_date` (`end_date`),KEY `user_start_date` (`user_id`, `start_date`),CONSTRAINT guacamole_user_history_ibfk_1FOREIGN KEY (user_id)REFERENCES guacamole_user (user_id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- User password history
--CREATE TABLE guacamole_user_password_history (`password_history_id` int(11) NOT NULL AUTO_INCREMENT,`user_id`             int(11) NOT NULL,-- Salted password`password_hash` binary(32) NOT NULL,`password_salt` binary(32),`password_date` datetime   NOT NULL,PRIMARY KEY (`password_history_id`),KEY `user_id` (`user_id`),CONSTRAINT `guacamole_user_password_history_ibfk_1`FOREIGN KEY (`user_id`)REFERENCES `guacamole_user` (`user_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements.  See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership.  The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License.  You may obtain a copy of the License at
--
--   http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied.  See the License for the
-- specific language governing permissions and limitations
-- under the License.
---- Create default user "guacadmin" with password "guacadmin"
INSERT INTO guacamole_entity (name, type) VALUES ('guacadmin', 'USER');
INSERT INTO guacamole_user (entity_id, password_hash, password_salt, password_date)
SELECTentity_id,x'CA458A7D494E3BE824F5E1E175A1556C0F8EEF2C2D7DF3633BEC4A29C4411960',  -- 'guacadmin'x'FE24ADC5E11E2B25288D1704ABE67A79E342ECC26064CE69C5B3177795A82264',NOW()
FROM guacamole_entity WHERE name = 'guacadmin';-- Grant this user all system permissions
INSERT INTO guacamole_system_permission (entity_id, permission)
SELECT entity_id, permission
FROM (SELECT 'guacadmin'  AS username, 'CREATE_CONNECTION'       AS permissionUNION SELECT 'guacadmin'  AS username, 'CREATE_CONNECTION_GROUP' AS permissionUNION SELECT 'guacadmin'  AS username, 'CREATE_SHARING_PROFILE'  AS permissionUNION SELECT 'guacadmin'  AS username, 'CREATE_USER'             AS permissionUNION SELECT 'guacadmin'  AS username, 'CREATE_USER_GROUP'       AS permissionUNION SELECT 'guacadmin'  AS username, 'ADMINISTER'              AS permission
) permissions
JOIN guacamole_entity ON permissions.username = guacamole_entity.name AND guacamole_entity.type = 'USER';-- Grant admin permission to read/update/administer self
INSERT INTO guacamole_user_permission (entity_id, affected_user_id, permission)
SELECT guacamole_entity.entity_id, guacamole_user.user_id, permission
FROM (SELECT 'guacadmin' AS username, 'guacadmin' AS affected_username, 'READ'       AS permissionUNION SELECT 'guacadmin' AS username, 'guacadmin' AS affected_username, 'UPDATE'     AS permissionUNION SELECT 'guacadmin' AS username, 'guacadmin' AS affected_username, 'ADMINISTER' AS permission
) permissions
JOIN guacamole_entity          ON permissions.username = guacamole_entity.name AND guacamole_entity.type = 'USER'
JOIN guacamole_entity affected ON permissions.affected_username = affected.name AND guacamole_entity.type = 'USER'
JOIN guacamole_user            ON guacamole_user.entity_id = affected.entity_id;CREATE USER 'guacamole'@'%' IDENTIFIED BY 'winring123';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole'@'%';
FLUSH PRIVILEGES;

一键执行

在ubuntu下执行如下代码,并等待执行完成。

docker-compose -f docker-compose-guacamole.yml up

访问

执行完成后即可访问地址

http://localhost:9000/guacamole/#/

相关文章:

guacamole docker一键部署脚本

前言 在我学习guacamole的过程中发现全网大致有两种方式安装guacamole的方式: 1. 直接安装(下载java环境/mysql/, 修改配置) 2. docker安装(和直接安装类似,需要下载相关环境,然后做配置) 然…...

蓝桥杯算法心得——想吃冰淇淋和蛋糕(dp)

大家好,我是晴天学长,dp题,怎么设计状态很重要,需要的小伙伴可以关注支持一下哦!后续会继续更新的。💪💪💪 1) .想吃冰淇淋和蛋糕 想吃冰淇淋与蛋糕 输入格式 第一行输入一个整数n。…...

LLM之RAG实战(二):使用LlamaIndex + Metaphor实现知识工作自动化

最先进的大型语言模型(LLM),如ChatGPT、GPT-4、Claude 2,具有令人难以置信的推理能力,可以解锁各种用例——从洞察力提取到问答,再到通用工作流自动化。然而,他们检索上下文相关信息的能力有限。…...

【容器】Docker打包Linux操作系统迁移

0x0 场景 因老服务器操作系统文centos6.5,现要迁移至uos v20 1050a(底层centos8),其中需要迁移的应用组件有: mysql 、tomcat、apachehttpd,因版本跨越太大,导致centos8直接安装无法完全恢复原…...

redis基本数据结构

Redis入门:五大数据类型 文章目录 Redis入门:五大数据类型一.概述二.Redis的基本了解三.Redis五大数据类型1.String (字符串)2.List(列表)3.Set集合(元素唯一不重复)4.Hash集合5.zSet(有序集合) 一.概述 什么是Redis Redis(Remote Dictiona…...

Learning Normal Dynamics in Videos with Meta Prototype Network 论文阅读

文章信息:发表在cvpr2021 原文链接: Learning Normal Dynamics in Videos with Meta Prototype Network 摘要1.介绍2.相关工作3.方法3.1. Dynamic Prototype Unit3.2. 视频异常检测的目标函数3.3. 少样本视频异常检测中的元学习 4.实验5.总结代码复现&a…...

Unity 关于SpriteRenderer 和正交相机缩放

float oldWidth 750f;float oldHeight 1334f;float newWidth Screen.width;float newHeight Screen.height;float oldAspect oldWidth / oldHeight;float newAspect newWidth / newHeight;//水平方向缩放float horizontalCompressionRatio newAspect / oldAspect;//垂直…...

HarmonyOS应用开发者基础认证考试(98分答案)

基于最近大家都在考这个应用开发者基础认证考试,因此出了一期,一样复制word里面搜索做,很快,当然good luck 判断题 Ability是系统调度应用的最小单元,是能够完成一个独立功能的组件。一个应用可以包含一个或多个Ability。 正确(Tr…...

Ubuntu20.04 Kimera Semantic运行记录

Ubuntu20.04 Kimera Semantic 官方bag运行记录 以下基本为官方教程,有部分修改 依赖 sudo apt-get install python3-wstool python3-catkin-tools protobuf-compiler autoconf sudo apt-get install ros-noetic-cmake-modulessudo apt-get install ros-noetic-i…...

服务器RAID系统的常见故障,结合应用场景谈谈常规的维修处理流程

常见的服务器RAID系统故障包括硬盘故障、控制器故障、电源故障、写入错误和热插拔错误。下面结合这些故障的应用场景和常规维修处理流程来详细讨论: 硬盘故障: 应用场景:在服务器RAID系统中,硬盘故障是最常见的问题之一。硬盘可能…...

计算机网络——数据链路层-封装成帧(帧定界、透明传输-字节填充,比特填充、MTU)

目录 介绍 帧定界 PPP帧 以太网帧 透明传输 字节填充(字符填充) 比特填充 比特填充习题 MTU 介绍 所谓封装成帧,就是指数据链路层给上层交付下来的协议数据单元添加帧头和帧尾,使之成为帧。 例如下图所示: …...

MySQL笔记-第03章_基本的SELECT语句

视频链接:【MySQL数据库入门到大牛,mysql安装到优化,百科全书级,全网天花板】 文章目录 第03章_基本的SELECT语句1. SQL概述1.1 SQL背景知识1.2 SQL语言排行榜1.3 SQL 分类 2. SQL语言的规则与规范2.1 基本规则2.2 SQL大小写规范 …...

FTP服务文件上传失败,错误码553的排故过程

本文主要记录文件上传失败,错误码553的排故过程。 1 背景 树莓派通过FTP给嵌入式板卡传输文件,好几套设备,发现有的能传输成功,有的传输不成功。树莓派和嵌入式板卡都一样的,出现问题时感觉很懵。 2 逐项对比 2.1 自…...

音频录制软件哪个好?帮助你找到最合适的一款

音频录制软件是日常工作、学习和创作中不可或缺的一部分。选择一个适合自己需求的录音软件对于确保音频质量和提高工作效率至关重要。可是您知道音频录制软件哪个好吗?本文将深入探讨两种常见的音频录制软件,通过详细的步骤指南,帮助您了解它…...

9.Unity搭建HTTP服务器

搭建HTTP服务器的几种方式 //1.使用别人做好的HTTP服务器软件,一般作为资源服务器时使用该方式(学习阶段建议使用) //2.自己编写HTTP服务器应用程序,一般作为Web服务器 或者 短链接游戏服务器时 使用该方式 使用别人做好的HTTP服…...

C# 热键注册工具类

写在前面 介绍一个验证过的热键注册工具类,使用系统类库user32.dll中的RegisterHotkey函数来实现全局热键的注册。 代码实现 [Flags]public enum KeyModifiers{Alt 1,Control 2,Shift 4,Windows 8,NoRepeat 0x4000}public static class HotKeyHelper{[DllImp…...

nodejs微信小程序+python+PHP天天网站书城管理系统的设计与实现-计算机毕业设计推荐

目 录 摘 要 I ABSTRACT II 目 录 II 第1章 绪论 1 1.1背景及意义 1 1.2 国内外研究概况 1 1.3 研究的内容 1 第2章 相关技术 3 2.1 nodejs简介 4 2.2 express框架介绍 6 2.4 MySQL数据库 4 第3章 系统分析 5 3.1 需求分析 5 3.2 系统可行性分析 5 3.2.1技术可行性:…...

Hive环境准备[重点学习]

1.前提启动hadoop集群 hadoop在统一虚拟机中已经配置了环境变量 启动hdfs和yarn集群 命令:start-all.sh [rootnode1 /]# start-all.sh启动mr历史服务 命令:mapred --daemon start historyserver [rootnode1 /]# mapred --daemon start historyserver检查服务 命令:jps [r…...

软件工程 室友整理

如何理解结构化需求分析方法的基本思想; 结构化分析方法是一种面向数据流的需求分析方法,其中数据作为独立实体转换,数据建模定义数据的属性和关系,操作数据的处理建模表名当做数据在系统流动时候处理如何转换数据 简述面向对象的基本概念&a…...

JVM==>图解字节码指令

一,原始代码 我们来看一下执行这段代码的具体流程 那执行这段代码中 JVM就会把已经编译好的.class文件加载到内存中,交给CPU运行 1)常量池载入运行时常量池 我们发现 10 并没有被存入常量池中, 这是因为short范围以内的数字不会…...

接口测试中缓存处理策略

在接口测试中,缓存处理策略是一个关键环节,直接影响测试结果的准确性和可靠性。合理的缓存处理策略能够确保测试环境的一致性,避免因缓存数据导致的测试偏差。以下是接口测试中常见的缓存处理策略及其详细说明: 一、缓存处理的核…...

调用支付宝接口响应40004 SYSTEM_ERROR问题排查

在对接支付宝API的时候,遇到了一些问题,记录一下排查过程。 Body:{"datadigital_fincloud_generalsaas_face_certify_initialize_response":{"msg":"Business Failed","code":"40004","sub_msg…...

java_网络服务相关_gateway_nacos_feign区别联系

1. spring-cloud-starter-gateway 作用:作为微服务架构的网关,统一入口,处理所有外部请求。 核心能力: 路由转发(基于路径、服务名等)过滤器(鉴权、限流、日志、Header 处理)支持负…...

day52 ResNet18 CBAM

在深度学习的旅程中,我们不断探索如何提升模型的性能。今天,我将分享我在 ResNet18 模型中插入 CBAM(Convolutional Block Attention Module)模块,并采用分阶段微调策略的实践过程。通过这个过程,我不仅提升…...

前端倒计时误差!

提示:记录工作中遇到的需求及解决办法 文章目录 前言一、误差从何而来?二、五大解决方案1. 动态校准法(基础版)2. Web Worker 计时3. 服务器时间同步4. Performance API 高精度计时5. 页面可见性API优化三、生产环境最佳实践四、终极解决方案架构前言 前几天听说公司某个项…...

转转集团旗下首家二手多品类循环仓店“超级转转”开业

6月9日,国内领先的循环经济企业转转集团旗下首家二手多品类循环仓店“超级转转”正式开业。 转转集团创始人兼CEO黄炜、转转循环时尚发起人朱珠、转转集团COO兼红布林CEO胡伟琨、王府井集团副总裁祝捷等出席了开业剪彩仪式。 据「TMT星球」了解,“超级…...

Frozen-Flask :将 Flask 应用“冻结”为静态文件

Frozen-Flask 是一个用于将 Flask 应用“冻结”为静态文件的 Python 扩展。它的核心用途是:将一个 Flask Web 应用生成成纯静态 HTML 文件,从而可以部署到静态网站托管服务上,如 GitHub Pages、Netlify 或任何支持静态文件的网站服务器。 &am…...

EtherNet/IP转DeviceNet协议网关详解

一,设备主要功能 疆鸿智能JH-DVN-EIP本产品是自主研发的一款EtherNet/IP从站功能的通讯网关。该产品主要功能是连接DeviceNet总线和EtherNet/IP网络,本网关连接到EtherNet/IP总线中做为从站使用,连接到DeviceNet总线中做为从站使用。 在自动…...

大学生职业发展与就业创业指导教学评价

这里是引用 作为软工2203/2204班的学生,我们非常感谢您在《大学生职业发展与就业创业指导》课程中的悉心教导。这门课程对我们即将面临实习和就业的工科学生来说至关重要,而您认真负责的教学态度,让课程的每一部分都充满了实用价值。 尤其让我…...

什么是Ansible Jinja2

理解 Ansible Jinja2 模板 Ansible 是一款功能强大的开源自动化工具,可让您无缝地管理和配置系统。Ansible 的一大亮点是它使用 Jinja2 模板,允许您根据变量数据动态生成文件、配置设置和脚本。本文将向您介绍 Ansible 中的 Jinja2 模板,并通…...