ubuntu搭建stun和turn服务器

//切换root账户
sudo su root

//更新
apt-get update

//安装openssl
apt-get install openssl

apt-get install libssl-dev

//安装libevent
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz

tar xvfz libevent-2.0.21-stable.tar.gz

cd libevent-2.0.21-stable

./configure

make

make install

//安装 coturn

apt-get install sqlite

apt-get install libsqlite3-dev

wget https://github.com/coturn/coturn/archive/4.5.0.7.tar.gz

tar xvfz 4.5.0.7.tar.gz

cd coturn-4.5.0.7

./configure

make

make install

//配置并启动coturn

turnadmin -a -u your_name -p your_password -r your_realm

cp /usr/local/etc/turnserver.conf.default /usr/local/etc/turnserver.conf

turnserver -a -f -v -r your_realm

参考:

https://github.com/coturn/coturn

http://www.pressc.cn/967.html

你可能感兴趣的:(webrtc)