一、安装webRTC环境的准备工作
1.centos 下载位置:
https://mirrors.openanolis.cn/anolis/8.4/isos/GA/x86_64/
2.win 10 没有 hyper
解决办法:【转】windows 没有hyper-v 解决方法
3.安装 centos
教程:https://www.jianshu.com/p/f4e5430266e1
4.centos 启动失败
解决办法:
5.centos 无法连接网络(ping 114.114.114.114 失败)
解决方法:
ip addr 查看网卡名称;
vi /etc/sysconfig/network-scripts/ifcfg-网卡名字:vi /etc/sysconfig/network-scripts/ifcfg-eth0
在文件中修改:ONBOOT=ON 修改为ONBOOT=yes
在该文件中添加 DNS1 = 8.8.8.8 DNS2=4.2.2.2
重启网卡 ifup eth0
二、centos 工具安装
yum -y install wget
yum install -y git
yum install -y python3-pip
yum install -y meson
yum install -y re2c
yum install cmake
yum install libevent-devel
yum install curl-devel
sudo yum install gcc-c++
git 全局配置:
git config –global http.sslVerify “false”
三、janus webRTC 环境安装
1.安装依赖
yum install libmicrohttpd-devel jansson-devel /
openssl-devel libsrtp-devel sofia-sip-devel glib2-devel /
opus-devel libogg-devel libcurl-devel pkgconfig /
libconfig-devel libtool autoconf automake
2.libnice
git clone https://gitlab.freedesktop.org/libnice/libnice
cd libnice
meson –prefix=/usr build && ninja -C build && sudo ninja -C build install
3.usrsctp
git clone https://github.com/sctplab/usrsctp
cd usrsctp
./bootstrap
./configure –prefix=/usr –disable-programs –disable-inet –disable-inet6 –disable-dependency-track
make && sudo make install
4.libsrtp
wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz
tar xfv v2.2.0.tar.gz
cd libsrtp-2.2.0
./configure –prefix=/usr –enable-openssl
make shared_library && sudo make install
5.websocket可不装
git clone https://libwebsockets.org/repo/libwebsockets
cd libwebsockets
mkdir build
cd build
cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS=”-fpic” ..
make && sudo make install
6.janus-gateway
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure –prefix=/opt/janus
make && sudo make install
make configs
7.启动:
/opt/janus/bin/janus
四、可能遇到的问题:
问题:/usr/bin/env: ‘python’: No such file or directory
解决方法:sudo ln -s /usr/bin/python3 /usr/bin/python
问题:hv_balloon: Balloon request will be partially fulfilled. Balloon floor reached
原创文章,作者:306829225,如若转载,请注明出处:https://blog.ytso.com/270379.html