centos7上源码搭建guacamole



centos7上源码搭建guacamole
guacamole是一款开源的且基于HTML5的适合WEB终端SSH工具,
1.安装guacamole所需要的依赖库
 必需安装的库有
 yum install -y cairo-devel libjpeg-turbo-devel libpng-devel uuid-devel
 
 可选择安装的库
 yum install -y freerdp-devel pango-devel libssh2-devel libvncserver-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel

   systemctl  stop firewalld.service    # 停止防火墙
   systemctl disable firewalld.service  #禁止开机启动防火墙

2.安装配置tomcat,架设服务(先必须有JDK1.8的环境)
    /soft/tomcat-9.0.2
 
 
3. 安装guacamole
3.1 安装guacamole-server
     使用wget命令或者本地下载后使用ftp工具上传到服务器
   1. 解压 tar -xzf guacamole-server-0.9.14.tar.gz
   2. 编译安装
        cd guacamole-server-0.9.14
  ./configure --prefix=/usr/local/guacamole --with-init-dir=/etc/init.d
       ./configure --with-init-dir=/etc/init.d
  make
  make install
  ldconfig
    3.增加环境变量
    vi /etc/profile
       export GUACAMOLE_HOME=/etc/guacamole
    source /etc/profile
   
3.2 安装guacamole-client
  1. 下载客户端包guacamole-0.9.14.zip,将客户端包部署到Tomcat
     unzip -d  guacamole  guacamole-0.9.14.zip
     cpguacamole   /soft/tomcat-9.0.2/webapps/guacamole.war
3.3.安装guacamole-client

 创建配置文件夹
 mkdir -p /etc/guacamole/
 配置用户映射文件
 vi /etc/guacamole/guacamole.properties
 将文件内容改为下面的
 basic-user-mapping: /etc/guacamole/user-mapping.xml
 编写用户映射配置文件
 vi /etc/guacamole/user-mapping.xml
 在配置文件内,按下面的格式输入信息:
 <user-mapping>
  <authorize  username="admin"   password="123456">
   <!-- First authorized connection -->
   <connection name="ssh">
    <protocol>ssh</protocol>
    <param name="hostname">192.168.2.14</param>
    <param name="port">22</param>
    <param name="username">root</param>
    <param name="password">cent</param>
   </connection>

   <!-- Second authorized connection -->
   <connection name="vnc">
    <protocol>vnc</protocol>
    <param name="hostname">192.168.2.14</param>
    <param name="port">5901</param>
   <param name="username">root</param>
    <param name="password">123456</param>
   </connection>
   
     <connection name="rdp">
    <protocol>rdp</protocol>
    <param name="hostname">192.168.2.14</param>
    <param name="port">3389</param>
    <param name="username">root</param>
    <param name="password">cent</param>
    </connection>
    </authorize>
</user-mapping>
4.启动
service guacd start  #启动guacamole
/soft/tomcat-9.0.2/bin/startup.sh  #启动tomcat
#安装完成后先远程SLL登录,看是否安装成功,RDP协议需要配置。

5.被访问服务器(linux)安装xrdp:
vi /etc/yum.repos.d/xrdp.repo

[xrdp]
name=xrdp
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
enabled=1
gpgcheck=0

yum -y install xrdp tigervnc-server

#启动服务:
systemctl start xrdp.service
systemctl enable xrdp.service

#防火墙:
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload

#配置SELinux
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值