Centos安装turn stun 服务器
2015-09-22 23:09
971 查看
1.install and download prerequisite for CentOS
yum install -y make gcc cc gcc-c++ wget
yum install -y openssl-devel libevent libevent-devel mysql-devel mysql-server
2. download and install LibEvent modules
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 ..
3.download and install TURN modules
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
service, you have to:
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
/usr/local/bin/turnserver.
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:
$ man turnserver
$ man turnadmin
$ man turnutils
==================================================================
4.Configure “turnserver.conf” file
cp /usr/local/etc/turnserver.conf.default /etc/turnserver.conf
vi /etc/turnserver.conf
listeningi-port=3478
listening-ip=xxx.xxx.xxx.xxx
user=cube:cube
external-ip=xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx
pidfile="/var/run/turnserver.pid"
log-file=/var/tmp/turn.log
5.Run TURN server
nohup turnserver -v -r 123.57.232.224:3478 -a -o -c /etc/turnserver.conf > /dev/null &
turnserver -v -r 123.57.232.224:3478 -a -o -c /etc/turnserver.conf
6.Stop TURN
cat /var/run/turnserver.pid or /var/tmp/turnserver.pid
12345
kill 12345
yum install -y make gcc cc gcc-c++ wget
yum install -y openssl-devel libevent libevent-devel mysql-devel mysql-server
2. download and install LibEvent modules
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 ..
3.download and install TURN modules
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
service, you have to:
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
/usr/local/bin/turnserver.
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:
$ man turnserver
$ man turnadmin
$ man turnutils
==================================================================
4.Configure “turnserver.conf” file
cp /usr/local/etc/turnserver.conf.default /etc/turnserver.conf
vi /etc/turnserver.conf
listeningi-port=3478
listening-ip=xxx.xxx.xxx.xxx
user=cube:cube
external-ip=xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx
pidfile="/var/run/turnserver.pid"
log-file=/var/tmp/turn.log
5.Run TURN server
nohup turnserver -v -r 123.57.232.224:3478 -a -o -c /etc/turnserver.conf > /dev/null &
turnserver -v -r 123.57.232.224:3478 -a -o -c /etc/turnserver.conf
6.Stop TURN
cat /var/run/turnserver.pid or /var/tmp/turnserver.pid
12345
kill 12345
相关文章推荐
- linux网口驱动实现(待续)
- Linux下动态链接库生成与使用
- linux远程复制文件
- LINUX下的21个特殊符号 转
- CentOS 6.7命令行下装图形界面(用下载的镜像文件CentOS-6.7-i386-bin-DVD1.iso)
- Linux LVM空间拓展演示
- 3.分析Linux内核的启动过程
- linux 内核调试相关资料
- Linux进程间通信(IPC)编程实践(一) 基本概念和匿名管道
- Linux知识(3)----常用快捷键和命令
- dig---优秀域名故障排查工具
- Linux之加密解密基础、openssl及CA基础应用
- Linux输入子系统
- Centos启动FTP及常见问题
- Linux高级权限管理 - ACL
- 嵌入式linux的tftp安装配置及tftp命令用法
- 《Linux内核设计的艺术》总结: 进程1的创建
- linux下tftp使用
- linux c 生成八位的随机密码
- Linux Kernel CMPXCHG函数分析