此教程操作系统用ubuntu 14.04 64位,最好已经翻墙(Lantern),centos系统请下拉看第二部分
以上命令使用root账号运行,如果非root用户,请自行在命令前加sudo (提示没权限,请输入超级用户密码)
apt-get install libsqlite3-dev -y
apt-get install libevent-dev -y
wget http://igustudio.com/coturn.zip
cp ./examples/etc/turn* ./bin/
mv turnserver.conf turnserver.conf.bak
nohup /usr/local/webrtc/coturn/bin/turnserver --syslog -a -L 172.18.201.41 -X 134.175.239.29 -E 172.18.201.41 -f --min-port=32355 --max-port=65535 --user=helloworld:helloworld -r helloworld --cert=turn_server_cert.pem --pkey=turn_server_pkey.pm --log-file=stdout -v > /usr/local/turn.log &
172.18.201.41为内网IP,134.175.239.29为外网IP,请自行修改为安装服务器的ip
查看日志:tail -f /usr/local/turn.log
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
yum install -y make gcc cc gcc-c++ wget
yum install -y openssl-devel libevent libevent-devel mysql-devel mysql-server
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable && ./configure
sudo make && sudo make install && cd ..
另外具体版面可以到: http://turnserver.open-sys.org/downloads/ 查看
wget http://turnserver.open-sys.org/downloads/v4.4.5.2/turnserver-4.4.5.2.tar.gz
tar -zxvf turnserver-4.4.5.2.tar.gz
cd turnserver-4.4.5.2 && ./configure
sudo make && sudo make install
==================================================================
1) If you system supports automatic start-up system daemon services,
the, to enable the turnserver as an automatically started system
a) Create and edit /etc/turnserver.conf or
/usr/local/etc/turnserver.conf .
Use /usr/local/etc/turnserver.conf.default as an example.
b) For user accounts settings: set up SQLite or PostgreSQL or
MySQL or MongoDB or Redis database for user accounts.
Use /usr/local/share/turnserver/schema.sql as SQL database schema,
or use /usr/local/share/turnserver/schema.userdb.redis as Redis
database schema description and/or
/usr/local/share/turnserver/schema.stats.redis
as Redis status & statistics database schema description.
If you are using SQLite, the default database location is in
/var/db/turndb or in /usr/local/var/db/turndb or in /var/lib/turn/turndb.
c) add whatever is necessary to enable start-up daemon for the
2) If you do not want the turnserver to be a system service,
then you can start/stop it "manually", using the "turnserver"
executable with appropriate options (see the documentation).
3) To create database schema, use schema in file
/usr/local/share/turnserver/schema.sql.
4) For additional information, run:
=============================================================
nohup turnserver --syslog -a -L 172.18.201.41 -X 134.175.239.29 -E 172.18.201.41 -f --min-port=32355 --max-port=65535 --user=helloworld:helloworld -r helloworld --cert=turn_server_cert.pem --pkey=turn_server_pkey.pm --log-file=stdout -v > /usr/local/turn.log &
ps:172.18.201.41为内网IP,134.175.239.29为外网IP,请自行修改为安装服务器的ip。
查看日志:tail -f /usr/local/turn.log
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
测试1:在浏览器上输入:http://你的ip或者域名:3478/ ,看到如下信息,则安装成功
测试2:https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/