当前位置:网站首页>利用华为云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. 总结
边栏推荐
猜你喜欢
Ansible中的角色使用
Nanoprobes Ni-NTA-Nanogold——用于 His 标签标记和检测
Nature, Cell都在用的Relia Tech 抗原亲和纯化LYVE1抗体
哥斯拉加密WebShell过杀软
细胞图像数据的主动学习
Zhang Le: The Golden Triangle of R&D Efficiency and Practice in the Field of Demand and Agile Collaboration|Live Review
华云数据张华林:投身数字蓝海 绘就云上强国
阿里大牛最新总结分享的高并发编程核心笔记(终极版),高并发系统架构场景一应俱全
数据科学家 Agnis Liukis :在ML领域,初学者踩过的5个坑
APT组织最喜欢的工具 Cobalt Strike (CS) 实战
随机推荐
第07章 InnoDB数据存储结构【2.索引及调优篇】【MySQL高级】
驻冰岛使馆提醒旅冰中国公民务必加强安全防护
Nanoprobes Ni-NTA-Nanogold——用于 His 标签标记和检测
软件测试考证:ISTQB、软件评测师
用1000行代码统计西安新房价格后,我有一个惊人的发现……
爬虫——代理搭建、爬取视频网站、爬取新闻、BeautifulSoup4介绍、bs4 遍历文档树、bs4搜索文档树、bs4使用选择器
552个元宇宙App,70个搞社交,哪款真能交到朋友?
How to connect a VMware virtual machine to the network "recommended collection"
不卷不pua,早9晚6,这个招聘深得我心
DAY19(DAY20、DAY21拓展):SQL 注入
162_Power Query is a custom function for quickly merging tables in a folder TableXlsxCsv_2.0
优思学院|2022年获美质协ASQ和ILSSI奖项的《精益六西格玛的十条戒律》
使用Typora+EasyBlogImageForTypora写博客,无图床快速上传图片
可视化数据库设计软件有哪些_数据库可视化编程
GMapping原理分析[通俗易懂]
工作流自动化,低代码是解决关键
第二讲 软件生命周期
MySQL数据表操作实战
[A summary of the sorting and use of activation functions in deep learning]
Nanoprobes FluoroNanogold 偶联物的特色和应用