如何在 Ubuntu 18 上安装 Jitsi Meet

[ad_1]

什么是吉西?

Jitsi 是一组开源项目,可让您为团队创建安全的视频会议系统。 它具有卓越的音质、出色的加密和隐私、多平台等功能。 Jitsi 客户端可以在应用程序和 Web 浏览器中工作。 您可以广播您的桌面以及单个窗口,并使用 URL 链接邀请用户。 我们将在 Ubuntu 18.04 服务器上安装 Jitsi。 我们将安装附加组件,例如 Java 的 OpenJdk、Nginx 以正确安装、配置和使用它。 让我们谈谈组件。

  • Java OpenJDK – Java 是最流行的面向对象编程语言之一。 OpenJDK 是 Java 开发平台的免费版本,由多个组件组成。
  • Nginx – Nginx 是 HTTP 反向代理服务器、邮件代理服务器和通用 TCP/UDP 代理服务器。

更新服务器

在开始安装之前,让我们将系统软件更新到最新版本。

[email protected]:~# apt-get upgrade -y
Reading package lists... Done
Building dependency tree    
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[email protected]:~#

设置 Jitsi Meet

主机名和完整域名

对于此构建,我们将创建自己的 Jitsi 服务器,该服务器将使用 FQDN(完全限定域名)在浏览器中启动 Jitsi。 我们从教程开头的这一步开始,以便我们可以配置 Encrypt 来部署 HTTPS 证书。

[email protected]:~# hostnamectl set-hostname jitsimeet
[email protected]:~#

接下来,使用 nano 编辑器打开主机文件。

[email protected]:~# nano /etc/hosts

在那里添加以下几行。

127.0.1.1 jitsi.example.com jitsimeet
GNU nano 2.9.3 /etc/hosts
127.0.0.1 localhost
127.0.1.1 jitsi.example.com jitsimeet

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

现在,使用 Ctrl + X 保存文件,然后使用 Y 并输入。

现在,让我们使用以下命令进行主机名检查。

[email protected]:~# hostname
jitsimeet
[email protected]:~#

[email protected]:~# hostname -f
jitsimeet.example.com
[email protected]:~#

安装 OpenJDK

接下来,让我们继续安装 JRE 8 的 OpenJDK 版本。虽然这是 Java 的旧版本,但它非常稳定,并且在许多项目中使用。

[email protected]:~# apt install -y openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree    
Reading state information... Done

The following additional packages will be installed:
  ca-certificates-java java-common
Suggested packages:
  default-jre fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho
  fonts-wqy-microhei fonts-wqy-zenhei
The following NEW packages will be installed:
  ca-certificates-java java-common openjdk-8-jre-headless
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 27,5 MB of archives.
After this operation, 100 MB of additional disk space will be used.
Get:1 https://by.archive.ubuntu.com/ubuntu bionic-updates/main amd64 java-common all 0.68ubuntu1~18.04.1 [14,5 kB]
Get:2 https://by.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 openjdk-8-jre-headless amd64 8u242-b08-0ubuntu3~18.04 [27,5 MB]
Get:3 https://by.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ca-certificates-java all 20180516ubuntu1~18.04.1 [12,2 kB]
Fetched 27,5 MB in 5s (5.491 kB/s)            
Selecting previously unselected package java-common.
(Reading database ... 153398 files and directories currently installed.)
Preparing to unpack .../java-common_0.68ubuntu1~18.04.1_all.deb ...
Unpacking java-common (0.68ubuntu1~18.04.1) ...

done.
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ca-certificates (20180409) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.
Setting up openjdk-8-jre-headless:amd64 (8u242-b08-0ubuntu3~18.04) ...
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
[email protected]:~#

现在,让我们验证我们的 OpenJDK 版本。

[email protected]:~# java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
[email protected]:~#

接下来,我们可以设置我们的环境变量并刷新我们的配置文件。

[email protected]:~# echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | sudo tee -a /etc/profile
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
[email protected]:~#

[email protected]:~# source /etc/profile
[email protected]:~#

安装 Nginx

由于 Jitsi 使用 Nginx 来工作,因此有几个关于如何进行的选项。 事实上,当你安装 Jitsi 时,它会自动检查 Nginx 和 Apache 已安装,如果未安装,则 Jitsi 默认安装 Nginx。 它还重新配置了使用 Nginx 的端口 443。

