其他分享
首页 > 其他分享> > stun server编译部署

stun server编译部署

作者:互联网

1、下载编译安装libevent2
下载地址 https://libevent.org/
[root@localhost ~]#tar zxvf libevent-2.1.11-stable.tar.gz
[root@localhost ~]#cd libevent-2.1.11-stable
[root@localhost libevent-2.1.11-stable]# ./configure
编译过程有报错会停止,问题另查
[root@localhost libevent-2.1.11-stable]#make&make install
安装过程有报错会停止,问题另查

2、安装openssl
[root@localhost etc]#yum -y install openssl-devel
生成证书
[root@localhost etc]#openssl req -x509 -newkey rsa:2048 -keyout /etc/turn_server_pkey.pem -out /etc/turn_server_cert.pem -days 99999 -nodes

3、下载编译安装coturn
下载地址 https://coturn.net/turnserver/
[root@localhost ~]#tar zxvf coturn-4.5.1.1.tar.gz
[root@localhost ~]#cd coturn-4.5.1.1.tar.gz
[root@localhost coturn-4.5.1.1]# ./configure
编译过程有报错会停止,问题另查

[root@localhost coturn-4.5.1.1]#make&make install
安装过程有报错会停止,问题另查
查看是否安装成功
[root@localhost coturn-4.5.1.1]#which turnserver
/usr/local/bin/turnserver
备份初始配置文件
[root@localhost coturn-4.5.1.1]#cp /usr/local/etc/turnserver.conf.default /usr/local/etc/turnserver.conf
修改配置,启动进程
[root@localhost coturn-4.5.1.1]#turnserver -o -c /usr/local/etc/turnserver.conf

stun server 测试工具
互联网测试地址 https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
局域网测试工具 NAT类型测试工具 链接:https://pan.baidu.com/s/1oF_dUbbdbyg5wK-6OXLjBA 提取码:gngr

标签:4.5,1.1,turnserver,stun,server,编译,root,coturn,localhost
来源: https://www.cnblogs.com/wehavesite/p/14898283.html