bbb-install安裝指南

bbb-install

bbb-install.sh 是一個shell腳本,它自動執行設置了BigBlueButton 2.2服務器的分步安裝

只需要幾個參數,bbb-install.sh就可以在30分鐘內設置並準備好使用BigBlueButton服務器(取決於您的服務器下載和安裝包的網絡速度)。

例如,給定一個有公共IP地址的Ubuntu 16.04 64位服務器,安裝/更新到最新版本的BigBlueButton2.2,通過SSH登錄到服務器,先以root身份運行以下命令:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -a

該命令將下拉最新版本的bbb-install.sh,將其發送到BASH shell解釋器,並傳遞參數-v xenia -22,該參數指定希望安裝最新版本的BigBlueButton 2.2.N,-a指定想要安裝API演示(這使得在服務器上進行一些快速測試變得很容易)。

注意:如果您的服務器位於防火牆之後(如企業防火牆之後或AWS安全組之後),那麼在啓動客戶端之前,您需要手動確定防火牆,以便將特定的internet連接轉發到BigBlueButton服務器。

bbb-install.sh完成時,您將看到一條消息,該消息向您提供一個測試URL,以啓動BigBlueButton客戶端並加入一個名爲“Demo meeting”的會議。

# Warning: The API demos are installed and accessible from:
#
#    http://xxx.xxx.xxx.xxx
#
# and
#
#    http://xxx.xxx.xxx.xxx/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  

當您打開URL時,您應該會看到一個登錄來加入 Demo Meeting

在這裏插入圖片描述
輸入您的名字並單擊Join。BigBlueButton客戶機應該在瀏覽器中加載並提示您加入音頻。

在這裏插入圖片描述
點擊[x]跳過加入音頻。爲什麼?使用上面的命令,BigBlueButton服務器被配置爲只使用一個IP地址(沒有安全性),因此,瀏覽器將阻止對webcam和麥克風的訪問。

對於BigBlueButton的生產設置,服務器需要使用傳輸級別安全性(transport level security, TLS)爲web頁面提供服務。換句話說,您只能通過HTTP(未加密)而不是HTTPS(加密)訪問此服務器,因爲服務器當前缺乏爲服務器主機名配置的安全套接字級別(SSL)證書。

沒有TLS/SSL支持,瀏覽器將不允許通過內置實時通信(WebRTC)庫訪問用戶的webcam或麥克風。

bbb-install.sh 可以自動請求TLS/SSL證書(來自Let’s Encrypt),並配置BigBlueButton服務器以使用該證書。下面幾節將向您展示如何進行。

準備

在運行bbb-install.sh之前,我們強烈建議您:

  • 通讀此頁中的所有文檔
  • 確保您的服務器滿足最小的服務器需求
  • 解析到服務器的外部IP地址的完全限定域名(FQDN),如bbb.example.com

要設置FQDN,您需要從域名系統(DNS)提供商(如GoDaddyNetwork Solutions)購買一個域名。一旦購買,您將使用DNS提供商提供的web工具創建A Record ,該記錄解析爲您的BigBlueButton服務器的公共IP地址。(有關如何設置A Record 的詳細信息,請查看DNS提供商的文檔。)

有了FQDN域名的地方,你可以傳遞一些額外的參數給bbb-install.sh來擁有它:

  • 請求並安裝來自Let’s Encrypt(我們喜歡Let’s Encrypt)的4096位TLS/SSL證書(可選)
  • 安裝和配置Greenlight,爲用戶提供一個簡單的前端,使他們能夠設置房間、舉行在線會議和管理記錄。(Greenlight還允許管理員在Greenlight中管理用戶帳戶)。

一旦BigBlueButton服務器配置了TLS/SSL證書,您的用戶就可以使用FireFox和Chrome(推薦的瀏覽器)通過WebRTC在BigBlueButton會話中訪問和共享他們的音頻、視頻和屏幕。

這裏有bbb-install.sh完整源代碼。爲了讓任何人都可以輕鬆地使用單個命令運行腳本,我們在https://ubuntu.bigbluebutton.org/bbb.install.sh上託管腳本的最新版本。

選擇服務器

有很多可以提供你虛擬專用服務器託管公司BigBlueButton運行。我們在下面列出了一些流行的選擇。注意:我們在這裏沒有做任何推薦,只是列出了一些更受歡迎的選擇。

爲了快速安裝,Digital Ocean提供了兩個虛擬服務器,一個是ubuntu16.04 64位,另一個是一個公共IP地址(沒有防火牆)。Hetzner提供單一IP地址的專用服務器。

其他流行的選擇,如ScaleWay(選擇Bare Metal或Pro servers )和谷歌計算引擎,提供了設置在網絡地址轉換(NAT)之後的服務器。也就是說,它們都有一個內部和外部IP地址。在這些服務器上安裝時,bbb-install.sh將檢測內部/外部地址並相應地配置BigBlueButton。

