2024-03-31
计算机
0
请注意,本文编写于 268 天前,最后修改于 265 天前,其中某些信息可能已经过时。

目录

什么是Jitsi Meet?
特点和优势
如何开始使用Jitsi Meet?
安装先决条件
更改主机名
以root用户身份将 jitsi 添加到版本库中
防火墙配置
安装 Jitsi
输入域名
选择自签证书 self-signed certificate
以root身份
在前一个区块的上方,插入以下 conf,注意格式
配置用于管理用户会话的组件 Jicofo
根据以下示例配置 Prosody
为 Jitsi 创建管理员账户
将 Jitsi 添加到 SIP
作为root用户
重启服务
测试 Jitsi 在启动会议后是否要求登录
在根目录下,配置环回接口
安装 ffmpeh
安装 Chrome 浏览器,适用于 debian
安装 Chrome 浏览器,适用于其他Linux系统
忽略谷歌浏览器的警告
为 debian 安装 chromedriver
为其他 linux 安装 chromedriver
为 debian 安装 jibri
为其他 Linux 安装 jibri
配置jibri
检查 jibri 日志是否存在
配置Prosody文件
在配置文件中添加此代码块
在 jicofo 配置文件中添加代码块
修改配置文件 /etc/jitsi/meet/mydomain-config.js
使用 java11 运行 jibri
用以下脚本替换 java
重启服务
为未通过身份验证的参会者添加以下代码块
验证为root用户

在当今快节奏的数字化世界中,远程沟通变得越来越普遍。视频会议平台的需求也随之增长,而Jitsi Meet作为一款开源的视频会议平台,正日益受到关注。本文将向您介绍Jitsi Meet的特点和优势。

什么是Jitsi Meet?

Jitsi Meet是一个基于WebRTC的开源视频会议平台,它允许用户通过浏览器进行高质量的视频会议和实时沟通。Jitsi Meet支持多方视频会议、屏幕共享、文本聊天等功能,同时提供了端到端加密的安全性保障。

特点和优势

开源性:Jitsi Meet是开源软件,意味着用户可以自由地查看、修改和分发其源代码。这使得Jitsi Meet成为了一个灵活且可定制的视频会议解决方案。

跨平台性:Jitsi Meet支持在各种操作系统和设备上运行,包括Windows、macOS、Linux等,以及iOS和Android移动设备。

易用性:无需安装任何客户端应用程序,用户只需通过浏览器访问Jitsi Meet即可进行视频会议,这降低了使用门槛并提高了便利性。

安全性:Jitsi Meet提供端到端加密,保护用户的通信数据安全,确保会议内容不会被未经授权的人员访问。

如何开始使用Jitsi Meet?

要开始使用Jitsi Meet,只需访问Jitsi Meet的网站或您自己部署的Jitsi Meet实例,然后创建或加入一个会议。您可以通过分享链接邀请他人加入会议,还可以享受屏幕共享、文本聊天等功能。


本教程将向您展示如何在Ubuntu操作系统上安装Jitsi Meet。

安装先决条件

bash
sudo apt install -y gnupg2 nginx-full sudo curl sudo apt update sudo apt install apt-transport-https sudo apt-add-repository universe sudo apt update

更改主机名

bash
sudo hostnamectl set-hostname mydomain vim /etc/hosts
127.0.0.1 localhost 192.168.1.127 mydomain 127.0.1.1 nom de la machine

以root用户身份将 jitsi 添加到版本库中

bash
echo 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null curl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg' sudo apt update

防火墙配置

bash
sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw allow 10000/udp sudo ufw allow 22/tcp sudo ufw allow 3478/udp sudo ufw allow 5349/tcp

安装 Jitsi

bash
sudo apt install jitsi-meet

输入域名

选择自签证书 self-signed certificate

以root身份

bash
nano /etc/prosody/conf.avail/mydomain.cfg.lua
VirtualHost "mydomain" ... authentication = "internal_plain" ...

在前一个区块的上方,插入以下 conf,注意格式

VirtualHost "guest.mydomain" authentication = "anonymous" c2s_require_encryption = false modules_enabled = { "bosh"; "pubsub"; "ping"; "speakerstats"; "turncredentials"; "conference_duration"; }

配置用于管理用户会话的组件 Jicofo

bash
nano /etc/jitsi/jicofo/sip-communicator.properties
org.jitsi.jicofo.auth.URL=XMPP:mydomain

根据以下示例配置 Prosody

bash
nano /etc/prosody/conf.d/mydomain.cfg.lua
-- internal muc component Component "internal.auth.mydomain" "muc" storage = "memory" modules_enabled = { "ping"; } admins = { "focus@auth.mydomain", "jvb@auth.mydomain", "jibri@auth.mydomain" } muc_room_locking = false muc_room_default_public_jids = true muc_room_cache_size = 1000 c2s_require_encryption = false
VirtualHost "recorder.mydomain" modules_enabled = { "ping"; } authentication = "internal_hashed" c2s_require_encryption = false allow_empty_token = true

