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



2核4G S6云服务器








3. 登录云服务器


弹性云服务器
更多



立即登录
root

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



5. 使用SecureCRT登录云服务器
CloudShellSecureCRT 6.5SecureCRT 6.5Key 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.5SecureCRT 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. 总结
边栏推荐
- 15年软件架构师经验总结:在ML领域,初学者踩过的5个坑
- 苹果终于认清现实,销量成为优先考虑,iPhone14将不涨价
- Left index of all anagrams in leetcode/string (some permutation of s1 string is a substring of s2)
- GBase 8c数据库集群中,怎么替换节点呢?比如设置A节点为gtm,换到B节点上。
- 中国菜刀原理与实践
- Golang sync.WaitGroup
- 位级运算之提取位级表示的最高位
- MySQL数据表操作实战
- Nanoprobes Ni-NTA-Nanogold——用于 His 标签标记和检测
- tinymce 如何实现动态国际化
猜你喜欢

厨卫电器行业数字化集采管理系统:优化产业供应结构,实现采购业务流程集中管控

HCIP Fifteenth Day Notes (Three-layer Architecture of Enterprise Network, VLAN and VLAN Configuration)

Redis学习

鸿湖万联扬帆富设备开发板正式合入OpenHarmony主干

设计思维 | 详看设计工作坊Workshop的11个关键技巧

【框架】idea找不到xxx依赖项怎么办

Nanoprobes 金纳米颗粒标记试剂丨1.4 nm Nanogold 标记试剂

项目管理:PMP和IPMP哪个更值得考?两个证书的区别在于哪里?

“杀猪盘”宰向环球影城

使用Typora+EasyBlogImageForTypora写博客,无图床快速上传图片
随机推荐
【深度学习中的激活函数的整理与使用总结】
svn安装包和客户端
0代码4步体验物联网设备上云
“芯片法案”通过后,美光承诺在美国扩产
将移位距离和假设外推到非二值化问题
中国手机品牌争论谁是国内第一,而它已成为中国手机在海外的代表
数字孪生的4个最佳实践
Top 10 free proxy IP software_Domestic static IP proxy software
第二讲 软件生命周期
English语法_介词 - 概述
[Microservice] Multi-level cache
TensorFlow离线安装包
Nanoprobes FluoroNanogold 偶联物的特色和应用
Relia Tech活性VEGFR重组蛋白丨小鼠 VEGF120实例展示
【web渗透】CSRF漏洞详细讲解
美国拟对华禁售128层以上NAND Flash制造设备
typedef关键字的用法
MySQL【视图】
使用百度EasyDL实现施工人员安全装备检测
Golang dictionary map