另一個流行的選擇是亞馬遜彈性計算雲。我們推薦c5.xlarge(或更大)實例。默認情況下,所有EC2服務器都位於防火牆之後(Amazon稱之爲安全組)。在EC2上安裝BigBlueButton之前,您需要手動確定安全組,在Azure和谷歌計算引擎(GCE)上以類似的方式安裝BigBlueButton。(請參見下一節的屏幕截圖。)

最後,如果bbb-install.sh無法在NAT之後配置服務器,我們建議按步驟安裝BigBlueButton。(完成這些步驟也是瞭解BigBlueButton如何工作的好方法)。

配置防火牆

如果你想在防火牆後的服務器上安裝BigBlueButton,比如Amazon的EC2安全組,你首先需要確定防火牆轉發下列端口的傳入流量:

  • TCP/IP端口 22(用於SSH)
  • TCP/IP 端口 80/443(用於 HTTP/HTTPS)
  • UDP端口,範圍16384 - 32768(用於FreeSWITCH/HTML5客戶端RTP流)

如果您正在使用EC2,您還應該爲服務器分配一個彈性IP地址,以防止它在重新啓動時獲得新的IP地址。

在Microsot Azure上,創建實例時,需要添加以下入站端口規則,以便在端口80、443和UDP端口範圍16384-32768上啓用入站連接:

[外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳(img-vUxpmZWy-1589724453424)(assets/azure-firewall.png)]

在谷歌計算引擎上,當您創建實例時,您需要啓用端口80和443。

[外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳(img-QGFtQOmt-1589724453430)(assets/gce-80-443.png)]

創建實例之後,您需要添加一個防火牆規則,以允許端口範圍爲16384-32768的傳入UDP通信。

[外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳(img-jsuSgipp-1589724453439)(assets/gce-firewall.png)]

安裝視頻

以 Digital Ocean 爲例,我們把這個視頻放在一起,讓你快速上手:使用bbb-install.sh在Digital Ocean 上設置BigBlueButton。

使用Amazon EC2,請參閱在EC2上使用bbb-install.sh進行安裝

命令選項

您可以通過傳遞-h選項來獲得幫助。

$ wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -h
Installer script for setting up a BigBlueButton 2.2 server.

This script also supports installation of a separate coturn (TURN) server on a separate server.

USAGE:
    bbb-install.sh [OPTIONS]

OPTIONS (install BigBlueButton):

  -v <version>           Install given version of BigBlueButton (e.g. 'xenial-22') (required)

  -s <hostname>          Configure server with <hostname>
  -e <email>             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 <hostname>:<secret> Configure with coturn server at <hostname> using <secret>

  -p <host>              Use apt-get proxy at <host>

  -r <host>              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):

  -c <hostname>:<secret> Configure coturn with <hostname> and <secret> (required)
  -e <email>             Email for Let's Encrypt certbot (required)


EXAMPLES

Setup a BigBlueButton server

    ./bbb-install.sh -v xenial-22
    ./bbb-install.sh -v xenial-22 -s bbb.example.com -e [email protected]
    ./bbb-install.sh -v xenial-22 -s bbb.example.com -e [email protected] -g
    ./bbb-install.sh -v xenial-22 -s bbb.example.com -e [email protected] -g -c turn.example.com:1234324

Setup a coturn server

    ./bbb-install.sh -c turn.example.com:1234324 -e [email protected]

SUPPORT:
     Source: https://github.com/bigbluebutton/bbb-install
   Community: https://bigbluebutton.org/support

只使用IP地址安裝和配置

安裝BigBlueButton 2.2(沒有主機名或TLS/SSL證書):

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22

就是這樣。安裝應該在大約15分鐘內完成(取決於服務器的internet連接),並顯示以下消息:

** Potential problems described below **

......
# Warning: The API demos are installed and accessible from:
#
#    http://xxx.xxx.xxx.xxx/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

該腳本還安裝了bbb-demo包,以便您可以立即測試安裝。如果要刪除API演示,請使用該命令:

sudo apt-get purge bbb-demo

如果希望將此服務器與第三方集成(如Moodle)一起使用,可以使用命令sudo bbb-conf --secret獲得BigBlueButton服務器的主機名和共享機密。

# bbb-conf --secret

       URL: http://xxx.xxx.xxx.xxx/bigbluebutton/
    Secret: yyy

      Link to the API-Mate:
      http://mconf.github.io/api-mate/#server=http://xxx.xxx.xxx.xxx/bigbluebutton/&sharedSecret=yyy

由於bbb-install.sh的默認用法不支持SSL/TLS證書,雖然您可以登錄到服務器,但您不能共享音頻/視頻,因爲WebRTC需要SSL/TLS證書。

