当前位置: 首页 > 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范围以内的数字不会…...

MISRA C 2012 标准浅析

MISRA(The Motor Industry Software Reliability Association),汽车工业软件可靠性联会; 1994年,英国成立。致力于协助汽车厂商开发安全可靠的软件的跨国协会,其成员包括:AB汽车电子、罗孚汽车、宾利汽车、福特汽车、捷…...

Redis高可用之Sentinel哨兵模式

一、背景与简介 Redis关于高可用与分布式有三个与之相关的运维部署模式。分别是主从复制master-slave模式、哨兵Sentinel模式以及集群Cluster模式。 这三者都有各自的优缺点以及所应对的场景、对应的业务使用量与公司体量。 1、主从master-slave模式 【介绍】 这种模式可以采用…...

AI “自主运行”的计算机概念正逐渐成为现实

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗?订阅我们的简报,深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同,从行业内部的深度分析和实用指南中受益。不要错过这个机会,成为AI领…...

数据库系统概论期末经典大题讲解(用关系代数进行查询)

今天也是结束的最为密集的考试周,在分析过程中自己也有些许解题的感悟,在此分享出来,希望能帮到大家期末取得好成绩。 一.专门的关系运算 1.选择(σ) 选择操作符用于从关系中选择满足特定条件的元组 例如,…...

算法通关村第十六关-黄金挑战滑动窗口与堆的结合

大家好我是苏麟 , 今天带来一道小题 . 滑动窗口最大值 描述 : 给你一个整数数组 nums,有一个大小为 k 的滑动窗口从数组的最左侧移动到数组的最右侧。你只可以看到在滑动窗口内的 k 个数字。滑动窗口每次只向右移动一位。 返回 滑动窗口中的最大值 。 题目 : …...

基于jsp的搜索引擎

摘 要 随着互联网的不断发展和日益普及,网上的信息量在迅速地增长,在2004年4月,全球Web页面的数目已经超过40亿,中国的网页数估计也超过了3亿。 目前人们从网上获得信息的主要工具是浏览器,搜索引擎在网络中占有举足轻…...

【Altium designer 20】

Altium designer 20 1. Altium designer 201.1 原理图库1.1.1 上划岗 在字母前面加\在加字母1.1.2 自定义快捷键1.1.3 对齐1.1.4 在原有的电路图中使用封装1.1.5 利用excel创建IC类元件库1.1.6 现有原理图库分类以及调用1.1.7 现有原理图库中自动生成原理图库 1.2 绘制原理图1.…...

Proteus仿真--基于1602LCD与DS18B20设计的温度报警器

本文介绍基于1602LCD与DS18B20设计的温度报警器设计(完整仿真源文件及代码见文末链接) 仿真图如下 其中温度传感器选用DS18B20器件,主要用于获取温度数据并上传,温度显示1602LCD液晶显示器,报警模块选用蜂鸣器&#…...

Clickhouse Join

ClickHouse中的Hash Join, Parallel Hash Join, Grace Hash Join https://www.cnblogs.com/abclife/p/17579883.html https://clickhouse.com/blog/clickhouse-fully-supports-joins-full-sort-partial-merge-part3 总结 本文描述并比较了ClickHouse中基于内存哈希表的3种连接…...

Arduino驱动STS35数字温度传感器(温湿度传感器)

目录 1、传感器特性 2、硬件原理图 3、控制器和传感器连线图 4、驱动程序 STS35瑞士Sensirion公司新推出的温度传感器,STS35提供了一个完全校准、线性和供电电压补偿的数字输出&...

吴中公司网站建设找哪家/各大免费推广网站

3.9 闲聊数据类型 字符串: 单引号 双引号 三引号 数值: 整数 浮点 布尔 复数类型3.9.1 整型(整数) Python3的整型和长整型无缝结合 不再区分 长度取决于内存 优点-利于大数计算3.9.2 浮点型(小数) 科学记数法 E记法 也可以是e 源码…...

网站后台怎样批量上传/搜索指数查询平台

开源连接: 当用svg绘制地图的时候用到的绘制数据: http://datav.aliyun.com/tools/atlas/#&lat33.50475906922609&lng104.2822265625&zoom4 json 在线转换,格式化 https://www.json.cn/...

百度网盟有哪些网站/google浏览器官网

jquery 对 Json 的各种遍历 概述: JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式,采用完全独立于语言的文本格式,是理想的数据交换格式。同时,JSON是 JavaScript 原生格式,这意味着在 JavaScript 中…...

环保网站建设/北京网站建设公司报价

使用mybatis标签规避空where一、where标签案例1、原始sql2、简单if标签判断是否为空3、使用where标签后逻辑代码二、Select注解中当参数为空则不添加该参数的判断一、where标签案例 List<FilterUsersListQueryResDTO> filterUsers(Param("filterUsersQueryDTO"…...

wordpress 文章索引/无锡seo公司

这是一个允许您流式传输子流程输出的解决方案。事后使用相同的模板静态加载它(假设您的子进程将其自己的输出记录到文件中;如果没有&#xff0c;则将进程输出记录到日志文件中留给读者练习)from flask import Response, escapefrom yourapp import appfrom subprocess import P…...

网站分类标准/百度关键词竞价

本文讲的是我的碎碎念&#xff1a;Docker入门指南&#xff0c;【编者的话】之前曾经翻译过很多Docker入门介绍的文章&#xff0c;之所以再翻译这篇&#xff0c;是因为Anders的角度很独特&#xff0c;思路也很调理。你也可以看下作者的演讲稿《Docker&#xff0c; DevOps的未来》…...