搭建WebRTC視訊會議服務02
本節開始安裝MCU Server。MCU Server有兩種工作模式,一種是通過GPU,一種是通過CPU,由於我用的是虛擬機器,所以這裡用的是CPU。
1、許可權配置
1.1、/etc/security/limits.conf
* hard nproc unlimited * soft nproc unlimited * hard nofile 163840 * soft nofile 163840 * hard stack 1024 * soft stack 1024
1.2、/etc/pam.d/login
session required pam_limits.so
1.3、/etc/security/limits.d/xx-nproc.conf
* hard nproc unlimited * soft nproc unlimited
1.4、/etc/sysctl.conf
fs.file-max=200000 net.core.rmem_max=16777216 net.core.wmem_max=16777216 net.core.rmem_default=16777216 net.core.wmem_default=16777216 net.ipv4.udp_mem=4096 87380 16777216 net.ipv4.tcp_rmem=4096 87380 16777216 net.ipv4.tcp_wmem=4096 65536 16777216 net.ipv4.tcp_mem=8388608 8388608 16777216
1.5、啟用設定
sudo/sbin/sysctl -p ulimit -a
2、解壓檔案
tar -xf CS_WebRTC_Conference_Server_MCU.v4.1.tgz mv Release-v4.1 /neohope/webrtc/MCU-Release-v4.1
3、編譯依賴庫
3.1、Cisco OpenH264
cd /neohope/webrtc/MCU-Release-v4.1/video_agent #編譯並安裝依賴庫 install_deps.sh #關閉支援 #uninstall_openh264.sh #開啟支援 #install_openh264.sh
3.2、ffmpeg with libfdk_aac
cd /neohope/webrtc/MCU-Release-v4.1/audio_agent compile_ffmpeg_with_libfdkaac.sh mv ffmpeg_libfdkaac_lib/* lib/
4、初始化服務
#非GPU加速 bin/init-all.sh #GPU加速 #bin/init-all.sh --hardware
5、開啟服務
bin/start-all.sh starting nuve, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-nuve.stdout starting cluster-manager, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-cluster-manager.stdout starting audio-agent, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-audio-agent.stdout starting conference-agent, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-conference-agent.stdout 2018-10-11 00:24:30.336- INFO: AmqpClient - Connecting to rabbitMQ server OK, hostPort: { host: 'localhost', port: 5672 } 2018-10-11 00:24:30.366- INFO: ErizoAgent - conference agent join cluster ok. 2018-10-11 00:24:30.415- INFO: ClusterWorker - Join cluster woogeen-cluster OK. 2018-10-11 00:24:30.429- INFO: ErizoAgent - as rpc server ok. 2018-10-11 00:24:30.431- INFO: ErizoAgent - as monitoring target ok. starting recording-agent, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-recording-agent.stdout 2018-10-11 00:24:32.547- INFO: AmqpClient - Connecting to rabbitMQ server OK, hostPort: { host: 'localhost', port: 5672 } starting sip-agent, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-sip-agent.stdout 2018-10-11 00:24:33.886- INFO: AmqpClient - Connecting to rabbitMQ server OK, hostPort: { host: 'localhost', port: 5672 } 2018-10-11 00:24:33.914- INFO: ErizoAgent - sip agent join cluster ok. 2018-10-11 00:24:33.961- INFO: ClusterWorker - Join cluster woogeen-cluster OK. 2018-10-11 00:24:33.970- INFO: ErizoAgent - as rpc server ok. 2018-10-11 00:24:33.973- INFO: ErizoAgent - as monitoring target ok. starting streaming-agent, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-streaming-agent.stdout 2018-10-11 00:24:35.160- INFO: AmqpClient - Connecting to rabbitMQ server OK, hostPort: { host: 'localhost', port: 5672 } 2018-10-11 00:24:35.187- INFO: ErizoAgent - streaming agent join cluster ok. 2018-10-11 00:24:35.235- INFO: ClusterWorker - Join cluster woogeen-cluster OK. 2018-10-11 00:24:35.246- INFO: ErizoAgent - as rpc server ok. 2018-10-11 00:24:35.262- INFO: ErizoAgent - as monitoring target ok. starting video-agent, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-video-agent.stdout 2018-10-11 00:24:36.529- INFO: AmqpClient - Connecting to rabbitMQ server OK, hostPort: { host: 'localhost', port: 5672 } 2018-10-11 00:24:36.563- INFO: ErizoAgent - video agent join cluster ok. 2018-10-11 00:24:36.603- INFO: ClusterWorker - Join cluster woogeen-cluster OK. 2018-10-11 00:24:36.616- INFO: ErizoAgent - as rpc server ok. 2018-10-11 00:24:36.631- INFO: ErizoAgent - as monitoring target ok. starting webrtc-agent, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-webrtc-agent.stdout 2018-10-11 00:24:37.938- INFO: AmqpClient - Connecting to rabbitMQ server OK, hostPort: { host: 'localhost', port: 5672 } 2018-10-11 00:24:37.964- INFO: ErizoAgent - webrtc agent join cluster ok. 2018-10-11 00:24:37.999- INFO: ClusterWorker - Join cluster woogeen-cluster OK. 2018-10-11 00:24:38.020- INFO: ErizoAgent - as rpc server ok. 2018-10-11 00:24:38.024- INFO: ErizoAgent - as monitoring target ok. starting management-console, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-management-console.stdout Start management-console HTTP server starting portal, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-portal.stdout 2018-10-11 00:24:40.691- INFO: AmqpClient - Connecting to rabbitMQ server OK, hostPort: { host: 'localhost', port: 5672 } 2018-10-11 00:24:40.715- INFO: Main - portal initializing as rpc client ok 2018-10-11 00:24:40.733- INFO: Main - portal join cluster ok, with rpcID: [email protected] 2018-10-11 00:24:40.734- INFO: ClusterWorker - Join cluster woogeen-cluster OK. 2018-10-11 00:24:40.741- INFO: Main - portal initializing as rpc server ok 2018-10-11 00:24:40.748- INFO: Main - [email protected] as monitor ready starting sip-portal, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-sip-portal.stdout starting app, stdout -> /home/neohope/webrtc/MCU-Release-v4.1/logs/woogeen-app.stdout
6、測試服務,訪問地址
http://172.16.172.80:3004/
7、停止服務
bin/stop-all.sh stopping nuve stopping cluster-manager stopping audio-agent stopping conference-agent stopping recording-agent stopping sip-agent stopping streaming-agent stopping video-agent stopping webrtc-agent stopping management-console stopping portal. stopping sip-portal stopping app