安裝SSL / TLS

bbb-install.sh之前,可以安裝SSL/TLS證書,您需要提供以下兩項信息:

  • 一個完全限定的域名(FQDN),例如bbb.example.com,它解析爲您的服務器的公共IP地址。
  • 一個電子郵件地址。

設置好FQDN之後,使用dig命令檢查它是否正確解析爲服務器的外部IP地址。

dig bbb.example.com @8.8.8.8

注意:我們使用bbb.example.com作爲示例主機名。您可以用真正的主機名來代替檢查(以及下面的命令)。

只需要這兩部分信息——FQDN 和電子郵件地址——就可以使用bbb-install.sh自動配置帶有TLS/SSL證書的BigBlueButton服務器。例如,要使用來自Let’s Encrypt 的TLS/SSL證書安裝BigBlueButton 2.2,請使用bbb.example.cominfo@example,輸入命令:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s bbb.example.com -e [email protected]

(同樣,你可以用bbb.example.com[email protected] 代替您的服務器的FQDN和您的電子郵件地址)。bbb-install.sh腳本還將安裝一個核心工作,該作業將自動更新 Let’s Encrypt 證書,這樣它就不會過期。酷。

安裝在專用網絡中

默認安裝是針對公開可用的服務器的。這是因爲Let’s Encrypt 需要訪問nginx,以便自動驗證提供的FQDN。

當安裝BigBlueButton私有網絡,可以手動驗證FODN,通過添加選項-x命令行。如:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s bbb.example.com -e [email protected] -x

確認電子郵件帳號的使用。

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o:

確認IP地址的使用

Are you OK with your IP being logged?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o:

將生成一個challenge並顯示在控制檯中。

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.bbb.example.com with the following value:

0bIA-3-RqbRo2EfbYTkuKk7xq2mzszUgVlr6l1OWjW8

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

在點擊Eneter之前,在DNS中創建一條TXT記錄,記錄下生成的challenge

_acme-challenge.bbb.example.com.  TXT   "0bIA-3-RqbRo2EfbYTkuKk7xq2mzszUgVlr6l1OWjW8"   60

這樣做的缺點是,由於SSL證書在90天后過期,因此必須手動更新證書。在這種情況下,電子郵件在過期前幾天發送,下一個命令必須通過控制檯執行。

certbot --email [email protected] --agree-tos -d bbb.example.com --deploy-hook 'systemctl restart nginx' --no-bootstrap --manual-public-ip-logging-ok --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory certonly

安裝API演示

您可以通過添加-a選項來安裝API演示。

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s bbb.example.com -e [email protected] -a

警告:這些API演示允許任何人訪問您的服務器,而無需身份驗證來創建/管理會議和記錄。它們僅用於測試目的。完成測試後,可以使用sudo apt-get purge bbb-demo刪除API演示。

安裝 Greenlight

Greenlight是Ruby on Rails編寫的一個簡單的BigBlueButton前端。它允許用戶創建帳戶,擁有永久的房間,並管理他們的錄音。它還允許作爲管理員的您管理用戶帳戶(例如批准或拒絕用戶)。

您可以通過添加-g選項來安裝Greenlight。

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s bbb.example.com -e [email protected] -g

安裝Greenlight後,它將把默認主頁重定向到Greenlight。您還可以配置GreenLight來使用OAuth2身份驗證

要啓動Greenlight,只需打開服務器的URL,例如https://bbb.example.com/。您應該會看到Greenlight登錄頁面。
在這裏插入圖片描述
要爲Greenlight設置管理員帳戶(以便您可以批准/拒絕註冊),請輸入以下命令:

cd greenlight/
docker exec greenlight-v2 bundle exec rake admin:create

這個命令將創建一個管理帳戶並設置一個默認密碼。運行此命令後,使用給定的用戶名/密碼登錄並更改默認密碼。接下來,選擇“Administrator”並選擇“Organization”。
在這裏插入圖片描述
然後您可以選擇’Site Settings '在左手邊,並改變Registration Method 爲’Approve/Decline '。

在這裏插入圖片描述
現在可以控制誰在BigBlueButton服務器上創建帳戶。有關更多信息,請參見Greenlight管理

鏈接/var/bigbluebutton到另一個目錄

安裝腳本允許您傳遞一個路徑,該路徑將用於用/var/bigbluebutton創建一個符號鏈接

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -m /mnt/test

這允許用戶存儲/var/bigbluebutton的內容,該內容在單獨的卷中可能會變得非常大。

用一個命令做所有的事情

如果你想用TLS/SSL證書和GreenLight來設置BigBlueButton 2.2,你可以用一個命令來完成:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s bbb.example.com -e [email protected] -g