为 Jitsi 创建管理员账户

bash
sudo prosodyctl register myusername mydomain mypassword

将 Jitsi 添加到 SIP

bash
nano /etc/jitsi/jicofo/sip-communicator.properties
org.jitsi.jicofo.BRIDGE_MUC=JvbBrewery@internal.auth.mydomain org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.mydomain org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90

作为root用户

bash
prosodyctl register jibri auth.mydomain mypassword prosodyctl register recorder recorder.mydomain mypassword

重启服务

bash
sudo systemctl restart {prosody,jicofo,jitsi-videobridge2,nginx} sudo systemctl status {prosody,jicofo,jitsi-videobridge2,nginx}

测试 Jitsi 在启动会议后是否要求登录

mydomain

在根目录下,配置环回接口

bash
apt -y install linux-image-extra-virtual echo "snd_aloop" >> /etc/modules modprobe snd-aloop lsmod | grep snd_aloop

你将得到以下输出:

snd_aloop 24576 0 snd_pcm 98304 1 snd_aloop snd 81920 3 snd_timer,snd_aloop,snd_pcm

安装 ffmpeh

bash
sudo apt install ffmpeg

安装 Chrome 浏览器,适用于 debian

bash
curl -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list apt update apt install google-chrome-stable

安装 Chrome 浏览器,适用于其他Linux系统

bash
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google-chrome.list apt-get -y update apt-get -y install google-chrome-stable apt-mark hold google-chrome-stable

忽略谷歌浏览器的警告

bash
mkdir -p /etc/opt/chrome/policies/managed echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' >>/etc/opt/chrome/policies/managed/managed_policies.json

为 debian 安装 chromedriver

bash
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/ unzip ~/chromedriver_linux64.zip -d ~/ rm ~/chromedriver_linux64.zip mv -f ~/chromedriver /usr/local/bin/chromedriver chown root:root /usr/local/bin/chromedriver chmod 0755 /usr/local/bin/chromedriver

为其他 linux 安装 chromedriver

bash
CHROME_VER=$(dpkg -s google-chrome-stable | egrep "^Version" | cut -d " " -f2 | cut -d. -f1-3) CHROMELAB_LINK="https://googlechromelabs.github.io/chrome-for-testing" CHROMEDRIVER_LINK=$(curl -s $CHROMELAB_LINK/known-good-versions-with-downloads.json | jq -r ".versions[].downloads.chromedriver | select(. != null) | .[].url" | grep linux64 | grep "$CHROME_VER" | tail -1) wget -O /tmp/chromedriver-linux64.zip $CHROMEDRIVER_LINK rm -rf /tmp/chromedriver-linux64 unzip -o /tmp/chromedriver-linux64.zip -d /tmp mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/ chown root:root /usr/local/bin/chromedriver chmod 755 /usr/local/bin/chromedriver

为 debian 安装 jibri

bash
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add - sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list" apt update apt install jibri usermod -aG adm,audio,video,plugdev jibri

为其他 Linux 安装 jibri

bash
curl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg' echo 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null apt update apt install jibri usermod -aG adm,audio,video,plugdev jibri

配置jibri