话虽如此,这里的首选选项是自己安装 Nginx。 我们选择提前这样做,以便我们可以更好地控制我们想要使用的选项。 如果我们现在不安装,Jitsi 会在安装软件时尝试安装。 如果我们禁用在 Jitsi 安装期间应用的任何其他 Nginx 安装选项或自动配置,我们的端口可能会被锁定,并且很难修复它。 因此,如果我们当前没有安装Nginx,我们应该自己安装,然后在Jitsi安装过程中,禁用Nginx的自动安装和配置。

接下来,我们将安装和配置 Nginx Web 服务器。

[email protected]:~# apt install -y nginx
Reading package lists... Done
Building dependency tree    
Reading state information... Done

The following additional packages will be installed:
  libnginx-mod-http-geoip libnginx-mod-http-image-filter
  libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream
  nginx-common nginx-core
Suggested packages:
  fcgiwrap nginx-doc
The following NEW packages will be installed:
  libnginx-mod-http-geoip libnginx-mod-http-image-filter
  libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx
  nginx-common nginx-core
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 598 kB of archives.
After this operation, 2.120 kB of additional disk space will be used.
...
Setting up libnginx-mod-http-image-filter (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-mail (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-http-geoip (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-stream (1.14.0-0ubuntu1.7) ...
Setting up nginx-core (1.14.0-0ubuntu1.7) ...
Setting up nginx (1.14.0-0ubuntu1.7) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
Rules updated for profile 'OpenSSH'
Firewall reloaded
[email protected]:~#

现在,如果在安装过程中没有启动 Nginx 服务,让我们启动它。

[email protected]:~# systemctl start nginx.service
[email protected]:~#

接下来,我们应该激活 Nginx 服务。

[email protected]:~# systemctl enable nginx.service
Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nginx
[email protected]:~#

现在,让我们验证该服务是否处于活动状态。

[email protected]:~# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: e
   Active: active (running) since Thu 2020-04-02 18:17:00 +03; 13min ago
  Docs: man:nginx(8)
 Main PID: 3879 (nginx)
 Tasks: 3 (limit: 2327)
   CGroup: /system.slice/nginx.service
        ├─3879 nginx: master process /usr/sbin/nginx -g daemon on; master_pr
        ├─3880 nginx: worker process
        └─3881 nginx: worker process
 
кра 02 18:17:00 jitsimeet systemd[1]: Starting A high performance web server an
кра 02 18:17:00 jitsimeet systemd[1]: Started A high performance web server and
lines 1-13/13 (END)

我们可以使用 Ctrl + c 退出上述命令。

注意:如果你现在不安装Nginx,它会和Jitsi一起自动安装。 但是,最好单独安装它以更好地提供更精细的选项和控件。

安装 Jitsi

接下来,我们可以继续安装 Jitsi 软件本身。 我们必须注意,使用或不使用活动视频桥接器的 Jitsi Meet 之间存在巨大差异。 如果没有视频桥,所有视频流都是点对点的,因此您拥有的视频参与者越多,每个本地客户端的工作就越多,每个参与者的互联网连接必须与之交互的流也就越多。 如果我们使用视频桥接器,它会在服务器端捆绑这些流。

添加 Jitsi 存储库。

接下来,我们将下载 Jitsi gpg 密钥,添加存储库,最后,安装

[email protected]:~# wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
OK

[email protected]:~#
sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"

[email protected]:~# sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"
[email protected]:~#

添加通用存储库

在 Ubuntu 中,Jitsi 安装需要启用通用包存储库以安装所有必需的依赖项。

[email protected]:~# apt-add-repository universe
'universe' distribution component is already enabled for all sources.
[email protected]:~#

安装 Apt HTTPS 安全

接下来,我们应该验证 apt 存储库的 https 支持是否可用。 这允许在访问存储库时使用 HTTPS。

[email protected]:~# apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree    
Reading state information... Done

The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1.692 B of archives.
After this operation, 153 kB of additional disk space will be used.
Get:1 https://by.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.12 [1.692 B]
Fetched 1.692 B in 0s (123 kB/s)      
Selecting previously unselected package apt-transport-https.
(Reading database ... 150837 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.6.12_all.deb ...
Unpacking apt-transport-https (1.6.12) ...
Setting up apt-transport-https (1.6.12) ...
[email protected]:~#

现在,让我们再次更新包存储库。

[email protected]:~# apt-get update
Hit:1 https://by.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 https://by.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 https://by.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:4 https://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]   
Get:5 https://download.jitsi.org stable/ InRelease [1.882 B]                  
Get:6 https://download.jitsi.org stable/ Packages [37,8 kB]            
Fetched 128 kB in 1s (156 kB/s)                                 
Reading package lists... Done
[email protected]:~#

安装 JitsiMeet

在安装之前,请确保使用 –no-install-recommends 命令标志禁用 Nginx 的安装,如下所示。

[email protected]:~#apt install --no-install-recommends jitsi-meet -y

注意:在安装过程中不要跳过输入重要数据。

在安装过程中,您需要提供当前主机的名称。

jitsimeet.example.com

然后我们让 Jitsi 自己生成 SSL 证书,我们需要选择以下选项…

Generate a new self-signed certificate (You will later get as chance to obtain a Let's Encrypt certificate)

并按回车键。

现在,我们可以使用 apt 来安装 jitsi-meet。

[email protected]:~# apt install --no-install-recommends jitsi-meet
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
The following additional packages will be installed:
jicofo jitsi-meet-prosody jitsi-meet-web jitsi-meet-web-config
jitsi-videobridge2 lua-bitop lua-expat lua-filesystem lua-sec lua-socket
lua5.1 prosody
Suggested packages:
lua-dbi-mysql lua-dbi-postgresql lua-dbi-sqlite3 lua-zlib
Recommended packages:
jitsi-meet-turnserver | apache2 lua5.1-event
The following NEW packages will be installed:
jicofo jitsi-meet jitsi-meet-prosody jitsi-meet-web jitsi-meet-web-config
jitsi-videobridge2 lua-bitop lua-expat lua-filesystem lua-sec lua-socket
lua5.1 prosody
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 70,3 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y

* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.conf ...
Created symlink /etc/systemd/system/multi-user.target.wants/jitsi-videobridge2.service → /lib/systemd/system/jitsi-videobridge2.service.
Setting up lua-sec:amd64 (0.6-4) ...
Setting up jitsi-meet-web-config (1.0.3962-1) ...
Can't load /root/.rnd into RNG
140358865605056:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd
Generating a RSA private key
.........++++....................................................++++
writing new private key to '/etc/jitsi/meet/jitsi.example.com.key'
---------------------
You can now switch to a Let's Encrypt certificate. To do so, execute:
/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
----------------
Setting up lua-filesystem:amd64 (1.6.3-1) ...
Setting up lua-bitop:amd64 (1.0.2-5) ...
Setting up jitsi-meet-web (1.0.3962-1) ...
Setting up lua5.1 (5.1.5-8.1build2) ...
update-alternatives: using /usr/bin/lua5.1 to provide /usr/bin/lua (lua-interpreter) in auto mode
update-alternatives: using /usr/bin/luac5.1 to provide /usr/bin/luac (lua-compiler) in auto mode
Setting up lua-expat:amd64 (1.3.0-4) ...
Setting up jicofo (1.0-541-1) ...
useradd: warning: the home
 
directory already exists.
Not copying any file from skel directory into it.
Setting up prosody (0.10.0-1build1) ...
Adding user prosody to group ssl-cert
Setting up jitsi-meet-prosody (1.0.3962-1) ...
Generating RSA private key, 2048 bit long modulus (2 primes)
.............+++++...+++++
e is 65537 (0x010001)
Choose key size (2048): Key written to /var/lib/prosody/jitsi.example.com.key
Please provide details to include in the certificate config file.
Leave the field empty to use the default value or '.' to exclude the field.
countryName (GB): localityName (The Internet): organizationName (Your Organisation): organizationalUnitName (XMPP Department): commonName (jitsi.example.com): emailAddress ([email protected]):
Config written to /var/lib/prosody/jitsi.example.com.cnf
Certificate written to /var/lib/prosody/jitsi.example.com.crt
 
Generating RSA private key, 2048 bit long modulus (2 primes)
..............+++++..........+++++
e is 65537 (0x010001)
Choose key size (2048): Key written to /var/lib/prosody/auth.jitsi.example.com.key
Please provide details to include in the certificate config file.
Leave the field empty to use the default value or '.' to exclude the field.
countryName (GB): localityName (The Internet): organizationName (Your Organisation): organizationalUnitName (XMPP Department): commonName (auth.jitsi.example.com): emailAddress ([email protected]):
Config written to /var/lib/prosody/auth.jitsi.example.com.cnf
Certificate written to /var/lib/prosody/auth.jitsi.example.com.crt
 
Clearing symlinks in /etc/ssl/certs...
done.
Updating certificates in /etc/ssl/certs...
134 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

Adding debian:auth.jitsi.example.com.pem
done.
done.
Setting up jitsi-meet (2.0.4376-1) ...
Processing triggers for systemd (237-3ubuntu10.39) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
[email protected]:~# 

安装完成后,输入以下命令提交 SSL 证书。

注意:在 SSL 安装过程中需要输入电子邮件地址。

[email protected]

然后点击进入。

[email protected]:~# /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
---------------------------------------------------------------------
This script will:
- Need a working DNS record pointing to this machine(for domain jitsimeet.example.com)
- Download certbot-auto from https://dl.eff.org to /usr/local/sbin
- Install additional dependencies in order to request Let's Encrypt certificate
- If running with jetty serving web content, will stop Jitsi Videobridge
- Configure and reload nginx or apache2, whichever is used
 
You need to agree to the ACME server's Subscriber Agreement (https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf)
by providing an email address for important account notifications
Enter your email and press [ENTER]: [email protected]
--2020-04-02 22:48:27-- https://dl.eff.org/certbot-auto
Resolving dl.eff.org (dl.eff.org)... 151.101.112.201, 2a04:4e42:1b::201
Connecting to dl.eff.org (dl.eff.org)|151.101.112.201|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 80073 (78K) [application/octet-stream]
Saving to: 'certbot-auto'
 
certbot-auto 	100%[==================>] 78,20K --.-KB/s	in 0,07s  
 
2020-04-02 22:48:28 (1,13 MB/s) - 'certbot-auto' saved [80073/80073]

Creating virtual environment...
Installing Python packages...
Installation succeeded.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Unable to register an account with ACME server
[email protected]:~#

验证安装

现在我们可以打开浏览器并输入地址 https://jitsimeet.example.com 或者 https://jitsimeet.example.com. 然后,按照上面的链接更好地熟悉界面。

注意:Jitsi 建议至少使用 2 GB 内存,尽管大多数服务器现在使用 2 GB 或更多 GB 作为标准,即使您有更少或希望通过配置内存分页文件来安全使用。

[email protected]:~# dd if=/dev/zero of=/swapfile count=2048 bs=1M
[email protected]:~#

[email protected]:~# chmod 600 /swapfile
[email protected]:~#

[email protected]:~# mkswap /swapfile
[email protected]:~#

[email protected]:~# swapon /swapfile
[email protected]:~#

[email protected]:~#echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
/swapfile none swap sw 0 0
[email protected]:~#

[email protected]:~#free -m
total used free shared buff/cache available
Mem: 3936 1399 1558 37 977 2261
Swap: 472 0 472
[email protected]:~#

结论

回顾我们学到的东西; 在本文中,我们了解了 Jitsi 是什么、它的用途以及如何在 Ubuntu 18 上设置它。这组开源项目使我们能够创建一个安全的视频会议系统,提供卓越的音质、出色的加密和隐私,等等。 官方 Jitsi 客户端既可用作应用程序,也可在 Web 浏览器中运行,允许我们广播桌面和单个窗口。

立即咨询专家!

除了许多其他平台之外,Liquid Web 还可以提供这种类型的平台,以利用 Jitsi 和类似软件,您可以在其中扩展和多样化您有效沟通的能力。 如果您想开始使用这些选项,请联系我们一位知识渊博的托管顾问或解决方案团队成员,讨论您的选择!

给我们打电话 800.580.4985,或打开一个 聊天 或门票以了解您今天如何利用这些技术!

[ad_2]

Related Posts