aws EC2 搭建coturn服务

■ step1

download source

1
wget https://coturn.net/turnserver/v4.5.0.8/turnserver-4.5.0.8.tar.gz

■ step2

install libs

1
2
sudo yum update
sudo yum install gcc openssl-devel sqlite sqlite-devel libevent libevent-devel

■ step3

install coturn

1
2
3
./configure
make
sudo make install

config

1
2
3
4
5
6
relay-ip=127.0.0.1
min-port=49152
max-port=65535
no-tls
no-dtls
stun-only

■ step4

start server

1
2
sudo cp /usr/local/etc/turnserver.conf.default /usr/local/etc/turnserver.conf
turnserver

常见问题

  1. Cannot create pid file: /var/run/turnserver.pid: Permission denied
1
2
3
whereis turnserver
# output like: turnserver: /usr/local/bin/turnserver /usr/local/etc/turnserver.conf
sudo /usr/local/bin/turnserver
  1. Cannot bind local socket to addr: Address already in use
1
2
3
# turnserve already started.
sudo pkill turnserve
# if already be used. use other port.
  1. security input port setting
TYPE RANGE
TCP 3478
UDP 3478
UDP 49152-65535
  1. how to test

webrtc tun/stun online test

#

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×