在全新centos 7 下安装Jitsi-meet

在centos 7 下安装Jitsi-meet

参考原文https://blog.csdn.net/bigk_9527/article/details/83451143

  • 安装linux扩展源
  1. 阿里源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bakup        # 复制原有的源文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo              # 通过wget获取阿里云的源文件

yum clean all                                   # 清除缓存

yum makecache   

     2EPEL源

yum install epel-release

 

  • 更新原有旧版本软件、安装必要软件
  1. 卸载centos自带openjdk,安装java-1.8.0-openjdk.x86_64
  2. 安装pcre,pcre-devel,zlib,zlib-devel,openssl1.0.1或openssl1.0.2,,openssl-devel
  3. 安装nginx1.7(1.2版本以下不可以)Nginx代码路径下./configure --with-http_ssl_module ,然后Make ;make install
  4. yum install gcc
  5. yum install prosody
  6. yum install maven
  7. 安装node-v8.10.0-linux-x64.tar.gz
  8. 安装git
  • 配置prosody

以下(192.168.90.186)为指定域名,可更改

1.增加配置文件 /etc/prosody/conf.d/192.168.90.186.cfg.lua

VirtualHost "192.168.90.186"

    authentication = "anonymous"

    ssl = {

        key = "/var/lib/prosody/192.168.90.186.key";

        certificate = "/var/lib/prosody/192.168.90.186.crt";

    }

    modules_enabled = {

        "bosh";

        "pubsub";

    }

    c2s_require_encryption = false

 

VirtualHost "auth.192.168.90.186"

    ssl = {

        key = "/var/lib/prosody/auth.192.168.90.186.key";

        certificate = "/var/lib/prosody/auth.192.168.90.186.crt";

    }

    authentication = "internal_plain"

 

 admins = {"focus@auth.192.168.90.186"}

 

Component "conference.192.168.90.186" "muc"

Component "jitsi-videobridge.192.168.90.186"

    component_secret = "mysecret1"

Component "focus.192.168.90.186"

    component_secret = "mysecret2"

 

2、生成密钥

prosodyctl cert generate 192.168.90.186

prosodyctl cert generate auth.192.168.90.186

生成秘钥

prosodyctl register focus auth.192.168.90.186 mysecret3

生成用户密码

 

  1. 修改配置文件:/etc/prosody/prosody.cfg.lua

--VirtualHost "example.com"

-- certificate = "/path/to/example.crt"

--VirtualHost "localhost"

VirtualHost "192.168.90.186" --增加自己配置的域名

--VirtualHost "192.168.200.132"

ssl={

key="/var/lib/prosody/192.168.90.186.key";  --增加你自己的秘钥地址

certificate="/var/lib/prosody/192.168.90.186.crt";

}

 

  • 配置nginx

修改配置文件/usr/local/nginx/conf/nginx.conf

在HTTPS位置增添以下信息

# HTTPS server

    #

    server {

        listen       443 ssl;

        server_name 192.168.90.186;  ##自己在prosody 中配置的域名

 

        ssl_certificate     /var/lib/prosody/192.168.90.186.crt;  ##prosody生成的秘钥位置

        ssl_certificate_key /var/lib/prosody/192.168.90.186.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 /home/software/jitsi-meet-master; ###jitsi-meet的根目录

         index index.html index.htm;

         error_page 404 /404.html;

        location /config.js {

              alias /home/software/jitsi-meet-master/config.js; ##jitsi-meet的配置文件位置

        }

        location ~ ^/([a-zA-Z0-9=\?]+)$ {

             rewrite ^/(.*)$ / break;

                }

 

        location / {

        ssi on;

        }

        ##Backward compatibility

         location ~ /external_api.* {

        root /home/software/jitsi-meet-master/libs; ##jitsi-meet的配置文件位置

        }

        # 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;

        }

}

  • 安装 jitsi-videobridge

wget https://download.jitsi.org/jitsi-videobridge/linux/jitsi-videobridge-linux-x64-1085.zip

解压后,进入文件夹,执行

./jvb.sh --host=localhost --domain=192.168.90.186 --port=5347 --secret=mysecret1 &

 

  • 安装jicofo

sudo git clone https://github.com/jitsi/jicofo.git

cd jicofo/

mvn package -DskipTests -Dassembly.skipAssembly=false

执行成功后, 进入target文件夹,选择系统对应的jicofo-{lin/lin64/win}-1.0-SNAPSHOT.zip包

将该压缩包解压到jicofo/文件夹下,并重命名为jicofo。

进入 jicofo/jicofo/,执行

./jicofo.sh --host=localhost --domain=192.168.90.186 --secret=mysecret2 --user_domain=auth.192.168.90.186 --user_name=focus --user_password=mysecret3

 

  • 安装jitsi-meet

(安装时不要使用root账户,会有异常惊喜出现,不要问我怎么知道的。)

sudo git clone https://github.com/jitsi/jitsi-meet.git

cd jitsi-meet/

npm install

Make

成功后,修改config.js

hosts: {

        // XMPP domain.

        domain: '192.168.90.186', //你自己的域名

 

        // XMPP MUC domain. FIXME: use XEP-0030 to discover it.

        muc: 'conference.192.168.90.186',

 

        // When using authentication, domain for guest users.

        // anonymousdomain: 'guest.example.com',

 

        // Domain for authenticated users. Defaults to <domain>.

        // authdomain: 'jitsi-meet.example.com',

 

        // Jirecon recording component domain.

        // jirecon: 'jirecon.jitsi-meet.example.com',

 

        // Call control component (Jigasi).

        // call_control: 'callcontrol.jitsi-meet.example.com',

     bridge: 'jitsi-videobridge.192.168.90.186',  //添加的配置

        // Focus component domain. Defaults to focus.<domain>.

        focus: 'focus.192.168.90.186',

    },

    useNicks:false,  //添加的配置

 

    // BOSH URL. FIXME: use XEP-0156 to discover it.

bosh: '//192.168.90.186/http-bind',

 

八、配置秘钥

Keytool –importcert -alias 192.168.90.186 -keystore /home/software/jdk1.8.0_161/jre/lib/security/cacerts -storepass changeit -file /var/lib/prosody/192.168.90.186.crt

 

如果配置密钥不成功,尝试在sip-communicator.properties文件中添加:

org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值