ubuntu20.04安装guacamole server 1.3

2022-06-29 11:45:05 浏览数 (1)

2022-04-29 55

简介: ubuntu20.04安装guacamole server 1.3

  1. 更新package
代码语言:javascript复制
apt update
apt upgrade -y
  1. 安装依赖包
代码语言:javascript复制
apt install build-essential libcairo2-dev libjpeg-turbo8-dev 
    libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev 
    freerdp2-dev libssh2-1-dev libtelnet-dev libwebsockets-dev 
    libpulse-dev libvorbis-dev libwebp-dev libssl-dev 
    libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev 
    libavformat-dev
  1. 下载guacamole 1.3 源码包
代码语言:javascript复制
cd /opt
wget https://downloads.apache.org/guacamole/1.3.0/source/guacamole-server-1.3.0.tar.gz
  1. 解压文件
代码语言:javascript复制
tar -xvf guacamole-server-1.3.0.tar.gz
cd guacamole-server-1.3.0
  1. 开始编译
代码语言:javascript复制
./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots
make
make install
  1. 更新lib并重新加载systemd服务
代码语言:javascript复制
ldconfig
systemctl daemon-reload
  1. 启动服务
代码语言:javascript复制
systemctl start guacd
systemctl enable guacd
  1. 创建一个目录来存放guacamole配置文件和扩展。
代码语言:javascript复制
mkdir -p /etc/guacamole/{extensions,lib}
  1. 开始安装guacamole web app。需要先安装apache tomcat
代码语言:javascript复制
apt install tomcat9 tomcat9-admin tomcat9-common tomcat9-user
  1. 下载guacamole client
代码语言:javascript复制
wget https://downloads.apache.org/guacamole/1.3.0/binary/guacamole-1.3.0.war
  1. 拷贝客户端到tomcat web目录
代码语言:javascript复制
mv guacamole-1.3.0.war /var/lib/tomcat9/webapps/guacamole.war
  1. 重启tomcat和guacd服务
代码语言:javascript复制
systemctl restart tomcat9 guacd
  1. **开始配置数据库。**先安装mariadb
代码语言:javascript复制
apt install mariadb-server -y
  1. 初始化数据库
代码语言:javascript复制
mysql_secure_installation
  1. 初始化后,在连接前,需要安装mysql connector和guacamole jdbc插件
代码语言:javascript复制
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.26.tar.gz
tar -xf mysql-connector-java-8.0.26.tar.gz
cp mysql-connector-java-8.0.26/mysql-connector-java-8.0.26.jar /etc/guacamole/lib/
  1. 下载jdbc身份验证插件
代码语言:javascript复制
wget https://downloads.apache.org/guacamole/1.3.0/binary/guacamole-auth-jdbc-1.3.0.tar.gz
tar -xf guacamole-auth-jdbc-1.3.0.tar.gz
mv guacamole-auth-jdbc-1.3.0/mysql/guacamole-auth-jdbc-mysql-1.3.0.jar /etc/guacamole/extensions/
  1. 登录mysql,创建数据库
  2. 完成后退出,到jdbc插件目录下的schema目录里
代码语言:javascript复制
  1. 导入sql schema文件到数据库
代码语言:javascript复制
cat *.sql | mysql -u root -p guacamole_db
  1. 创建properties文件
代码语言:javascript复制
vim /etc/guacamole/guacamole.properties

添加下述信息到文件内

代码语言:javascript复制
mysql-hostname: 127.0.0.1
mysql-port: 3306
mysql-database: guacamole_db
mysql-username: guacamole_user
mysql-password: [password]
  1. 重启服务
代码语言:javascript复制
systemctl restart tomcat9 guacd mysql
  1. 访问

http://:8080/guacamole

0 人点赞