bash
nano /etc/jitsi/jibri/jibri.conf
jibri { // A unique identifier for this Jibri // TODO: eventually this will be required with no default id = "" // Whether or not Jibri should return to idle state after handling // (successfully or unsuccessfully) a request. A value of 'true' // here means that a Jibri will NOT return back to the IDLE state // and will need to be restarted in order to be used again. single-use-mode = false api { http { external-api-port = 2222 internal-api-port = 3333 } xmpp { // See example_xmpp_envs.conf for an example of what is expected here environments = [ { name = "prod environment" xmpp-server-hosts = ["mydomain"] xmpp-domain = "mydomain" control-muc { domain = "internal.auth.mydomain" room-name = "JibriBrewery" nickname = "jibri" } control-login { domain = "auth.mydomain" username = "jibri" password = "lbclbc" } call-login { domain = "recorder.mydomain" username = "recorder" password = "lbclbc" } strip-from-room-domain = "conference." usage-timeout = 0 trust-all-xmpp-certs = true } ] } } recording { recordings-directory = "/srv/recordings" ### TODO: make this an optional param and remove the default ### finalize-script = "/path/to/finalize" } streaming { // A list of regex patterns for allowed RTMP URLs. The RTMP URL used // when starting a stream must match at least one of the patterns in // this list. rtmp-allow-list = [ // By default, all services are allowed ".*" ] } ffmpeg { resolution = "1280x720" video-encode-preset = "veryfast" // The audio source that will be used to capture audio on Linux audio-source = "alsa" // The audio device that will be used to capture audio on Linux audio-device = "plug:bsnoop" } chrome { // The flags which will be passed to chromium when launching flags = [ "--use-fake-ui-for-media-stream", "--start-maximized", "--kiosk", "--enabled", "--disable-infobars", "--autoplay-policy=no-user-gesture-required", // "--headless", "--no-sandbox", //"--disable-dev-shm-usage", "--ignore-certificate-errors" ] } stats { enable-stats-d = true } webhook { // A list of subscribers interested in receiving webhook events subscribers = [] } jwt-info { // The path to a .pem file which will be used to sign JWT tokens used in webhook // requests. If not set, no JWT will be added to webhook requests. ### signing-key-path = "/path/to/key.pem" // The kid to use as part of the JWT ### kid = "key-id" // The issuer of the JWT ### issuer = "issuer" // The audience of the JWT ### audience = "audience" // The TTL of each generated JWT. Can't be less than 10 minutes. ### ttl = 1 hour } call-status-checks { // If all clients have their audio and video muted and if Jibri does not // detect any data stream (audio or video) comming in, it will stop // recording after NO_MEDIA_TIMEOUT expires. no-media-timeout = 30 seconds // If all clients have their audio and video muted, Jibri consideres this // as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires. all-muted-timeout = 10 minutes // When detecting if a call is empty, Jibri takes into consideration for how // long the call has been empty already. If it has been empty for more than // DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording. default-call-empty-timeout = 30 seconds } }

检查 jibri 日志是否存在

bash
ls -ll /var/log/jitsi/jibri mkdir /recordings chown jibri:jibri /recordings

配置Prosody文件

bash
nano /etc/prosody/prosody.cfg.lua

在配置文件中添加此代码块

-- internal muc component, meant to enable pools of jibri and jigasi clients Component "internal.auth.mydomain" "muc" storage = "memory" modules_enabled = { "ping"; } admins = { "focus@auth.mydomain", "jvb@auth.mydomain", "jibri@auth.mydomain" } muc_room_locking = false muc_room_default_public_jids = true muc_room_cache_size = 1000 c2s_require_encryption = false
VirtualHost "recorder.mydomain" modules_enabled = { "ping"; } authentication = "internal_hashed" c2s_require_encryption = false allow_empty_token = true
---Set up a MUC (multi-user chat) room server on conference.example.com: Component "conference.mydomain" "muc" --- Store MUC messages in an archive and allow users to access it modules_enabled = { "muc_mam" }

在 jicofo 配置文件中添加代码块

bash
nano /etc/jitsi/jicofo/jicofo.conf
### Jicofo HOCON configuration. See reference.conf in /usr/share/jicofo/jicofo.jar for ###available options, syntax, and default values. jicofo { XMPP: { client: { client-proxy: "focus.mydomain" xmpp-domain: "mydomain" domain: "auth.mydomain" username: "focus" password: "HwQVZ9V6XtoTv3FP" } trusted-domains: [ "recorder.mydomain" ] } bridge: { brewery-jid: "JvbBrewery@internal.auth.mydomain" } jibri { brewery-jid = "JibriBrewery@internal.auth.mydomain" pending-timeout = 90 seconds } }

修改配置文件 /etc/jitsi/meet/mydomain-config.js

// recording recordingService = { enabled: true, sharingEnabled: true, hideStorageWarning: false, }; // liveStreaming liveStreaming = { enabled: true, }; hiddenDomain = "recorder.yourdomain.com";

使用 java11 运行 jibri

bash
nano /opt/jitsi/jibri/launch.sh

用以下脚本替换 java

/usr/lib/jvm/java-11-openjdk-amd64/bin/java

重启服务

bash
systemctl restart prosody jicofo jitsi-videobridge2 jibri systemctl enable --now jibri systemctl status prosody jicofo jitsi-videobridge2 jibri

为未通过身份验证的参会者添加以下代码块

VirtualHost "guest.mydomain" authentication = "anonymous" c2s_require_encryption = false

验证为root用户

bash
nano /etc/jitsi/meet/mydomain-config.js
anonymousdomain: 'guest.mydomain',

删除工具栏按钮的第 708 行

toolbarButtons: [ 'camera', 'chat', // 'closedcaptions', 'desktop', // 'download', // 'embedmeeting', // 'etherpad', // 'feedback', 'filmstrip', // 'fullscreen', 'hangup', // 'help', // 'highlight', // 'invite', // 'linktosalesforce', // 'livestreaming', 'microphone', 'noisesuppression', 'participants-pane', // 'profile', 'raisehand', 'recording', 'security', 'select-background', 'settings', // 'shareaudio', // 'sharedvideo', // 'shortcuts', // 'stats', 'tileview', 'toggle-camera', 'videoquality', 'whiteboard', ],
lobby_muc = "lobby.mydomain" main_muc = "conference.mydomain"
如果对你有用的话,可以打赏哦
打赏
ali pay
wechat pay

本文作者:DYMripper

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!