将turnserver设定成开机启动
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详细的设定,后续的文章中会出现
最新文章
- swift的后台编码路
- Webwork 学习之路【05】请求跳转前 xwork.xml 的读取
- 昨天在公司加班,上午好像就是弄一个ftp的linux服务问题
- poj1067-取石子游戏-wythoff博弈
- Java 集合系列 13 WeakHashMap
- struts2-2.3.4.1的struts-default.xml源码
- 嵌入式控制(0)----linux系统网络配置
- c#+ArcEngine中的IGroupLayer的用法
- Add Two Numbers - C++链表操作
- 在maven仓库中查找jar
- (大数据工程师学习路径)第一步 Linux 基础入门----用户及文件权限管理
- (1)Deep Learning之感知器
- Angular4---起步----环境配置安装@angular/cli
- java编程思想-第五章-某些练习题
- 【原创】驱动加载之StartService
- Django 中的Form表单认证
- 快速高效实现微信小程序图片上传与腾讯免费5G存储空间的使用
- python中的break\return\pass\continue用法
- springboot项目的重定向和转发
- Android 性能测试工具- GT