Guacame 安装

OpenSuse 安装 guacamole

1. 安装依赖

1.1 添加zypper源

1
zypper ar http://172.16.1.168/SLE-11-SP3-SDK-DVD-x86_64-GM-DVD1/ isoSDK
2
zypper ar  http://172.16.1.168/SLE-11-SP3-SDK-DVD-x86_64-GM-DVD2/ iosSDKsrc
3
zypper ar http://172.16.1.168/SLES-11-SP3-DVD-x86_64-GM-DVD1/ iosDVD
4
zypper ar http://172.16.1.168/SLES-11-SP3-DVD-x86_64-GM-DVD2/ iosDVDsrc

1.2 安装编译环境

1
zypper install cmake

1.3 安装依赖

1
zypper install cairo-devel libjpeg-devel libpng-devel uuid-devel pango-devel libssh2-devel  libvncserver-devel  libossp-uuid16  libpulse-devel  libvorbis-devel  libopenssl-devel xorg-x11-libSM-devel  pulseaudio-module-x11  pulseaudio-utils cups-devel libgsm-devel alsa-devel zlib-devel xmlto

1.4 可选

1
alias zp="zypper"
2
alias zpi="zypper install"
3
alias zpy="zypper install -y"

2. 安装 FFmpeg-n3.2.14

2.1 安装依赖git

####2.1.1 下载git

1
wget http://172.16.1.168/rpm_build/source/git/git-2.9.5.tar.gz

####2.1.2 编译安装git

1
./configure
2
make -j 4
3
make install

2.2 安装yasm

2.2.1 下载

1
wget http://172.16.1.168/rpm_build/source/asm/yasm-1.3.0.tar.gz

2.2.2 编译

1
./configure
2
make -j 4
3
make install

2.3 安装FFmpeg

####2.3.1 下载FFmpeg

1
wget http://172.16.1.168/rpm_build/source/FFmpeg/FFmpeg-n3.2.14.tar.gz

####2.3.2 编译安装FFmpeg

1
2
./configure
3
make -j 4
4
make install

##3 安装FreeRDP

3.1 下载FreeRDP

1
wget http://172.16.1.168/rpm_build/source/FreeRDP/FreeRDP-1.0.2.tar.gz

3.2 编译安装FreeRDP1

1
echo "pkg_check_modules(ALSA alsa)" > cmake/FindALSA.cmake
2
cmake -DCHANNEL_URBDRC=ON -DWITH_FFMPEG=OFF -DWITH_CUPS=ON -DWITH_PULSE=ON  -DWITH_GSM=ON -DCMAKE_INSTALL_PREFIX=/usr/FreeRDPx64/ .
3
make
4
make install
编译安装FreeRDP2(guacame1.1需要)

winpr/libwinpr/CMakeLists.txt

1
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
2
    #  older systems
3
    # (pre POSIX.1-2008: glibc 2.11 and earlier).
4
    add_definitions(-D_GNU_SOURCE)
5
endif()
6
7
cmake -DCHANNEL_URBDRC=ON  -DWITH_CUPS=ON -DWITH_PULSE=ON  -DWITH_GSM=ON -DCMAKE_INSTALL_PREFIX=/usr/FreeRDP2x64/ .
8
make
9
make install

3.3 FreeRDP 增加到ld

vim /etc/ld.so.conf.d/FreeRDPx64.conf

1
/usr/FreeRDPx64/lib/
FreeRDP2
1
/usr/FreeRDP2x64/lib64/
2
/usr/FreeRDP2x64/lib64/freerdp2/
3
/usr/local/lib/

4 安装 guacamole

4.1 安装 libwebp

4.1.1 下载

1
http://172.16.1.168/rpm_build/source/guacamole/libwebp-1.0.3.tar.gz

4.1.2 安装

1
./configure
2
make -j 4
3
make install

4.2 安装uuid-devel

4.2.1 下载依赖

1
wget http://172.16.1.168/rpm_build/source/guacamole/libossp-uuid%2B%2B16-1.6.2-7.1.x86_64.rpm
2
wget http://172.16.1.168/rpm_build/source/guacamole/libossp-uuid16-1.6.2-7.1.x86_64.rpm
3
wget http://172.16.1.168/rpm_build/source/guacamole/libossp-uuid_dce16-1.6.2-7.1.x86_64.rpm
4
wget http://172.16.1.168/rpm_build/source/guacamole/libuuid-devel-2.19.1-6.29.3.x86_64.rpm
5
wget http://172.16.1.168/rpm_build/source/guacamole/uuid-devel-1.6.2-7.1.x86_64.rpm

4.2.2 安装依赖

1
zypper install libossp-uuid16-1.6.2-7.1.x86_64.rpm
2
zypper install libossp-uuid_dce16-1.6.2-7.1.x86_64.rpm
3
zypper install libossp-uuid++16-1.6.2-7.1.x86_64.rpm
4
zypper install uuid-devel-1.6.2-7.1.x86_64.rpm

4.3 安装libtelnet

####4.3.1 下载libtelnet

1
wget http://172.16.1.168/rpm_build/source/guacamole/libtelnet-0.23.tar.gz

