guacamole安装指南

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,高可用系列 2核4GB
云数据库 RDS MySQL,高可用系列 2核4GB
简介: guacamole安装指南

1.介绍

Guacamole安装分为guacamole-server(服务端)用于直接连接服务器的底层,和guacamole-client(客户端)包括前端展示,包括用户,权限,连接管理,以及连接服务器的分辨率,ftp文件传输,个性化设置等业务需求的完善。

2.安装Guacamole-Server

1.安装环境

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro Rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86\_64/nux-dextop-release-0-1.el7.nux.noarch.rpm yum update -y    

2. 安装依赖

yum -y install cairo-devel libjpeg-devel libpng-devel uuid-devel yum -y install ffmpeg-devel  freerdp-devel pango-devel libssh2-devel yum -y install libtelnet-devel libvncserver-devel pulseaudio-libs-devel

yum -y install openssl-devel libvorbis-devel libwebp-devel

yum -y install freerdp-plugins

yum install cairo-devel libjpeg-turbo-devel libjpeg-devel libpng-devel uuid-devel wget gcc gcc-c++    

默认Centos没有FFmpeg软件包,我这里需要借助第三方的yum

yum install   http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

yum install ffmpeg-devel yum install libvncserver-devel freerdp1.2-devel libssh2-devel openssl-devel pango-devel libtelnet-devel pulseaudio-libs-devel libvorbis-devel libwebp-devel

安装包下载:

wget https://mirrors.tuna.tsinghua.edu.cn/apache/guacamole/1.1.0/source/guacamole-server-1.1.0.tar.gz 

解压并安装:

tar -zxvf guacamole-server-1.1.0.tar.gz mv guacamole-server-1.1.0 guacamole-server cd /usr/local/src/guacamole-server ./configure --with-init-dir=/etc/init.d  

image.png

(以上三个环境配置成功)

make && make install                  

启动 guacamole-server 使用的命令:  

service guacd restart  

(以上三个环境配置成功)

make && make install                  

启动 guacamole-server 使用的命令:  

service guacd restart

至此服务端安装完成

3. 安装Guacamole-client  

Guacamole客户端是java web应用,需要做以下准备安装:

jdk

servlet容器(tomcat)

此处省略以上环境安装步骤,请自行百度。

1.从官网https://guacamole.apache.org/releases/1.1.0/下载WEB应用(guacamole-1.1.0.war)

2.配置guacamole

# mkdir /etc/guacamole/ # cd /etc/guacamole/ # vi guacamole.properties              

guacamole.properties文本内容配置文件存储认证信息:

guacd-hostname: localhost

guacd-port:     4822

enable-websocket: true

enable-clipboard-integration: true auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider basic-user-mapping: /etc/guacamole/user-mapping.xml    

 

guacamole有2种连接管理方式,一种使用xml方式,另一种使用mysql


3.1 xml方式


/etc/guacamole/目录下创建user-mapping.xml文件:

<user-mapping>

<authorize  password="guacadmin" username="guacadmin"> <connection name="rdp-windows-15">

<protocol>rdp</protocol>          

<param name="hostname">192.168.1.15</param>

<param name="port">3389</param>          

<param name="username">admin</param>          

<param name="password">123456</param>          

<param name="ignore-cert">true</param>      

</connection>      

<connection name="ssh-192.168.1.14">

<protocol>ssh</protocol>          

<param name="hostname">192.168.1.14</param>

<param name="port">22</param>          

<param name="username">admin</param>          

<param name="password">123456</param>          

<param name="enable-sftp">true</param>          

<param name="sftp-hostname">192.168.1.14</param>

<param name="sftp-root-directory">/</param>

<param name="sftp-username">admin</param>          

<param name="sftp-password">123456</param>

</connection> </authorize></user-mapping>  

 3.复制guacamole-1.1.0.war到tomcat并启动:


# mv ./guacamole-1.1.0.war /opt/apache-tomcat-8.5.42/webapps              

启动tomcat:


 # sh /opt/apache-tomcat-8.5.42/bin/start.sh              

 

配置完成,浏览器打开地址:http://ip:port//guacamole/#/

登录账号/密码:guacadmin/guacadmin