此外,您可以重新運行相同的命令後更新服務器到最新版本的BiąBlueButton 2.2。我們宣佈BiaBlueButton更新到BiaBlueButton-dey郵件列表。

安裝TURN服務器

您可以使用bbb-install.sh自動化設置BigBlueButton的TURN服務器的步驟

注意:此步驟是可選的,但如果您的BigBlueButton服務器在internet上是公開可執行的,並且可能被限制防火牆後的用戶訪問,則建議這樣做。

BigBlueButton通常需要大量UDP端口才能用於WebRTC通信。在一些受網絡限制的站點或開發環境中,例如NAT或防火牆後面的那些限制傳出UDP連接的站點,用戶可能無法將傳出UDP連接到您的BigBlueButton服務器。

TURN協議的設計目的是允許基於udp的通信流(如WebRTC)繞過NAT或防火牆,方法是讓客戶機連接到TURN服務器,然後讓TURN服務器代表它們連接到目的地。

您需要一個單獨的服務器(而不是BigBlueButton服務器)來設置爲TURN服務器。具體你需要:

  • 一個帶有公共IP地址的ubuntu18.04服務器

在TURN服務器上,您需要有以下端口(在端口22中)用於BigBlueButton連接(端口3478和443),以及用於coturn(穿透)連接到您的BigBlueButton服務器(49152- 65535)。

Ports Protocol Description
3478 TCP/UDP coturn listening port
443 TCP/UDP TLS listening port
49152-65535 UDP relay ports range

我們推薦Ubuntu 18.04,因爲它有一個比Ubuntu 16.04更新的coturn版本。此外,這個TURN服務器不需要非常強大,因爲它只會在必要時將通信從BigBlueButton客戶端轉發到BigBlueButton服務器。例如,Digital Ocean上的雙核服務器是一個不錯的選擇,它提供具有公共IP地址的服務器。

接下來,配置你需要的 TURN 服務器:

  • 一個完全限定的域名(FQDN),帶有解析到TURN服務器的外部公共IP地址的DNS條目
  • Let’s Encrypt 的電子郵件地址
  • 密鑰(可以是您創建的8到16個字符的隨機字符串)

有了上面的信息,您可以使用bbb-install.sh爲BigBlueButton設置一個TURN服務器,如下所示:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -c <FQDN>:<SECRET> -e <EMAIL>

注意,我們省略了-v選項,這導致bbb-install.sh只安裝和配置coturn。例如,turn.example.com 使用FQDN, 1234abcd作爲共享祕密,[email protected] 作爲電子郵件地址,您可以使用該命令爲BigBlueButton設置一個TURN 服務器:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -c turn.example.com:1234abcd -e [email protected]

bbb-install.sh使用Let’s Encrypt 來配置coturn以使用SSL證書。這一個SSL證書,coturn可以訪問BigBlueButton服務器在TCP / IP的端口443上。這意味着,如果用戶在一個限制所有UDP連接的防火牆後面,TURN服務器可以通過TCP / IP的端口443接受用戶的連接,並通過UDP將數據轉發到您的BigBlueButton服務器。

有了TURN服務器,您可以通過再次運行bbb-install.sh命令並添加相同的 -c <FQDN>:<SECRET> 來配置BigBlueButton服務器來使用TURN服務器。例如:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s bbb.example.com -e [email protected] -g -c turn.example.com:1234abcd

您可以爲多個BigBlueButton安裝共用一個TURN服務器。

下一步

如果您打算將此服務器用於生產,則應該使用該命令卸載API演示:

apt-get purge bbb-demo

您還可以對服務器進行許多定製

故障排除

打包服務器被阻塞

我們目前在一個Digital Ocean servlet上託管打包,但最近Digital Ocean servlet的IP範圍在一些國家被封鎖。

如果在安裝時遇到困難,可以嘗試運行bbb-install.sh命令,但是要更改值

https://ubuntu.bigbluebutton.org/bbb-install.sh

改爲

https://packages-eu.bigbluebutton.org/bbb-install.sh
Greenlight未運行

如果在第一次安裝Greenlight時出現500 error ,您可以重新啓動Greenlight

Tomcat7未運行

如果在初始安裝時看到

# Not running:  tomcat7 or grails LibreOffice

只要再次運行 sudo bbb-conf --check 。Tomcat7的啓動時間可能要長一些,而且它不是第一次運行sudo bbb-conf --check

得到幫助

如果您對腳本有反饋,或者需要使用它的幫助,請將問題的詳細信息(包括重現錯誤的步驟等相關信息)發佈到BigBlueButton安裝郵件列表。

如果您遇到腳本錯誤(例如沒有完成或拋出錯誤),請打開GitHub問題並提供重現問題的步驟。

限制

如果您在防火牆後運行BigBlueButton,例如在EC2上,此腳本將不會配置您的防火牆。您需要手動配置防火牆

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章