系统环境
[root@izwz974lqepn0tz8winy9oz ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.3.1611 (Core)
Release: 7.3.1611
Codename: Core
软件环境
yum install pcre
yum install pcre-devel
yum install make
yum install gcc
yum install gcc-c++
yum install zlib
yum install zlib-devel
检查openssl1.0.1或openssl1.0.2(openssl version查看版本信息)
yum install openssl-devel
yum install unzip
yum install ca-certificates
yum install git
yum install maven
yum install nginx
安装配置prosody
说明下面所有命令和配置文件中的IP要替换成自己公网或内网IP安装
yum install prosody
增加配置文件
vim /etc/prosody/conf.d/119.78.167.243.cfg.lua
文件内容
VirtualHost "119.78.167.243"
authentication = "anonymous"
ssl = {
key = "/var/lib/prosody/119.78.167.243.key";
certificate = "/var/lib/prosody/119.78.167.243.crt";
}
modules_enabled = {
"bosh";
"pubsub";
}
c2s_require_encryption = false
VirtualHost "auth.119.78.167.243"
ssl = {
key = "/var/lib/prosody/auth.119.78.167.243.key";
certificate = "/var/lib/prosody/auth.119.78.167.243.crt";
}
authentication = "internal_plain"
admins = { "[email protected]" }
Component "conference.119.78.167.243" "muc"
Component "jitsi-videobridge.119.78.167.243"
component_secret = "mysecret1"
Component "focus.119.78.167.243"
component_secret = "mysecret2"
执行命令生成密匙
prosodyctl cert generate 119.78.167.243
prosodyctl cert generate auth.119.78.167.243
prosodyctl register focus auth.119.78.167.243 mysecret3
修改配置
vim /etc/prosody/prosody.cfg.lua
查找example.crt处,附近添加
--VirtualHost "example.com"
-- certificate = "/path/to/example.crt"
VirtualHost "119.78.167.243"
ssl={
key="/var/lib/prosody/119.78.167.243.key";
certificate="/var/lib/prosody/119.78.167.243.crt";
}
更新证书
ln -sf /var/lib/prosody/auth.119.78.167.243.crt /etc/pki/ca-trust/source/anchors/auth.119.78.167.243.crt
update-ca-trust force-enable
update-ca-trust extract
重启 prosody
prosodyctl restart
安装 jitsi-videobridge
创建 文件夹 后台的服务都放在jitsi文件夹下
mkdir /etc/jitsi
cd /etc/jitsi
下载,解压,启动
wget https://download.jitsi.org/jitsi-videobridge/linux/jitsi-videobridge-linux-x64-1115.zip
unzip jitsi-videobridge-linux-x64-1115.zip
mv jitsi-videobridge-linux-x64-1115.zip jitsi-videobridge
#后台启动
nohup sh /etc/jitsi/jitsi-videobridge/jvb.sh --host=localhost --domain=119.78.167.243 --port=5347 --secret=mysecret1 > /var/log/jvb.log 2>&1 &
NAT 配置, 不配置可能Videobridge不能访问. 导致2人以上出问题
vim ~/.sip-communicator/sip-communicator.properties
增加 内网 外网配置 . 不知道内网ip ,用 ifconfig命令查看
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=172.17.30.233
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=119.78.167.243
安装jicofo
sudo git clone https://github.com/jitsi/jicofo.git
cd jicofo/
mvn package -DskipTests -Dassembly.skipAssembly=false
进入target文件夹,选择系统对应的jicofo-linux-x64-1.1-SNAPSHOT.zip包,解压到 /etc/jitsi/jitsi-jicofo
cd target
unzip jicofo-linux-x64-1.1-SNAPSHOT.zip -d ../../
rm -rf jicofo
cd ../../
mv jicofo-linux-x64-1.1-SNAPSHOT jicofo
后台启动,日志在/var/log/jicofo.log
nohup sh /etc/jitsi/jicofo/jicofo.sh --host=localhost --domain=119.78.167.243 --secret=mysecret2 --user_domain=auth.119.78.167.243 --user_name=focus --user_password=mysecret3 > /var/log/jicofo.log 2>&1 &
这里打包可能会报错 尝试下更新Maven 版本 或者清除下 多试几次
上传编译好的jitsi-mmet web包
这里就不采用下载源码编译了,因为要定制修改部分东西,比较麻烦.
你也可以自己下载源码编译. 自己编译的话,注意nginx中的那些路径要改.编译需要nodejs 环境.可以参考文字后面的几个链接来弄
jitsi-meet.zip
此包基于快速安装基础下有修改默认配置,水印等.不过还是要改动根目录下的config.js 把里面的IP都替换为自己的
上传至
/etc/jitsi/
unzip jitsi-meet.zip
修改nginx配置
vim /etc/nginx/nginx.conf
HTTPS server 修改为
# HTTPS server
#
server {
listen 443 ssl;
server_name 119.78.167.243; # 自己在prosody 中配置的域名
ssl_certificate /var/lib/prosody/119.78.167.243.crt; ##prosody生成的秘钥位置
ssl_certificate_key /var/lib/prosody/119.78.167.243.key; ## prosody生成的秘钥位置
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
root /etc/jitsi/jitsi-meet; ###jitsi-meet的根目录
index index.html index.htm;
error_page 404 /404.html;
# 配置文件已经放入打包的jitsi-meet包中了
#location /config.js {
# alias /etc/jitsi/jitsi-meet/config.js;
# }
location ~ ^/([a-zA-Z0-9=\?]+)$ {
rewrite ^/(.*)$ / break;
}
location / {
ssi on;
}
##Backward compatibility
location ~ /external_api.* {
root /etc/jitsi/jitsi-meet/libs;
}
# BOSH
location /http-bind{
proxy_pass http://localhost:5280/http-bind;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
}
}
检查配置,并重启
nginx -t
nginx -s restart
访问https://119.78.167.243 看是否正常运行,注意开三个窗口测试下
添加自动启动
位置
vim /etc/rc.local 注意sh文件目录位置 每行记得回车
touch /var/lock/subsys/local
nginx
nohup prosodyctl restart &
nohup /etc/jitsi/jitsi-videobridge/jvb.sh --host=localhost --domain=119.78.167.243 --port=5347 --secret=mysecret1 > /var/log/jvb.log 2>&1 &
nohup /etc/jitsi/jicofo//jicofo.sh --host=localhost --domain=119.78.167.243 --secret=mysecret2 --user_domain=auth.119.78.167.243 --user_name=focus --user_password=mysecret3 > /var/log/jicofo.log 2>&1 &
最后执行
chmod +x /etc/rc.d/rc.local
参考内容
https://blog.csdn.net/king05800/article/details/85599855
https://blog.csdn.net/bigk_9527/article/details/83451143
https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md
https://www.cnblogs.com/cmsd/p/6078705.html