码迷,mamicode.com
首页 > 其他好文 > 详细

将turnserver设定成开机启动

时间:2014-07-11 20:19:23      阅读:398      评论:0      收藏:0      [点我收藏+]

标签:des   strong   文件   art   io   re   

1.创建一个文件,在目录/etc/init/下面

#sudo vim /etc/init/turnserver.conf

2.添加如下内容

description "turn server"
author "Haijunzhu"

# Saves log to /var/log/upstart/easyrtc.log
console log

# Starts only after drives are mounted.
start on started mountall

stop on shutdown

# Automatically Respawn. But fail permanently if it respawns 10 times in 5 seconds:
respawn
respawn limit 10 5

script
# Note: To run as a non root user, use exec sudo -u USERNAME node /var/nodes/easyrtc/server.js
exec start-stop-daemon --start --quiet --exec /usr/local/bin/turnserver --  -L 115.28.201.200
end script
~
~
~
~

 

3. 保存

4.重启

5.查看重启之后是否启动成功

#sudo netstat -ano|grep 3478

root@AY1406091211019989a7Z:~# netstat -ano|grep 3478
tcp 0 0 115.28.201.200:3478 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 10.144.39.153:3478 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN off (0.00/0/0)
udp 0 0 115.28.201.200:3478 0.0.0.0:* off (0.00/0/0)
udp 0 0 10.144.39.153:3478 0.0.0.0:* off (0.00/0/0)
udp 0 0 127.0.0.1:3478 0.0.0.0:* off (0.00/0/0)

 

note: 3478是turn 服务的默认端口号,当然,我们可以指定,关于turnserver详细的设定,后续的文章中会出现

 

 

 

 

 

 

将turnserver设定成开机启动,布布扣,bubuko.com

将turnserver设定成开机启动

标签:des   strong   文件   art   io   re   

原文地址:http://www.cnblogs.com/Haijunzhu/p/3833417.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!