webrtc apprtc full deployment
4578 단어 WebRTC
1.turn server 설치
mkdir /root/src cd /root/src/ wget “http://turnserver.open-sys.org/downloads/v4.5.0.3/turnserver-4.5.0.3-CentOS6.6-x86_64.tar.gz” tar zxvf turnserver-4.5.0.3-CentOS6.6-x86_64.tar.gz cd turnserver-4.5.0.3./install.sh service turnserver start chkconfig turnserver on 2,Python 용 Google App Engine SDK 설치
yum install -y https://centos6.iuscommunity.org/ius-release.rpm yum install -y python27 python27-devel python27-libs python27-pip python27-setuptools python27-tools
mkdir -p /data/webrtc cd /data/webrtc/ wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.40.zip unzip google_appengine_1.9.40.zip python2.7 /data/webrtc/google_appengine/dev_appserver.py
3.nodejs 와 grunt 설치
curl –silent –location https://rpm.nodesource.com/setup_4.x | bash - yum -y install nodejs npm install -g grunt-cli
5.collidermain 컴 파일
yum install -y golang
cd /root/src git clone https://github.com/webrtc/apprtc.git mkdir -p /root/collider/src cd /root/collider/src/ ln -sf /root/src/apprtc/src/collider/collider ln -sf /root/src/apprtc/src/collider/collidermain ln -sf /root/src/apprtc/src/collider/collidertest export GOPATH=/root/collider/ cd /root/collider/ vim src/collider/collider.go #line 58 tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 }, go get collidermain go install collidermain
ls -l bin
cp bin/collidermain /usr/local/bin
copy cert and key file to /cert/cert.pem /cert/key.pem
/usr/local/bin/collidermain -port 8089 -room-server https://webrtc.learndevops.cn -tls
nohup /usr/local/bin/collidermain -port 8089 -room-server https://webrtc.learndevops.cn -tls &
7.nginx 서비스 설치
yum install -y https://centos6.iuscommunity.org/ius-release.rpm yum install -y php70u-cli php70u-devel php70u-fpm php70u-fpm-nginx php70u-gd php70u-json php70u-mbstring php70u-mcrypt php70u-mysqlnd php70u-opcache php70u-pdo php70u-pecl-redis php70u-xml
vim /etc/php.ini #date.timezone = Asia/Shanghai service php-fpm start chkconfig php-fpm on
yum install -y nginx cd /etc/nginx/conf.d/ mkdir backup mv default.conf ssl.conf virtual.conf backup/
vim /etc/nginx/conf.d/webrtc.conf
#
upstream roomserver { server 127.0.0.1:8080; }
server { listen 80 ; server_name webrtc.learndevops.cn; return 301 https:// servername request_uri; }
server { listen 443 ; ssl on; ssl_certificate /cert/cert.pem; ssl_certificate_key /cert/key.pem;
server_name webrtc.learndevops.cn;
access_log /var/log/nginx/webrtc.learndevops.log;
location / {
proxy_pass http://roomserver$request_uri;
proxy_set_header Host $host;
}
location ~ ^(.+\.php)(.*)$ {
root /data/www/api.learndevops.cn/current;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
}
}
#
service nginx start chkconfig nginx on
8.ICEServer 설정
mkdir -p /data/www/api.learndevops.cn/current/ vim /data/www/api.learndevops.cn/current/ice.php
mkdir -p /data/webrtc/
cd /data/webrtc/ git clone https://github.com/webrtc/apprtc.git cd /data/webrtc/apprtc/ npm install –unsafe-perm
http_proxy=http://139.59.226.58:3128/ npm install –unsafe-perm
grunt build
cd /data/webrtc/apprtc/ vim src/app_engine/constants.py
#
ICE_SERVER_BASE_URL = ‘https://webrtc.learndevops.cn’ ICE_SERVER_URL_TEMPLATE = ‘%s/ice.php?key=%s’
ICE_SERVER_API_KEY = os.environ.get(‘ICE_SERVER_API_KEY’)
ICE_SERVER_API_KEY = ‘123456’
#
#
WSS_INSTANCES = [{ WSS_INSTANCE_HOST_KEY: ‘webrtc.learndevops.cn:8089’, WSS_INSTANCE_NAME_KEY: ‘wsserver-std’, WSS_INSTANCE_ZONE_KEY: ‘aliyun’ }]
#
grunt build vim out/app_engine/js/apprtc.debug.js
comment line 2115
//window.history.pushState({“roomId”:roomId, “roomLink”:roomLink}, roomId, roomLink);
python2.7 /data/webrtc/google_appengine/dev_appserver.py /data/webrtc/apprtc/out/app_engine/
nohup python2.7 /data/webrtc/google_appengine/dev_appserver.py /data/webrtc/apprtc/out/app_engine/ &
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
HTML, 웹캠으로 잔상 펀치를 쳐 보았다.웹캠을 브라우저에 표시 Canvas에 웹캠 이미지 내보내기 내보낼 때의 투명도를 0.5로 설정 setInterval로 반복 참고 URL 카메라를 사용해 보자 - WebRTC 입문 2016...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.