Webrtc 媒体服务器 Janus 搭建注意事项


1.确保使用ubuntu16.04版本(or debian9)

2.安装依赖库,

 apt-get install libmicrohttpd-dev libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libini-config-dev libcollection-dev libwebsockets-dev pkg-config gengetopt automake libtool doxygen graphviz git cmake

apt-get install libavformat-dev

apt-get install libconfig8-dev

mkdir -p ~/build

cd ~/build

卸载旧版本LIBSRTP

sudo apt-get remove libsrtp0-dev

安装官方最新版本

git clone https://github.com/cisco/libsrtp.git

cd libsrtp/

./configure --prefix=/usr --enable-openssl

    make shared_library && make install

git clone https://github.com/meetecho/janus-gateway.git

cd janus-gateway

 sh autogen.sh

 ./configure --prefix=/opt/janus

 make 

make install

3.安装完成后,使用 make configs  命令批量生成  /opt/janus/etc/janus/  的配置文件


4.修改janus.cfg 打开官方提供的STUN,修改janus.transport.http.cfg配置,将https 改为yes 打开HTTPS端口。

5.启动服务  

执行   /opt/janus/bin/janus

*后台启动

/opt/janus/bin/janus -d 5 -6 > mylogfile 2>&1 &

6.开https服务器 

在git源码janus-gateway/html目录下执行

确保server.key cent.pem 文件和/opt/janus/share/janus/certs 文件一致!!!

http-server --cert server.crt --key server.key --ssl --cors -p 8443

你可能感兴趣的:(Webrtc 媒体服务器 Janus 搭建注意事项)