写点什么

华为云 Flexus X 实例 docker 部署 Jitsi 构建属于自己的音视频会议系统

作者:YG科技
  • 2024-12-25
    海南
  • 本文字数:7066 字

    阅读完需:约 23 分钟

828 华为云征文|华为云 Flexus X 实例 docker 部署 Jitsi 构建属于自己的音视频会议系统

· 华为云最近正在举办 828 B2B 企业节,Flexus X 实例的促销力度非常大,特别适合那些对算力性能有高要求的小伙伴。如果你有自建 MySQL、Redis、Nginx 等服务的需求,一定不要错过这个机会。赶紧去看看吧!

什么是华为云 Flexus X 实例

· 华为云 Flexus X 实例云服务是新一代开箱即用、体验跃级、面向中小企业和开发者打造的高品价比云服务产品。

· Flexus 云服务器 X 实例是新一代面向中小企业和开发者打造的柔性算力云服务器,可智能感知业务负载,适用于电商直播、企业建站、开发测试环境、游戏服务器、音视频服务等中低负载场景。

开始接触华为云 Flexus 云服务器 X 实例

· 获取华为云 Flexus 云服务器 X 实例后第一步就是先去华为云上重置服务器密码

 


· 重置完毕后用 ssh 工具登录华为云服务器,这里我用的是 finalshell,也可以用其他工具登陆比如 xshell 或者 Putty 都可以


· 登录上去查看硬盘大小,可以看到是 100g 硬盘,硬盘总大小是正常的

root@flexusx-ebe8:~# df -hFilesystem      Size  Used Avail Use% Mounted ontmpfs           1.2G  1.1M  1.2G   1% /run/dev/vda1        99G  4.2G   90G   5% /tmpfs           5.7G     0  5.7G   0% /dev/shmtmpfs           5.0M     0  5.0M   0% /run/locktmpfs           1.2G  4.0K  1.2G   1% /run/user/0

· 然后输入 ufw status 可以看到默认防火墙是关闭的,因此我们就不需要额外再去配置端口开放相关的配置,只要在华为云安全组配置端口开放就可以了

root@flexusx-ebe8:~# ufw statusStatus: inactive

docker 环境的安装

· 然后进行 docker 容器的安装,安装最新版本的 docker

· 这里因为 docker 现在已经无法直接通过网络安装,所以我们通过离线安装的方式安装 docker 环境

· 从官网下载离线包

https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/


 

· 如图所示,把离线包传到服务器上,进行安装

dpkg -i *.deb

· 查看安装的 docker 版本

root@flexusx-ebe8:/home/docker# docker -vDocker version 27.1.2, build d01f264

· 至此 docker 容器环境安装完毕

docker-compose 安装

· docker 容器安装完毕后,开始安装 docker-compose

· https://github.com/docker/compose/tags离线下载 docker-compose 的包

· 因为我是 x86-64 的环境,所以从中找到 docker-compose-linux-x86_64 进行下载

· 下载完毕后上传到服务器,然后执行 sudo cp -f docker-compose-linux-x86_64 /usr/local/bin/docker-compose

· 然后授予可执行权限,sudo chmod +x /usr/local/bin/docker-compose

· 查看 docker-compose 版本

root@flexusx-ebe8:/# sudo docker-compose -vDocker Compose version v2.29.2

· 这样 docker-compose 就安装完毕了

什么是 Jitsi

· Jitsi 是一个开源的音视频会议系统,旨在提供高质量、实时的视频和音频通讯。它的核心功能包括视频会议、音频通话、屏幕共享、实时聊天等,支持多个用户同时参与。Jitsi 的开源特性使得它在隐私、可定制性和灵活性方面比很多商业视频会议解决方案更具优势。

Jitsi 的主要功能

· 视频会议:支持高清、多人参与的视频会议,性能强劲。

· 音频通话:清晰的音频通话质量,适合多人会议和私人通话。

· 屏幕共享:允许与会者分享他们的桌面或应用窗口,适用于远程协作和演示。

· 实时聊天:内置文字聊天功能,可以在会议中发送消息。

· 会议录制:支持会议的录制(需要与 Jibri 组件集成)。

· 安全保障:支持端到端加密,确保会议内容的安全性和隐私性。

· 无客户端需求:基于 WebRTC 技术,用户可以直接通过浏览器参与会议,无需安装额外软件。

· 移动应用:提供 iOS 和 Android 版的移动应用程序,方便用户随时随地参与会议。

Jitsi 安装

