搭建webrtc服务器(ubuntu14.04)
2016-04-21 16:54
573 查看
搭建webrtc服务器ubuntu1404
一搭建房间服务器apprtcpython大法
安装 Google App Engine SDK for Python 记得自己准备梯子
安装一些依赖和工具
编译和运行apprtc
二搭建信令服务器collidergolang
三搭建stuntrun服务器coturncc
文件下载到 /usr/local 目录下并解压
将解压后的目录添加到环境变量中
Install grunt by first installing npm. npm is distributed as part of nodejs.
安装 grunt-cli
On Ubuntu 14.04 the default packages installs /usr/bin/nodejs but the /usr/bin/node executable is required for grunt. This is installed on some Ubuntu package sets; if it is missing, you can add this by installing the nodejs-legacy package.
获取 apprtc 源码并安装
Finally, you will want to install grunt and required grunt dependencies. This can be done from any directory under your checkout of the webrtc/apprtc repository.
一搭建房间服务器apprtcpython大法
安装 Google App Engine SDK for Python 记得自己准备梯子
安装一些依赖和工具
编译和运行apprtc
二搭建信令服务器collidergolang
三搭建stuntrun服务器coturncc
搭建webrtc服务器(ubuntu14.04)
一、搭建房间服务器apprtc(python大法)
安装房间服务器时有很多google的依赖工具或库,需要梯子,但需要下载量不大!!!安装 Google App Engine SDK for Python 记得自己准备梯子
下载 Google App Engine SDK for Python 的zip压缩包:google_appengine_1.9.36.zip文件下载到 /usr/local 目录下并解压
cd /usr/local
unzip google_appengine_1.9.36.zip
将解压后的目录添加到环境变量中
export PATH=$PATH:/usr/local/google_appengine
安装一些依赖和工具
安装 npmInstall grunt by first installing npm. npm is distributed as part of nodejs.
sudo apt-get install nodejs
sudo npm install -g npm
安装 grunt-cli
On Ubuntu 14.04 the default packages installs /usr/bin/nodejs but the /usr/bin/node executable is required for grunt. This is installed on some Ubuntu package sets; if it is missing, you can add this by installing the nodejs-legacy package.
sudo npm -g install grunt-cli
获取 apprtc 源码并安装
Finally, you will want to install grunt and required grunt dependencies. This can be done from any directory under your checkout of the webrtc/apprtc repository.
git clone https://github.com/webrtc/apprtc.git[/code]cd /usr/local/apprtcnpm install
安装webtest package
On Ubuntu, you will also need to install the webtest package.sudo apt-get install python-webtest编译和运行apprtc
重新编译apprtc
Before you start the AppRTC dev server and *everytime you update the source code you need to recompile the App Engine package.grunt build
启动apprtc房间服务器
Start the AppRTC dev server from the out/app_engine directory by running the Google App Engine SDK dev serverdev_appserver.py ./out/app_engine
dev_appserver.py 是/usr/local/google_appengine目录下的文件,已经配置在环境变量中二、搭建信令服务器collider(golang)
信令服务器是使用golang编写,需要搭建golang的编译环境(安装golang => 配置环境变量),在此不赘述。
Install the Go tools and workspaces as documented at http://golang.org/doc/install and http://golang.org/doc/code.html
将collider的源码链接到上一步配置的GOPATH
为什么要创建链接呢? 因为这样不需要拷贝代码即可直接编译ln -s `pwd` /apprtc/src/collider/collider $GOPATH/src/ln -s `pwd` /apprtc/src/collider/collidermain $GOPATH/src/ln -s `pwd` /apprtc/src/collider/collidertest $GOPATH/src/
获取安装依赖
Install dependenciesgo get collidermain
安装时可能会提示collider.go中有找不到的对象
go_workspace/src/collider/collider.go:55: undefined: tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
go_workspace/src/collider/collider.go:59: undefined: tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
找到这个文件的这两行,删除、删除、删除 对的你么有看错,删除
安装collidermain
Install collidermaingo install collidermain
运行$GOPATH/bin/collidermain -port=8089 -tls=false
如果在 $GOPATH/bin/ 找不到collidermain 就直接用 collidermain -port=8089 -tls=false
因为编译安装后直接放到 /usr/bin 目录中去了三、搭建stun&trun服务器coturn(c/c++)
不需要编译安装,有安装包。好幸福的感觉!
下载 turnserver 安装包
我选择的是turnserver-v4.4.5.3
解压后会有一个 INSTALL 和 coturn_4.4.5.3-1_amd64.deb 文件
coturn_4.4.5.3-1_amd64.deb是安装文件
INSTALL文件为安装说明
按照提示一步步安装即可sudo apt-get updatesudo apt-get install gdebi-coresudo gdebi coturn_4.4.5.3-1_amd64.deb
运行/usr/local/coturn/bin/turnserver -o -a -f -v --mobility -m 10 --min-port=32355 --max-port=65535 --user=true:true1234 --user=true2:true1234 -r demo -L 192.168.0.7 -p 10002
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- ubuntu下chrome无法同步问题解决
- Ubuntu Linux使用体验
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹
- 从USB安装Ubuntu Server 10.04.3 图文详解
- Ubuntu 15.04 正式版发布下载
- Linux-Ubuntu 10.04安装Cadence-ic610 方法总结图解
- Ubuntu 12.04和Windows 7双系统安装图解
- 开机出现:grub rescue的修复方法
- Ubuntu连接Android真机调试
- 你应该选择 Ubuntu 还是 Fedora?
- 100 个最佳 Ubuntu 应用(中)
- 看看我的Ubuntu Linux截图
- Ubuntu 12.04 LTS服务器版安装过程及使用图解
- Windows 7/8/8.1 硬盘安装 Ubuntu 14.04 实现双系统