H5S 视频监控AWS S3 对象存储
本文介绍一下如何使用S3对象存储作为H5S 存储空间进行录像存储
然后创建一个对象存储,本文以minio 为例(实际项目亲测天翼云):
首先安装 s3fs
如果是redhat系列,使用如下命令
sudo yum install epel-release
sudo yum install s3fs-fuse
如果是ubuntu 或者debian系列 使用如下命令
sudo apt install s3fs
建议先使用工具验证一下 对象存储是否可以访问
创建密码文件
echo bMoLv2fz1sGTmeNGwYcy:XVfpS6Ps6CniOtfsvFtDu8Jn2r0Ryycc7Ye2uy1I > /etc/passwd-s3fs
chmod 600 /etc/passwd-s3fs
尝试mount
s3fs h5s-stg /opt/record -o passwd_file=/etc/passwd-s3fs -o url=http://10.168.1.193:9000 -o use_path_request_style
如果出现s3fs 说明mount 成功
如果mount 失败可以使用带调试的命令
s3fs h5s-stg /opt/record -o passwd_file=/etc/passwd-s3fs -o url=http://10.168.1.193:9000 -o use_path_request_style -o dbglevel=info -f -o curldbg
命令行模式重启后不会自动挂在,可以编辑/etc/fstab,加入如下一行则会自动启动
h5s-stg /opt/record fuse.s3fs _netdev,allow_other,use_path_request_style,url=http://10.168.1.193:9000,update_parent_dir_stat 0 0
配置h5s存储路径后仪表盘会显示:
开启录像后会有文件产生: