webrtc conturn 服务器配置

ubutun 16.04系统环境

安装组件

sudo apt-get install libssl-devsudo

apt-get install libevent-devsudo

apt-get install libpq-devsudo

apt-get install mysql-clientsudo

apt-get install libmysqlclient-devsudo

apt-get install libhiredis-devsudo

apt-get install git

git clone https://github.com/coturn/coturn

cd coturn

./configure

make

sudo make install

which turnserver 查看是否安装成功

turnserver -o -a -f -v --mobility -m 10 --max-bps=100000 --min-port=32355 --max-port=65535 --user=ling:ling1234 --user=ling2:ling1234 -r demo

-m 10 表示启动十个relay线程. 

当TURN Server用于WebRTC时,必须使用long-term credential mechanism,  即指定 -a 或者 --lt-cred-mech

--max-bps=100000 限制最大速度为100KB/s. 

添加了两个用户ling 和ling2. 

可以直接使用turnutils_uclient -u ling -w ling1234 来测试. turnutils_uclient 有很多参数可以配置的. 

参考网址:https://blog.csdn.net/wojiaopanpan/article/details/50698184

https://blog.csdn.net/lamb7758/article/details/77045735

https://www.cnblogs.com/mobilecard/p/6542294.html

你可能感兴趣的:(Linux)