· 服务器输入 wget $(curl -s https://api.github.com/repos/jitsi/docker-jitsi-meet/releases/latest | grep 'zip' | cut -d\" -f4)

root@flexusx-ebe8:/home/docker/jitsi# wget $(curl -s https://api.github.com/repos/jitsi/docker-jitsi-meet/releases/latest | grep 'zip' | cut -d\" -f4)--2024-09-11 15:51:31--  https://api.github.com/repos/jitsi/docker-jitsi-meet/zipball/stable-9646Resolving api.github.com (api.github.com)... 20.205.243.168Connecting to api.github.com (api.github.com)|20.205.243.168|:443... connected.HTTP request sent, awaiting response... 302 FoundLocation: https://codeload.github.com/jitsi/docker-jitsi-meet/legacy.zip/refs/tags/stable-9646 [following]--2024-09-11 15:51:32--  https://codeload.github.com/jitsi/docker-jitsi-meet/legacy.zip/refs/tags/stable-9646Resolving codeload.github.com (codeload.github.com)... 20.205.243.165Connecting to codeload.github.com (codeload.github.com)|20.205.243.165|:443... connected.HTTP request sent, awaiting response... 200 OKLength: unspecified [application/zip]Saving to: ‘stable-9646’stable-9646                                       [  <=>                                                                                           ] 356.14K  1.06MB/s    in 0.3s    2024-09-11 15:51:33 (1.06 MB/s) - ‘stable-9646’ saved [364683]

· 解压 unzip stable-9646

· 进入解压后的文件夹,查看文件

root@flexusx-ebe8:/home/docker/jitsi/jitsi-docker-jitsi-meet-1797ac8# lsbase          docker-compose.yml  examples          jibri      jigasi      LICENSE           Makefile        prosody     resourcesbase-java     env.example         gen-passwords.sh  jibri.yml  jigasi.yml  log-analyser      prometheus      README.md   webCHANGELOG.md  etherpad.yml        grafana.yml       jicofo     jvb         log-analyser.yml  prometheus.yml  release.sh  whiteboard.yml

· 通过复制和调整来创建文件 env.example,输入 cp env.example .env

· 通过运行 gen-passwords.sh 脚本在文件的安全部分选项中设置强密码, 执行./gen-passwords.sh

· 创建 config 文件夹,mkdir -p ~/.jitsi-meet-cfg/{web,transcripts,prosody/config,prosody/prosody-plugins-custom,jicofo,jvb,jigasi,jibri}

· 执行 docker-compose up -d,启动服务

root@flexusx-ebe8:/home/docker/jitsi/jitsi-docker-jitsi-meet-1797ac8# docker-compose up -dWARN[0000] /home/docker/jitsi/jitsi-docker-jitsi-meet-1797ac8/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion[+] Running 2/20 ⠋ jicofo [⠀⠀⠀] Pulling                                                                                                                                                          8.0s   ⠴ 09b9b4aae3cd Waiting                                                                                                                                                        4.6s   ⠴ 443993b6bb63 Waiting                                                                                                                                                        4.6s   ⠴ 1932e670f11f Waiting                                                                                                                                                        4.6s ⠋ web [⠀⠀⠀] Pulling                                                                                                                                                             8.0s   ⠸ b3db3cf051a2 Waiting                                                                                                                                                        4.4s   ⠸ 7418ce87c737 Waiting                                                                                                                                                        4.4s   ⠸ b9ab339cf963 Pulling fs layer                                                                                                                                               4.4s ⠋ prosody [⠀⣿⠀⣿⠀⠀⠀⠀] Pulling                                                                                                                                                    8.0s   ⠦ efc2b5ad9eec Retrying in 4 seconds                                                                                                                                          4.6s   ✔ 8b3973c9358f Download complete                                                                                                                                              2.1s   ⠦ 6551d279813e Retrying in 3 seconds                                                                                                                                          4.6s   ✔ 4f4fb700ef54 Download complete                                                                                                                                              3.6s   ⠦ 33d1be951f3b Waiting                                                                                                                                                        4.6s   ⠦ aa251754683e Waiting                                                                                                                                                        4.6s   ⠦ 7bbb699ede75 Waiting                                                                                                                                                        4.6s   ⠦ 8d4ab81b2898 Waiting                                                                                                                                                        4.6s ⠋ jvb [⠀⠀] Pulling                                                                                                                                                              8.0s   ⠸ 8a5ef495b9b8 Waiting                                                                                                                                                        4.4s   ⠸ 454a67a8ca66 Pulling fs layer

· 启动完毕后查看运行状态

root@flexusx-ebe8:/home/docker/jitsi/jitsi-docker-jitsi-meet-1797ac8# docker psCONTAINER ID   IMAGE                       COMMAND   CREATED          STATUS          PORTS                                                                            NAMESc60c5644dab1   jitsi/web:stable-9646       "/init"   41 seconds ago   Up 40 seconds   0.0.0.0:8000->80/tcp, :::8000->80/tcp, 0.0.0.0:8443->443/tcp, :::8443->443/tcp   jitsi-docker-jitsi-meet-1797ac8-web-10c8775add81e   jitsi/jicofo:stable-9646    "/init"   41 seconds ago   Up 40 seconds   127.0.0.1:8888->8888/tcp                                                         jitsi-docker-jitsi-meet-1797ac8-jicofo-1b8d2179e5e4b   jitsi/jvb:stable-9646       "/init"   41 seconds ago   Up 40 seconds   127.0.0.1:8080->8080/tcp, 0.0.0.0:10000->10000/udp, :::10000->10000/udp          jitsi-docker-jitsi-meet-1797ac8-jvb-11e442e3bc909   jitsi/prosody:stable-9646   "/init"   45 seconds ago   Up 40 seconds   5222/tcp, 5269/tcp, 5280/tcp, 5347/tcp                                           jitsi-docker-jitsi-meet-1797ac8-prosody-1

· 此时 docker 部署 Jitsi 完毕,但还需要去华为云安全组开放端口

配置 Flexus 云服务器 X 实例安全组

· 经过上面部署 srs 服务,这时候服务是已经部署完毕了,但是我们还没法通过外网进行访问,还需要对 Flexus 云服务器 X 安全组的配置进行修改

· 进入安全组的配置页面


· 新建安全组


· 这里我们开放 30080,30081,30082 端口

· 然后加入新建的安全组


· 这样我们的实例的端口也就开放成功了

开始使用 Jitsi

· 访问页面 https://弹性公网 ip:8443/ 


· 查看一下配置


· 也可以背景替换,虚化


· 创建会议加入会议


· 至此华为云 Flexus X 实例 docker 部署 Jitsi 构建属于自己的音视频会议系统完毕

欢迎大家一起加入华为云!


 

用户头像

YG科技

关注

还未添加个人签名 2023-03-20 加入

还未添加个人简介

评论

发布
暂无评论
华为云Flexus X实例docker部署Jitsi构建属于自己的音视频会议系统_YG科技_InfoQ写作社区