3.2 Mysql数据库配置:

1. 创建一些目录

mkdir -p /etc/guacamole/ mkdir -p /etc/guacamole/extensions mkdir -p /etc/guacamole/lib mkdir -p /etc/guacamole/sqlauth/              

2. 在本地数据库建新的数据库guacamole_db:

下载guacamole-auth-jdbc-1..0.tar.gz解压文件\guacamole-auth-jdbc1.0.0\mysql\schema\目录下的两个.sql文件执行初始化

3. 编辑配置文件

vi /etc/guacamole/guacamole.properties

内容如下(数据库的资料需要与上文配置的参数相同):

####guacamole.properties####

guacd-hostname: localhost

guacd-port: 4822 #

user-mapping: /etc/guacamole/user-mapping.xml

# MySQL properties

mysql-hostname: localhost

mysql-port: 3306

mysql-database: guacamole_db

mysql-username: guacamole

mysql-password: guacamole

####guacamole.properties####    

4.guacmole 安装数据库扩展驱动


yum -y install java-1.8.0-openjdk* cd /etc/guacamole/sqlauth wget https://mirrors.tuna.tsinghua.edu.cn/apache/guacamole/1.1.0/binary/guacamole-auth-jdbc-1.1.0.tar.gz tar -zxvf guacamole-auth-jdbc-1.1.0.tar.gz cp guacamole-auth-jdbc-1.1.0/mysql/guacamole-auth-jdbc-mysql-1.1.0.jar /etc/guacamole/extensions/   wget http://ftp.ntu.edu.tw/MySQL/Downloads/Connector-J/mysql-connector-java-5.1.48.tar.gz tar -xzvf mysql-connector-java-5.1.48.tar.gz cp mysql-connector-java-5.1.48/mysql-connector-java-5.1.48-bin.jar /etc/guacamole/lib/  

5.重启 tomcat

配置完成,浏览器打开地址:http://ip:port//guacamole/#/

默认登录账号/密码:guacadmin/guacadmin

image.png              

相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。 &nbsp; 相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情:&nbsp;https://www.aliyun.com/product/rds/mysql&nbsp;
目录
相关文章
|
移动开发 应用服务中间件 Linux
Apache Guacamole教程之安装部署
Apache Guacamole教程之安装部署
8248 0
Apache Guacamole教程之安装部署
|
Web App开发 监控 Java
|
Ubuntu Linux KVM
分享一些OpenStack的qcow2格式实例镜像
分享一些OpenStack的qcow2格式实例镜像
13860 0
分享一些OpenStack的qcow2格式实例镜像
|
存储 SQL 大数据
带你读《Apache Doris 案例集》—— 01 招商信诺人寿 基于 Apache Doris 统一 OLAP 技术栈实践(1)
带你读《Apache Doris 案例集》—— 01 招商信诺人寿 基于 Apache Doris 统一 OLAP 技术栈实践(1)
344 0
|
NoSQL 关系型数据库 MySQL
docker部署jumpserver及入门
docker部署jumpserver及入门
|
10月前
|
监控 NoSQL 时序数据库
《docker高级篇(大厂进阶):7.Docker容器监控之CAdvisor+InfluxDB+Granfana》包括:原生命令、是什么、compose容器编排,一套带走
《docker高级篇(大厂进阶):7.Docker容器监控之CAdvisor+InfluxDB+Granfana》包括:原生命令、是什么、compose容器编排,一套带走
598 78
|
SQL 数据采集 关系型数据库
在 MySQL 中使用 CTE
【8月更文挑战第11天】
1208 0
在 MySQL 中使用 CTE
|
运维 Kubernetes 安全
推荐3个开源好用的堡垒机
【7月更文挑战第11天】
4599 0
推荐3个开源好用的堡垒机
|
存储 安全 Ubuntu
【Linux 应用开发 】Linux环境下动态链接库路径(RPATH)的调整策略
【Linux 应用开发 】Linux环境下动态链接库路径(RPATH)的调整策略
1345 1
|
Web App开发 负载均衡 安全
浏览器如何验证SSL证书及如何查看网站的证书
浏览器如何验证SSL证书及如何查看网站的证书
浏览器如何验证SSL证书及如何查看网站的证书