当前位置:网站首页>利用华为云ECS服务器搭建安防视频监控平台【华为云至简致远】
利用华为云ECS服务器搭建安防视频监控平台【华为云至简致远】
2022-08-03 13:58:00 【InfoQ】
1. 前言
2. 购买云服务器



2核4G S6云服务器









3. 登录云服务器


弹性云服务器

更多




立即登录

root


4. 使用CloudShell登录云服务器
CloudShell登录




5. 使用SecureCRT登录云服务器
CloudShell
SecureCRT 6.5
SecureCRT 6.5
Key exchange failed
命令行输入:
vim /etc/ssh/sshd_config
在文件最后添加:
KexAlgorithms [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
保存退出。
重启ssh服务
service ssh restart


[1]弹性云服务器状态为“运行中”。
[2]弹性云服务器已经绑定弹性公网IP,绑定方式请参见绑定弹性公网IP。
[3]所在安全组入方向已开放22端口,配置方式请参见配置安全组规则。
[4]使用的登录工具(如PuTTY,SecureCRT`)与待登录的弹性云服务器之间网络连通。例如,默认的22端口没有被防火墙屏蔽。
SecureCRT 6.5
SecureCRT 6.5
,自己下载一个即可。当然,不一定非要使用












6. 安装NFS服务器
[email protected]:~# sudo apt-get install nfs-kernel-server
[email protected]:~# mkdir work
/home/work *(rw,no_root_squash,sync,no_subtree_check,insecure)





/etc/init.d/nfs-kernel-server start #启动 NFS 服务
ufw disable #关闭防火墙
/etc/init.d/nfs-kernel-server restart #重启NFS服务
exportfs -arv #共享路径生效
[email protected]:~$ sudo mount -t nfs -o nolock 122.112.212.171:/home/work /home/wbyq/mnt/



sudo mount -t nfs -o nolock 122.112.212.171:/home/work /home/wbyq/mnt/

7. 安装NGINX(配置RTMP服务)
[email protected]:~# sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev

[email protected]:~# mkdir nginx
[email protected]:~# cd nginx/
[email protected]:~# wget http://nginx.org/download/nginx-1.10.3.tar.gz
[email protected]:~# wget http://zlib.net/zlib-1.2.11.tar.gz
[email protected]:~# wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz
[email protected]:~# wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz
[email protected]:~# wget https://github.com/arut/nginx-rtmp-module/archive/master.zip

[email protected]:~# tar xvf openssl-1.0.2k.tar.gz
[email protected]:~# tar xvf nginx-rtmp-module-master.tar.gz
[email protected]:~# tar xvf nginx-1.8.1.tar.gz
[email protected]:~# tar xvf pcre-8.40.tar.gz
[email protected]:~# tar xvf zlib-1.2.11.tar.gz

[email protected]:~# cd nginx-1.8.1/
[email protected]:~# ./configure --prefix=/usr/local/nginx --with-debug --with-pcre=../pcre-8.40 --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.0.2k --add-module=../nginx-rtmp-module-master
[email protected]:~/nginx/nginx-1.8.1# make && make install
/usr/local/nginx/nginx:主程序
[email protected]:/usr/local/nginx/sbin# /usr/local/nginx/sbin/nginx -v
nginx version: nginx/1.8.1
[email protected]:~# vim /usr/local/nginx/conf/nginx.conf
打开文件后,在文件最后加入以下配置:
rtmp {
server {
listen 8888;
application live {
live on;
record all;
record_unique on;
record_path "./video"; #视频缓存的路径
record_suffix -%Y-%m-%d-%H_%M_%S.flv;
}
}
}
[email protected]:/usr/local/nginx/sbin# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
sudo service nginx start
sudo service nginx stop
sudo service nginx restart
sudo service nginx start
8. 摄像头推流音视频到服务器


9. 编写本地RTMP流播放器


10. 总结
边栏推荐
- typedef关键字的用法
- [A summary of the sorting and use of activation functions in deep learning]
- 中国手机品牌争论谁是国内第一,而它已成为中国手机在海外的代表
- 华云数据张华林:投身数字蓝海 绘就云上强国
- 微服务的快速开始(nacos)最全快速配置图解
- HCIP Day 16 Notes (SVI, Spanning Tree Protocol)
- The Chinese Embassy in Nigeria issued an emergency safety warning for the area near Zuma Rock in Abuja
- How to connect a VMware virtual machine to the network "recommended collection"
- W11或W10系统如何进行休眠?
- 升级农企业务运营建设,智慧供应链管理平台打造“共赢生态链”
猜你喜欢
设计思维 | 详看设计工作坊Workshop的11个关键技巧
UE4 解决C盘缓存问题
大型连锁百货运维审计用什么软件好?有哪些功能?
162_Power Query is a custom function for quickly merging tables in a folder TableXlsxCsv_2.0
华云数据张华林:投身数字蓝海 绘就云上强国
ideaIU-2020.1下载
项目管理:PMP和IPMP哪个更值得考?两个证书的区别在于哪里?
如何合理安排一天,做到高效备考?
连亏四个月,赚不回电费,预制菜经销商恐成“韭菜”?
第07章 InnoDB数据存储结构【2.索引及调优篇】【MySQL高级】
随机推荐
【二叉树】统计最高分的节点数目
如何在 UE4 中制作一扇自动开启的大门
使用百度EasyDL实现施工人员安全装备检测
厨卫电器行业数字化集采管理系统:优化产业供应结构,实现采购业务流程集中管控
MySQL知识总结 (十二) 数据库相关概念
How to connect a VMware virtual machine to the network "recommended collection"
游戏版号“地下交易”,一个版号能卖上千万?
Top 10 free proxy IP software_Domestic static IP proxy software
将移位距离和假设外推到非二值化问题
超大规模的产业实用语义分割数据集PSSL与预训练模型开源啦!
使用百度EasyDL实现施工人员安全装备检测
js \n\r 换行失败 :【white-space: pre-line;】${} Template Literals
Tao Te: Engine or baggage?
飞桨开源社区季度报告来啦,你想知道的都在这里
Nanoprobes 金纳米颗粒标记试剂丨1.4 nm Nanogold 标记试剂
保健用品行业B2B电子商务系统:供采交易全链路数字化,助推企业管理精细化
DAY19(DAY20、DAY21拓展):SQL 注入
c语言结构体知识总结
How to use matlab to implement the piecewise function "recommended collection"
go map转struct【mapstructure库】