在线会议和在线教育,是当前阶段,最热门的互联网应用。一大批在线会议与在线教育厂商,都借势大肆圈地。 但是对于一些中小企业,和个性化教学的学校,是否能用较低的成本,拥有自己的会议/教育系统呢? 开源项目Bigbluebutton是一个不错的选择。
BigblueButton(BBB)安装是比较简单的,有一个简单的安装命令,大概30分钟,就完全搞定了。当然,前提是你已经准备好环境,并且你很幸运。
本文以流水账方式,进行安装过程的记述:
准备步骤:
1. 首先,你需要有个域名。域名可以去腾讯,新网,阿里等网站购买。域名购买之后,就是实名认证和备案了。由于我是个人学习使用,只谈个人域名备案。
-我的域名在腾讯购买的
-域名要实名认证,这个是腾讯要求的
-域名需要备案授权码,在腾讯购买的域名,备案需要有腾讯的服务器在运行,或者有腾讯服务器产生的备案授权码。由于个人使用,自然没钱去开个腾讯服务器。好在某宝有授权码。
-个人备案过程,需要准备的资料很多,身份证,本人照片,本人视频验证等,还有申请备案的原因。如果一切顺利,大概3个工作日,应该可以搞定。
2. 服务器需要ICP备案,让安装BBB的服务器IP,80,8080,443,可以被互联网访问。
3. 你需要一个固定公网IP,将域名指向这个IP。我的服务器是在AWS上运行的,所以申请EIP,并将EIP绑定到EC2(需要在上面安装BBB)。
我准备的域名等信息:
bbb.bright-abc.club ----BBB server使用
turn.bright-abc.club ----TURN server使用
[email protected] ---一个假的邮箱地址,为TLS/SSL认证使用
4. 安装BBB的EC2的安全组需要开通以下端口,以提供服务
incoming traffic on the following ports: TCP/IP port 22 (for SSH) TCP/IP ports 80/443 (for HTTP/HTTPS) UDP ports in the range 16384 - 32768 (for FreeSWITCH/HTML5 client RTP streams)
5. 安装 TURN sever的安全组需要开通以下端口,以提供服务
On the TURN server, you need to have the following ports (in additon port 22) availalbe for BigBlueButton to connect (port 3478 and 443) and for the coturn to connect to your BigBlueButton server (49152 - 65535).
Ports |
Protocol |
Description |
3478 |
TCP/UDP |
coturn listening port |
443 |
TCP/UDP |
TLS listening port |
49152-65535 |
UDP |
relay ports range |
6. 操作系统准备:
BigblueButton需要使用Ubuntu 16.04 server
TURN sever 需要使用Ubuntu 18.04 server
这里解释一些,BBB是提供在线视频会议的主要功能,而作为可选项的TURN server的作用,是为了增强一些客户端UDP链接受限的场景,更好的访问BBB而设计。
Note: This step is optional, but recommended if your BigBlueButton server is publically available on the internet and will be accessed by users who may be behind restrictive firewalls. BigBlueButton normally requires a wide range of UDP ports to be available for WebRTC communication. In some network restricted sites or development environments, such as those behind NAT or a firewall that restricts outgoing UDP connections, users may be unable to make outgoing UDP connections to your BigBlueButton server. The TURN protocol is designed to allow UDP-based communication flows like WebRTC to bypass NAT or firewalls by having the client connect to the TURN server, and then have the TURN server connect to the destination on their behalf. You need a separate server (not the BigBlueButton server) to setup as a TURN server
安装步骤:
7. 如果你还没有域名,只是想感受一下BBB,一条命令,可以直接安装。
To install BigBlueButton 2.2 (no hostname or TLS/SSL certificate): wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220
以上步骤安装的,只能通过HTTP方式访问,而不能通过HTTPS。
官方文档也明确说明,没有SSL/TLS,就不能使用BBB的语音和视频功能,那么BBB也就没什么用了。官网描述如下:
Since this default use of bbb-install.sh does not configure a SSL/TLS certificate, while you can login to the server, you won't be able to share audio/video as WebRTC requires a SSL/TLS certificate.
8. 如果1~4步骤,你已经准备好。那么我们下面的安装开始了。 安装前,先看看命令帮助,有详细的解释
$ wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -h Script for installing a BigBlueButton 2.2 (or later) server in about 15 minutes. This script also supports installation of a coturn (TURN) server on a separate server. USAGE: wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- [OPTIONS] OPTIONS (install BigBlueButton): -vInstall given version of BigBlueButton (e.g. 'xenial-220') (required) -s Configure server with -e Email for Let's Encrypt certbot -x Use Let's Encrypt certbot with manual dns challenges -a Install BBB API demos -g Install Greenlight -c : Configure with coturn server at using -m Create a Symbolic link from /var/bigbluebutton to -p Use apt-get proxy at -r Use alternative apt repository (such as packages-eu.bigbluebutton.org) -d Skip SSL certificates request (use provided certificates from mounted volume) -h Print help OPTIONS (install coturn only): -c : Setup a coturn server with and (required) -e Configure email for Let's Encrypt certbot (required) OPTIONS (install Let's Encrypt certificate only): -s Configure server with (required) -e Configure email for Let's Encrypt certbot (required) -l Install Let's Encrypt certificate (required) -x Use Let's Encrypt certbot with manual dns challenges (optional) EXAMPLES: Sample options for setup a BigBlueButton server -v xenial-220 -v xenial-220 -s bbb.example.com -e [email protected] -v xenial-220 -s bbb.example.com -e [email protected] -g -v xenial-220 -s bbb.example.com -e [email protected] -g -c turn.example.com:1234324 Sample options for setup of a coturn server (on a different server) -c turn.example.com:1234324 -e [email protected] SUPPORT: Community: https://bigbluebutton.org/support Docs: https://github.com/bigbluebutton/bbb-install
9. BigBlueButton 信令(TURN)服务器的安装及配置:
$ sudo -i $ git clone https://github.com/bigbluebutton/bbb-install.git $ cd bbb-install # run below command for setup turn server ###for turn server url ### for secret access from bbb server ### for which Let's Encrypt generates ssl certificate $ ./bbb-install.sh \ -c : \ -e # for example: ### $ ./bbb-install.sh -c turn.bright-abc.club:12345678 -e [email protected]
10. 安装BBB server,同时,也可以在 BBB 应用服务器上安装 BBB Greenlight 工具,用于创建多个线上教室,并可以通过访问码对在线教室的访问进行验证,此为可选步骤:
$ sudo -i $ git clone https://github.com/bigbluebutton/bbb-install.git $ cd bbb-install # this step will take about 25 mins # setup with turn server ###for bbb server url ### for turn server url ### for secret access from bbb server ### for which Let's Encrypt generates ssl certificate $ ./bbb-install.sh \ -s \ -v xenial-220 \ -e \ -c : \ -g # for example: ### $ ./bbb-install.sh -s bbb.bright-abc.club -v xenial-220 -c turn.bright-abc.club:12345678 -e [email protected] -g
11. 上面的步骤是先git上下载脚本,再安装。另一种命令方式,直接在线运行命令,效果完全相同。
安装TURN
wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -c turn.bright-abc.club:12345678 -e [email protected]
安装BBB
wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -s bbb.bright-abc.club -e [email protected] -g
12. BBB安装完成之后,已经可以登录了。但是BBB web页面,新用户注册等,完全不受限制。很多会议等管理功能,也没有办法很好管理和限制。所以,一个管理员是必须的。
在服务器上,创建admin用户,这个用户登录之后,可以设置其他用户的注册和登录等系统状态
创建admin的命令:
#docker exec greenlight-v2 bundle exec rake user:create[""," "," ","admin"] # for example: ### docker exec greenlight-v2 bundle exec rake user:create[" "," ","QAZwsx1","admin"]
13. 使用admin登录,会看到不同的菜单
14. 进入菜单设置,可以看到,主要是server,user,roles等设置
15. 最终,你进入的会议界面
16. 你可以通过下面的按钮,语音,视频,分享桌面,上传PPT分享等
经过测试,效果还是不错的。如BBB CEO说的,这个软件就是面对50人以下的团体会议而设计。
CEO部分建议:
建议一个会议室只有50人,我们没有设计为一个会议室100或者150人以上。
bbb是可以多对多视频通话。
多个在线会议室可以同时进行,没有任何限制。
建议,安装过程中,多看看git官方文档,有很多细节,文档都有说明。本文也引用AWS Blog的命令行。
参考文档:
AWS Blog: https://aws.amazon.com/cn/blogs/china/quickly-build-an-online-teaching-platform-on-aws/
官方Github:https://github.com/bigbluebutton/bbb-install