ubuntu16.04
owt git
https://github.com/open-webrtc-toolkit/owt-server.git
下載代碼,安裝依賴
mkdir owt
cd owt
//同步代碼
git clone https://github.com/open-webrtc-toolkit/owt-server.git
cd owt-server
//安裝依賴
scripts/installDepsUnattended.sh
npm install -g node-gyp graceful-fs grunt-cli
編譯
./scripts/build.js -t mcu --check
js
git clone https://github.com/open-webrtc-toolkit/owt-client-javascript.git
cd owt-client-javascript/scripts/
npm install && grunt
打包
./scripts/pack.js -t all -f -a -s ~/owt/owt-client-javascript/dist/samples/conference/
配置 owt-server
配置、運行都是在 dist 目錄下,爲了運行 SFU,我們需要修改以下兩處配置:
● 編輯
webrtc_agent/agent.toml
修改
[webrtc]
部分的
network_interfaces
添加
{name = "eth2", replaced_ip_address = "192.0.2.2"}
(需要把
name
設置爲網卡實際名稱,
replaced_ip_address
設置爲服務器公網 IP 地址),
maxport
minport
注意配置文件裏 max 在前,min 在後,別配反了;
● 編輯
portal/portal.toml
修改
[portal]
部分裏的
ip_address
爲服務器公網 IP 地址,
ssl
按需設置爲 true 或 false;
運行
cd owt-server/dist
./bin/init-all.sh
./bin/start-all.sh