手记

BigBlueButton 在线学习平台搭建

前言

(以下安装方法只做参考,最新安装方法详见官网docs

系统:Ubuntu 12.04.4 LTS 64位

主机只能安装 Ubuntu 14.04 LTS 64位 系统,并且更新系统软件源和所有软件包,请参考网上的安装教程。

开始搭建

检查系统语言

系统语言必须设置为en_US.UTF-8,通过下面的命令查看系统语言

root@ubuntu:~# cat /etc/default/locale
LANG="en_US.UTF-8"

如果不是LANG="en_US.UTF-8",请使用下面的命令更换系统语言为en_US.UTF-8

root@ubuntu:~# apt-get install language-pack-en
root@ubuntu:~# update-locale LANG=en_US.UTF-8

然后注销当前用户,重新登录(或者直接重启主机)

再次查看系统语言,如果看到LC_ALL=en_US.UTF-8,那么一定要把LC_ALL去掉。

检查系统信息

检查系统是否为64位

root@ubuntu:~# uname -m
x86_64

检查你的系统版本

root@ubuntu:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.X LTS"

安装软件源

接下来安装PPA:libreoffice 44和libssl

root@ubuntu:~# apt-get install software-properties-common
root@ubuntu:~# add-apt-repository ppa:libreoffice/libreoffice-4-4
root@ubuntu:~# add-apt-repository -y ppa:ondrej/php

然后安装BigBlueButton的apt key,并更新系统软件包列表

root@ubuntu:~# wget http://ubuntu.bigbluebutton.org/bigbluebutton.asc -O- | apt-key add -
root@ubuntu:~# echo "deb http://ubuntu.bigbluebutton.org/trusty-1-0/ bigbluebutton-trusty main" | tee /etc/apt/sources.list.d/bigbluebutton.list
root@ubuntu:~# apt-get update

安装ffmpeg

因为BigBlueButton需要ffmpeg来合成回放文件,所以我们也需要安装它。

root@ubuntu:~# touch install-ffmpeg.sh
root@ubuntu:~# nano install-ffmpeg.sh

复制粘贴以下内容

apt-get install build-essential git-core checkinstall yasm texi2html libvorbis-dev libx11-dev libvpx-dev libxfixes-dev zlib1g-dev pkg-config netcat libncurses5-dev
FFMPEG_VERSION=2.3.3
cd /usr/local/src
if [ ! -d "/usr/local/src/ffmpeg-${FFMPEG_VERSION}" ]; then
  wget "http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2"
  tar -xjf "ffmpeg-${FFMPEG_VERSION}.tar.bz2"
fi
cd "ffmpeg-${FFMPEG_VERSION}"
./configure --enable-version3 --enable-postproc --enable-libvorbis --enable-libvpx
make
checkinstall --pkgname=ffmpeg --pkgversion="5:${FFMPEG_VERSION}" --backup=no --deldoc=yes --default

按Ctrl-O 和Enter保存文件,按Ctrl-X关闭文件,然后执行该文件

root@ubuntu:~# chmod +x install-ffmpeg.sh
root@ubuntu:~# ./install-ffmpeg.sh

这个安装过程需要耗费一段时间,当脚本执行完毕,你可以使用以下命令查看ffmpeg是否安装成功,如果安装成功,你可以看到类似以下的信息

root@ubuntu:~# ffmpeg -version
ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 18 2014 17:35:05 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-version3 --enable-postproc --enable-libvorbis --enable-libvpx
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 48.100 / 55. 48.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.100 /  4. 11.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100

开始安装BigBlueButton

前期准备工作已经完成,接下来正式开始安装BigBlueButton主程序

root@ubuntu:~# apt-get install bigbluebutton -y

如果得到类似...... Error: FreeSWITCH didn't start的错误提示,你可以忽略它

安装完毕之后,如果你想启用WebRTC音频,请执行

root@ubuntu:~# bbb-conf --enablewebrtc

然后我们对BigBlueButton做一次清理重启,让它在更好的环境下工作。你还会看到类似以下的信息,如果没有错误提示或者长时间等待,那么表示BigBlueButton工作良好。

root@ubuntu:~# bbb-conf --clean
root@ubuntu:~# bbb-conf --check
BigBlueButton Server 1.0.N (NNNN)
                    Kernel version: 3.13.0-85-generic
                      Distribution: Ubuntu 14.04.4 LTS (64-bit)
                            Memory: 7698 MB

/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
                Port test (tunnel): demo.bigbluebutton.org
                              Red5: demo.bigbluebutton.org
              useWebrtcIfAvailable: true

/opt/freeswitch/conf/sip_profiles/external.xml (FreeSWITCH)
                    websocket port: 5066
                    WebRTC enabled: true

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server name: demo.bigbluebutton.org
                              port: 80
                              port: 443 ssl
                    bbb-client dir: /var/www/bigbluebutton

/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties (bbb-web)
                      bbb-web host: demo.bigbluebutton.org

/var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp (API demos)
                               url: demo.bigbluebutton.org

/var/www/bigbluebutton/check/conf/config.xml (client check)
                      client check: demo.bigbluebutton.org

/usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml (red5)
                  voice conference: FreeSWITCH
                     capture video: true
                   capture desktop: true

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback host: demo.bigbluebutton.org


** Potential problems described below **
# Warning: The API demos are installed and accessible from:
#
#    https://demo.bigbluebutton.org/demo/demo1.jsp
#
# These API demos allow anyone to access your server without authentication
# to create/manage meetings and recordings. They are for testing purposes only.
# If you are running a production system, remove them by running:
#
#    sudo apt-get purge bbb-demo

至此,BigBlueButton在线学习平台搭建已经完成。

附 演讲者演示文稿出现乱码 解决方案

如果BigBlueButton演讲者上传的演示文稿出现乱码,请按照以下步骤进行修正。

root@ubuntu:~# cd /usr/share/fonts
root@ubuntu:/usr/share/fonts# mkdir bbb && cd bbb

把出现乱码的文字的字体从Windows系统\Windows\Fonts文件夹下复制到BigBlueButton主机的/usr/share/fonts/bbb文件夹,然后依次执行以下命令

root@ubuntu:/usr/share/fonts# mkfontscale
root@ubuntu:/usr/share/fonts# mkfontdir
root@ubuntu:/usr/share/fonts# fc-cache -fv

然后重启系统,使新安装的字体文件生效。


标签: 手记

Comments