一、更新apt源

apt update
apt upgrade

二、安装依赖环境

apt install make gcc g++ libcairo2-dev libjpeg-turbo8-dev libpng-dev libtool-bin libossp-uuid-dev libavcodec-dev libavutil-dev libswscale-dev freerdp2-dev libpango1.0-dev libssh2-1-dev libvncserver-dev libtelnet-dev libssl-dev libvorbis-dev libwebp-dev -y

三、安装tomcat9

apt install tomcat9 -y apt install tomcat9-admin tomcat9-common tomcat9-user -y 
#运行tomcat9
systemctl start tomcat9 systemctl enable tomcat9

四、下载guacamole服务端包,并解压安装

tar -zxvf guacamole-server-1.4.0.tar.gz cd guacamole-server-1.4.0 ./configure --with-init-dir=/etc/init.d make make install ldconfig systemctl enable guacd systemctl start guacd

五、下载安装guacamole客户端.war包

mkdir /etc/guacamole
#将客户端war包放到/etc/guacamole里并重命名
mv guacamole-1.4.0.war /etc/guacamole/guacamole.war
#创建软链接,类似于windows的超级链接
ln -s 源文件 目标文件
ln -s /etc/guacamole/guacamole.war /var/lib/tomcat9/webapps/
systemctl restart tomcat9.service
systemctl restart guacd.service

六、配置guacamole项目

在/etc/guacamole中创建guacamole.properties

vim /etc/guacamole/guacamole.properties

写入以下内容:
guacd-hostname: localhost
guacd-port: 4822
user-mapping: /etc/guacamole/user-mapping.xml

创建新文件夹
mkdir /etc/guacamole/{extensions,lib}

配置guacamole在tomcat内的默认路径
sh -c "echo 'GUACAMOLE_HOME=/etc/guacamole' >> /etc/default/tomcat9"

生成md5加密密码 #可忽略,下面自定义
echo -n mypassword | openssl md5
(stdin)= fb986e53b9a89e8f102e105c3e311f43

创建并编辑user-mapping.xml
vim /etc/guacamole/user-mapping.xml

填入以下内容:
<user-mapping>
        <authorize username="test" password="admin123">
                <connection name="click below">
                </connection>
                <connection name="Wireless Client">
                        <protocol>rdp</protocol>
                        <param name="hostname">192.168.219.133</param>
                        <param name="security">NLA</param>
                        <param name="ignore-cert">true</param>
                        <param name="port">3389</param>
                        <param name="username">admin</param>
                        <param name="password">admin</param>
                        <param name="enable-wallpaper">true</param>
                </connection>
        </authorize>
</user-mapping>
~

Apache Guacamole
test/admin123

最后修改:2024 年 09 月 20 日
如果觉得我的文章对你有用,请随意赞赏