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范围以内的数字不会…...

7.4.分块查找
一.分块查找的算法思想: 1.实例: 以上述图片的顺序表为例, 该顺序表的数据元素从整体来看是乱序的,但如果把这些数据元素分成一块一块的小区间, 第一个区间[0,1]索引上的数据元素都是小于等于10的, 第二…...
将对透视变换后的图像使用Otsu进行阈值化,来分离黑色和白色像素。这句话中的Otsu是什么意思?
Otsu 是一种自动阈值化方法,用于将图像分割为前景和背景。它通过最小化图像的类内方差或等价地最大化类间方差来选择最佳阈值。这种方法特别适用于图像的二值化处理,能够自动确定一个阈值,将图像中的像素分为黑色和白色两类。 Otsu 方法的原…...

C# 类和继承(抽象类)
抽象类 抽象类是指设计为被继承的类。抽象类只能被用作其他类的基类。 不能创建抽象类的实例。抽象类使用abstract修饰符声明。 抽象类可以包含抽象成员或普通的非抽象成员。抽象类的成员可以是抽象成员和普通带 实现的成员的任意组合。抽象类自己可以派生自另一个抽象类。例…...

《基于Apache Flink的流处理》笔记
思维导图 1-3 章 4-7章 8-11 章 参考资料 源码: https://github.com/streaming-with-flink 博客 https://flink.apache.org/bloghttps://www.ververica.com/blog 聚会及会议 https://flink-forward.orghttps://www.meetup.com/topics/apache-flink https://n…...

让AI看见世界:MCP协议与服务器的工作原理
让AI看见世界:MCP协议与服务器的工作原理 MCP(Model Context Protocol)是一种创新的通信协议,旨在让大型语言模型能够安全、高效地与外部资源进行交互。在AI技术快速发展的今天,MCP正成为连接AI与现实世界的重要桥梁。…...
【C++从零实现Json-Rpc框架】第六弹 —— 服务端模块划分
一、项目背景回顾 前五弹完成了Json-Rpc协议解析、请求处理、客户端调用等基础模块搭建。 本弹重点聚焦于服务端的模块划分与架构设计,提升代码结构的可维护性与扩展性。 二、服务端模块设计目标 高内聚低耦合:各模块职责清晰,便于独立开发…...

视频行为标注工具BehaviLabel(源码+使用介绍+Windows.Exe版本)
前言: 最近在做行为检测相关的模型,用的是时空图卷积网络(STGCN),但原有kinetic-400数据集数据质量较低,需要进行细粒度的标注,同时粗略搜了下已有开源工具基本都集中于图像分割这块,…...
【Go语言基础【13】】函数、闭包、方法
文章目录 零、概述一、函数基础1、函数基础概念2、参数传递机制3、返回值特性3.1. 多返回值3.2. 命名返回值3.3. 错误处理 二、函数类型与高阶函数1. 函数类型定义2. 高阶函数(函数作为参数、返回值) 三、匿名函数与闭包1. 匿名函数(Lambda函…...
Vite中定义@软链接
在webpack中可以直接通过符号表示src路径,但是vite中默认不可以。 如何实现: vite中提供了resolve.alias:通过别名在指向一个具体的路径 在vite.config.js中 import { join } from pathexport default defineConfig({plugins: [vue()],//…...

淘宝扭蛋机小程序系统开发:打造互动性强的购物平台
淘宝扭蛋机小程序系统的开发,旨在打造一个互动性强的购物平台,让用户在购物的同时,能够享受到更多的乐趣和惊喜。 淘宝扭蛋机小程序系统拥有丰富的互动功能。用户可以通过虚拟摇杆操作扭蛋机,实现旋转、抽拉等动作,增…...