1、安装软件包
#apt install coturn
2、配置coturn
2.1、复制DTLS、TLS支持的证书文件
# cp /usr/share/coturn/examples/etc/turn_server_cert.pem /etc/turn_server_cert.pem
# cp /usr/share/coturn/examples/etc/turn_server_pkey.pem /etc/turn_server_pkey.pem
2.2、编辑修改/etc/turnserver.conf文件
listening-port=3478
tls-listening-port=5349
listening-ip=192.168.1.230
external-ip=47.104.19.243(NAT必须)
lt-cred-mech
user=tcp:123456(必须)
realm=example.com(必须)
2.3、编辑修改 /etc/default/coturn
TURNSERVER_ENABLED=1(必须)
3、验证安装结果
3.1、重启toturn.
# service coturn restart
3.2、使用toturn客户端测试
# turnadmin -a -u test -r leifeng-elec.com-p test
# turnutils_uclient 148.70.219.242 -u test -w 123456