Apache Guacamole 是一个基于 HTML5 的远程桌面网关,支持 VNC、RDP 和 SSH 等标准协议。
一.官方链接
1. 官方文档
https://guacamole.apache.org/doc/gug/guacamole-architecture.html
2. 项目位置:
https://guacamole.apache.org/
https://gitcode.com/gh_mirrors/gua/guacamole-server
二.安装
1. 安装依赖
yum install -y cairo-devel libjpeg-turbo-devel libpng-devel uuid-devel yum install -y ffmpeg ffmpeg-devel openssl openssl-devel yum install -y freerdp freerdp-devel freerdp-plugins pango-devel libssh2-devel yum install -y libtelnet-devel libvncserver-devel pulseaudio-libs-devel yum install -y libvorbis-devel libwebp-devel yum install -y libwebsockets-devel gnu-free-mono-fonts<br>yum -y install gcc-c++
2. 安装java和tomcat,mysql
# 安装 java yum install java-11-openjdk java-11-openjdk-devel ls -l $(which java) ls -lrt /etc/alternatives/java vi /etc/profile export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.el7_9.x86_64 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATHsource /etc/profile echo $JAVA_HOME# 安装tomcat yum install -y tomcat tomcat-webapps tomcat-admin-webapps systemctl enable tomcat systemctl start tomcat#安装mysql服务 yum install mysql-server systemctl enable mysqld systemctl start mysqld#配置mysql mysql -u root -p CREATE DATABASE guacamole_db; CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost'; FLUSH PRIVILEGES; show databases; show tables from guacamole_db; show grants for guacamole_user@localhost; exit
2. 下载项目
wget https://dlcdn.apache.org/guacamole/1.5.5/source/guacamole-server-1.5.5.tar.gz
3. 解压后,编译安装服务端(有报错看 无数据库版解决)
tar zxvf guacamole-server-1.5.5.tar.gz cd guacamole-server-1.5.5 ./configure make -j4 make installldconfig export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
4. 添加配置文件
# 文件1
vim /etc/guacamole/guacamole.properties
# Hostname and port of guacamole proxy guacd-hostname:127.0.0.1 guacd-port: 4822mysql-hostname: localhost mysql-port: 3306 mysql-database: guacamole_db mysql-username: guacamole_user mysql-password: your_password
# 文件2,3(直接下载就行)
/etc/guacamole/extensions/guacamole-auth-jdbc-mysql.jar
/etc/guacamole/lib/mysql-connector-java.jar
# 文件2 wget https://downloads.apache.org/guacamole/1.5.3/binary/guacamole-auth-jdbc-1.5.3.tar.gz tar zxvf guacamole-auth-jdbc-1.5.3.tar.gz cp ./guacamole-auth-jdbc-1.5.3/sqlserver/guacamole-auth-jdbc-sqlserver-1.5.3.jar /etc/guacamole/extensions/guacamole-auth-jdbc-mysql.jar# 文件3 wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.28.tar.gz tar zxvf mysql-connector-java-8.0.28.tar.gz cp ./guacamole-auth-jdbc-1.5.3/sqlserver/guacamole-auth-jdbc-sqlserver-1.5.3.jar /etc/guacamole/lib/mysql-connector-java.jar
5. 安装前端
# 下载guacamole-1.5.5.war文件 wget https://dlcdn.apache.org/guacamole/1.5.5/binary/guacamole-1.5.5.war# 复制解压 cp /root/guacamole-1.5.5.war /var/lib/tomcat/webapps/guacamole.war# 重启tomcat生效 systemctl restart tomcat
6.启动 guacd
/usr/local/sbin/guacd -b 0.0.0.0 -f &> /var/log/guacd.log &
7. 访问
http://xxxx:8080/guacamole/#/