4.3.2 编译安装libtelnet

1
./configure
2
make -j 4
3
make install

4.4 安装libjpeg

4.4.1 下载 libjpeg

1
wget http://172.16.1.168/rpm_build/source/guacamole/libjpeg-turbo-official-2.0.3.x86_64.rpm

4.4.1 安装 libjpeg

1
zypper install libjpeg-turbo-official-2.0.3.x86_64.rpm

4.5 安装 guacamole

2.5.5.1 下载guacamole

1
wget http://172.16.1.168/rpm_build/source/guacamole/guacamole-server-1.0.0.tar.gz

2.5.5.2 安装 guacamole 1.0

1
export LD_LIBRARY_PATH=/usr/FreeRDPx64/lib/
2
export C_INCLUDE_PATH=/usr/FreeRDPx64/include/
3
export CFLAGS=-L/usr/FreeRDPx64/lib/
4
./configure --with-init-dir=/etc/init.d  --disable-guacenc 
5
make -j 4
6
make install
7
# 磁盘映射
8
ln -sn /usr/local/lib/freerdp/guacsnd.so /usr/FreeRDPx64/lib/freerdp/
9
ln -sn /usr/local/lib/freerdp/guacdr.so /usr/FreeRDPx64/lib/freerdp/
10
11
rm -f /usr/FreeRDPx64/lib/freerdp/guacsnd.so
12
rm -f /usr/FreeRDPx64/lib/freerdp/guacdr.so
安装gucamole1.1
1
export CFLAGS=" -D_GNU_SOURCE"
2
export PKG_CONFIG_PATH=/usr/FreeRDP2x64/lib64/pkgconfig:$PKG_CONFIG_PATH
3
./configure --with-init-dir=/etc/init.d  --disable-guacenc 
4
make -j 4
5
make install
6
7
# 官方给出的指定freerdp的位置
8
#./configure --with-init-dir=/etc/init.d  --with-freerdp-plugins-dir=/usr/FreeRDP2x64/lib64/freerdp2/ --disable-guacenc

5 安装 guacamole-client

5.1 安装jdk

5.1.1下载 jdk

1
mkdir /usr/java/
2
cd /usr/java/
3
wget http://172.16.1.168/rpm_build/source/guacamole/jdk-8u101-linux-x64.tar.gz

####5.1.2 安装jdk

1
tar -xvf jdk-8u101-linux-x64.tar.gz
2
ln -s jdk1.8.0_101/ jdk

####5.1.3 添加环境变量

1
export JAVA_HOME=/usr/java/jdk
2
export JRE_HOME=${JAVA_HOME}/jre
3
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
4
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
5
export PATH=$PATH:${JAVA_PATH}

安装client

1
/usr/java/apache-tomcat-8.5.50/webapps
2
wget http://172.16.1.168/rpm_build/source/guacamole/guacamole-1.0.0.war

5.1.4 安装扩展

1
mkdir  -p /etc/guacamole/extensions
2
cd /etc/guacamole/extensions/
3
wget http://172.16.1.168/rpm_build/source/guacamole/guacamole-auth-quickconnect-1.0.0/guacamole-auth-quickconnect-1.0.0.jar

6 配置文件

6.1 添加guacamole.properties配置文件

vi /etc/guacamole/guacamole.properties

1
guacd-hostname: localhost
2
guacd-port: 4822
3
enable-clipboard-integration: true

6.2 配置user-mapping.xml

vi /etc/guacamole/user-mapping.xml

1
2
<user-mapping>
3
<authorize username="admin" password="1" >
4
        <connection name="10.10.10.26">
5
                <protocol>rdp</protocol>
6
                <param name="hostname">10.10.10.26</param>
7
                <param name="port">3389</param>
8
                <param name="username">su</param>
9
                <param name="password">su123456</param>
10
                <param name="resize-method">display-update</param>
11
                <param name="enable-drive">true</param>
12
                <param name="drive-path">/tmp/upload/</param>
13
                <param name="ignore-cert">true</param>
14
        </connection>
15
        <connection name="10.10.50.88">
16
                <protocol>ssh</protocol>
17
                <param name="hostname">10.10.50.88</param>
18
                <param name="port">22</param>
19
                <param name="username">su</param>
20
                <param name="password">su123456</param>
21
                <param name="color-scheme">white-black</param>
22
                <param name="enable-sftp">true</param>
23
        </connection>
24
</authorize>
25
</user-mapping>

###6.3 添加环境变量

1
export GUACAMOLE_HOME=/etc/guacamole
2
source /etc/profile

7. 注意事项

编译完成后执行ldconfig

win10以上使用需要关闭 NLA

1
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
2
Change “SecurityLayer” value to 1
3
Verify “UserAuthentication” value is 0

8.参考文档

[1]. Configuring Guacamole

[2]. Installing Guacamole natively

[3]. Linux头文件和库的搜索路径

[4]. linux动态链接库的加载顺序:

[5]. 动态库的链接和链接选项-L,-rpath-link,-rpath

[6]. Guacamole Troubleshooting