一、安装依赖
Guacamole 分两部分:
- guacamole-server (guacd):本地代理进程
- guacamole-client (Web 前端):Tomcat 里运行的
guacamole.war
先安装编译依赖和运行依赖:
sudo pacman -S guacd
二、安装 guacamole-server
Arch 官方仓库自带:
pacman -S guacd
启动并设置开机自启:
sudo systemctl enable --now guacd
检查:
systemctl status guacd
三、安装 guacamole-client (Web 前端)
安装 Tomcat:
sudo pacman -S tomcat9
下载 Web 应用包(继承jdbc认证):
wget https://downloads.apache.org/guacamole/1.5.5/binary/guacamole-1.5.5.war -O guacamole.war
sudo mv guacamole.war /var/lib/tomcat9/webapps/guacamole.war
启动 Tomcat:
sudo systemctl enable --now tomcat9
四、配置 Guacamole
创建配置目录:
sudo mkdir -p /etc/guacamole
主配置文件 /etc/guacamole/guacamole.properties
guacd-hostname: localhost
guacd-port: 4822
auth-provider: net.sourceforge.guacamole.net.auth.mysql.MySQLAuthenticationProvider
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole
mysql-username: guacamole
mysql-password: strongpassword
让 Tomcat 能找到配置
ln -s /etc/guacamole/guacamole.properties /etc/guacamole.properties
mkdir -p /usr/share/tomcat9/.guacamole/{extensions,lib}
ln -sf /etc/guacamole/guacamole.properties /usr/share/tomcat9/.guacamole/guacamole.properties
cp guacamole-auth-jdbc-mysql-1.6.0.jar /usr/share/tomcat9/.guacamole/extensions
cp mysql-connector-j-8.4.0.jar /usr/share/tomcat9/.guacamole/lib
重启服务
sudo systemctl restart guacd
sudo systemctl restart tomcat9
访问
http://<服务器IP>:8080/guacamole
输入 guacaadmin / guaca
admin
登录,点击你配置的 VNC 或 RDP 连接,即可进入远程桌面。