官 网 https://shinobi.video/
GitHub https://github.com/moeiscool/Shinobi
GitLab https://gitlab.com/Shinobi-Systems/Shinobi

刷机过程

下载玩客云armbian系统 地址: https://github.com/hzyitc/armbian-onecloud/releases
把系统包并解压。(Armbian-unofficial_24.5.0-trunk_Onecloud_bookworm_current_6.6.21_minimal.burn.img)
2024-06-03T13:56:42.png
打开 USB_Burning_Tool软件,先导入刚解压完的直刷包,然后勾选擦除,最后点击开始
设备先不要通电,使用双公头USB线,一头连接玩客云靠近HDMI的USB口,另一头插电脑。
长按 复位键 的同时,并接通设备电源。听到 电脑发出类似插入U盘的声音,电脑烧录软件出现烧录进度,此时松复位键。
2024-06-03T13:54:24.png
等待烧录进度到达100%,拔掉USB线和电源并插上网线,重新通电。
玩客云指示灯会变换好几个颜色,最后通过路由器后台查看,名称为 onecloud 的新设备接入网络,刷机成功!

更换阿里源

bash <(curl -sSL https://linuxmirrors.cn/main.sh)

2024-05-27T14:07:35.png

安装shinobi

安装代码

sh <(curl -s https://cdn.shinobi.video/installers/shinobi-install.sh)

2024-05-27T14:12:33.png

安装完成

__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
 _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
  _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
   _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
    _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
     _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
      _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
       _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
        _\///______________\///______________\///__\///////////////__

2024-05-27T14:15:01.png

登陆网页端

浏览器登陆 http:// IP :8080/super
默认 Superuser : [email protected]
默认 Password : admin
2024-05-27T14:50:35.png

2024-05-27T15:06:38.png
add添加新用户后普通用户通过 http://IP:8080/ 登陆
2024-05-27T15:37:36.png

挂载移动硬盘/SD卡

root@onecloud:~# blkid /dev/mmcblk0
/dev/mmcblk0: UUID="16d35eb4-b756-4528-8e93-10d1734adc7b" BLOCK_SIZE="4096" TYPE="ext4"
root@onecloud:~# blkid /dev/sda
/dev/sda: UUID="93b002b0-3a94-4297-937f-98e4d2a2eb5f" BLOCK_SIZE="4096" TYPE="ext4"
root@onecloud:~# cd /
root@onecloud:/# mkdir DATA
root@onecloud:/# mkdir opt
root@onecloud:~# nano /etc/fstab
##
UUID=16d35eb4-b756-4528-8e93-10d1734adc7b   /DATA   ext4    defaults
UUID=93b002b0-3a94-4297-937f-98e4d2a2eb5f   /opt   ext4    defaults
##
root@onecloud:~# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  459M     0  459M   0% /dev
tmpfs          tmpfs      99M  3.0M   96M   3% /run
/dev/mmcblk1p2 ext4      6.9G  2.6G  4.3G  38% /
tmpfs          tmpfs     495M     0  495M   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     495M     0  495M   0% /tmp
/dev/mmcblk0   ext4       29G  2.7G   25G  10% /DATA
/dev/sda       ext4      117G   24K  111G   1% /opt
/dev/mmcblk1p1 vfat      256M   28M  229M  11% /boot
/dev/zram1     ext4       47M  1.9M   42M   5% /var/log
tmpfs          tmpfs      99M     0   99M   0% /run/user/0

修改存储位置

2024-06-04T00:32:56.png

2024-06-04T01:12:00.png

添加摄像头

2024-06-04T01:12:59.png
修改录像位置
2024-06-04T01:13:58.png

安装dokcer

  • 安装docker

    apt install docker.io
  • 安装导航Sun-Panel
    Github

    #  最新beta版本
    docker pull hslr/sun-panel:beta
    
    docker run -d --restart=always -p 3002:3002 \
    -v /DATA/AppData/sun-panel/conf:/app/conf \
    -v /var/run/docker.sock:/var/run/docker.sock \
    --name sun-panel \
    hslr/sun-panel:latest
  • 安装syncthing同步
    Github

    docker pull syncthing/syncthing:latest
    
    docker run -d \
    --name syncthing \
    --network=host \
    --privileged \
    --restart=unless-stopped \
    -p 8384:8384 \
    -e TZ=Asia/Shanghai \
    -v /DATA/AppData/syncthing:/var/syncthing \
    syncthing/syncthing:latest

    安装CasaOs

    输入安装代码

    wget -qO- https://get.casaos.io | bash

    打开app store 点击更多应用
    2024-05-27T14:41:12.png
    复制 armv7 32位软件源的链接
    2024-05-27T14:42:45.png

详细记录

root@onecloud:~# cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
root@onecloud:~# 
root@onecloud:~# bash <(curl -sSL https://linuxmirrors.cn/main.sh)
 +-----------------------------------+
 | ⡇  ⠄ ⣀⡀ ⡀⢀ ⡀⢀ ⡷⢾ ⠄ ⡀⣀ ⡀⣀ ⢀⡀ ⡀⣀ ⢀⣀ |
 | ⠧⠤ ⠇ ⠇⠸ ⠣⠼ ⠜⠣ ⠇⠸ ⠇ ⠏  ⠏  ⠣⠜ ⠏  ⠭⠕ |
 +-----------------------------------+
 欢迎使用 GNU/Linux 更换系统软件源脚本

 运行环境 Armbian-unofficial 24.5.0-trunk bookworm ARMv7
 系统时间 2024-05-27 11:50:42 Etc/UTC

 ❖  阿里云                            1)
 ❖  腾讯云                            2)
 ❖  华为云                            3)
 ❖  网易                              4)
 ❖  搜狐                              5)
 ❖  火山引擎                          6)
 ❖  清华大学                          7)
 ❖  北京大学                          8)
 ❖  浙江大学                          9)
 ❖  南京大学                         10)
 ❖  兰州大学                         11)
 ❖  上海交通大学                     12)
 ❖  重庆邮电大学                     13)
 ❖  中国科学技术大学                 14)
 ❖  中国科学院软件研究所             15)

└─ 请选择并输入你想使用的软件源 [ 1-15 ]:1

└─ 默认使用软件源的公网地址,是否继续? [Y/n] y

└─ 检测到系统中存在已备份的 sources.list 源文件,是否跳过覆盖备份? [Y/n] y

└─ 检测到系统中存在已备份的 armbian.list 源文件,是否跳过覆盖备份? [Y/n] y

[ >_ ] 开始更新软件源...

Hit:1 http://mirrors.aliyun.com/debian bookworm InRelease
Hit:2 http://mirrors.aliyun.com/debian bookworm-updates InRelease
Hit:3 http://mirrors.aliyun.com/debian bookworm-backports InRelease
Hit:4 http://mirrors.aliyun.com/debian-security bookworm-security InRelease
Hit:5 http://mirrors.aliyun.com/armbian bookworm InRelease
Reading package lists... Done                        

[成功] 软件源更换完毕

└─ 是否跳过更新软件包? [Y/n] n

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Image Name:   uInitrd
Created:      Mon May 27 11:53:34 2024
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    6397132 Bytes = 6247.20 KiB = 6.10 MiB
Load Address: 00000000
Entry Point:  00000000
update-initramfs: Armbian: Symlinking /boot/uInitrd-6.6.32-current-meson to /boot/uInitrd

└─ 是否清理已下载的软件包缓存? [Y/n] y

[完成] 清理完毕

---------- 脚本执行结束 ----------

Powered by https://linuxmirrors.cn

root@onecloud:~# sh <(curl -s https://cdn.shinobi.video/installers/shinobi-install.sh)
Opening Install Location : "/home"
Hit:1 http://mirrors.aliyun.com/debian bookworm InRelease
Hit:2 http://mirrors.aliyun.com/debian bookworm-updates InRelease
Hit:3 http://mirrors.aliyun.com/debian bookworm-backports InRelease
Hit:4 http://mirrors.aliyun.com/debian-security bookworm-security InRelease
Hit:5 http://mirrors.aliyun.com/armbian bookworm InRelease
Reading package lists... Done                        
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

Install the Development branch?
(y)es or (N)o? Default : No

Getting the Master Branch
Cloning into 'Shinobi'...
remote: Enumerating objects: 23316, done.
remote: Counting objects: 100% (275/275), done.
remote: Compressing objects: 100% (202/202), done.
remote: Total 23316 (delta 133), reused 162 (delta 73), pack-reused 23041 (from 1)
Receiving objects: 100% (23316/23316), 16.85 MiB | 3.73 MiB/s, done.
Resolving deltas: 100% (15624/15624), done.
-------------------------------------
---------- Shinobi Systems ----------
Repository : https://gitlab.com/Shinobi-Systems/Shinobi
Product : Shinobi Professional (Pro)
Branch : master
Version : 1fba3ffc8533bd6c21167dcce8dc29e4c79c1305
Date : Mon May 27 11:55:30 AM UTC 2024
-------------------------------------
-------------------------------------
*-----------------------------------*
Shinobi Installer
========
Select your OS
If your OS is not on the list please refer to the docs.
========
1. Ubuntu - Fast and Touchless
2. Ubuntu - Advanced
3. Alma Linux 9.2 / Rocky 9 / CentOS 8 - Fast and Touchless (Red Hat)
4. CentOS
5. MacOS
6. FreeBSD
7. OpenSUSE
========
1
=========================================================
==!! Shinobi : The Open Source CCTV and NVR Solution !!==
=========================================================
To answer yes type the letter (y) in lowercase and press ENTER.
Default is no (N). Skip any components you already have or don't need.
=============
=============
 Detecting Ubuntu Version
=============
=============
 Ubuntu Version: 12
=============
Shinobi - Do you want to temporarily disable IPv6?
Sometimes IPv6 causes Ubuntu package updates to fail. Only do this if your machine doesn't rely on IPv6.
(y)es or (N)o
y

=============
Default Superuser : [email protected]
Default Password : admin
* You can edit these settings in "super.json" located in the Shinobi directory.
=============
Shinobi - Installing Net-Tools
=============
Shinobi - Installing Node.js
=============

0 upgraded, 172 newly installed, 0 to remove and 0 not upgraded.
Need to get 98.3 MB of archives.

=============
Shinobi - Installing MariaDB
=============
Shinobi - Installing Database...
=============
Shinobi - Install NPM Libraries
=============
Shinobi - Install PM2

added 138 packages in 46s

13 packages are looking for funding
  run `npm fund` for details
Shinobi - Finished
INSTALL/ubuntu-touchless.sh: 101: dos2unix: not found
Shinobi - Randomizing cron key
addToConfig: [object Object]
Changes Complete. Here is what it is now.
{
  "port": 8080,
  "debugLog": false,
  "enableFaceManager": false,
  "videosDir": "__DIR__/videos",
  "passwordType": "sha256",
  "detectorMergePamRegionTriggers": true,
  "wallClockTimestampAsDefault": true,
  "useBetterP2P": true,
  "smtpServerOptions": {
    "allowInsecureAuth": true
  },
  "addStorage": [
    {
      "name": "second",
      "path": "__DIR__/videos2"
    }
  ],
  "db": {
    "host": "127.0.0.1",
    "user": "majesticflame",
    "password": "",
    "database": "ccio",
    "port": 3306
  },
  "mail": {
    "service": "gmail",
    "auth": {
      "user": "[email protected]",
      "pass": "your_password_or_app_specific_password"
    }
  },
  "cron": {
    "key": "7f3f11bd1fc5ec35c719238a8b9fa1a30e54a3af477eaf2a5be3922269c7"
  },
  "pluginKeys": {}
}
Shinobi - Starting Shinobi and setting to start on boot

                        -------------

__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
 _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
  _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
   _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
    _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
     _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
      _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
       _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
        _\///______________\///______________\///__\///////////////__


                          Runtime Edition

        PM2 is a Production Process Manager for Node.js applications
                     with a built-in Load Balancer.

                Start and Daemonize any application:
                $ pm2 start app.js

                Load Balance 4 instances of api.js:
                $ pm2 start api.js -i 4

                Monitor in production:
                $ pm2 monitor

                Make pm2 auto-boot at server restart:
                $ pm2 startup

                To go further checkout:
                http://pm2.io/


                        -------------

[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
[PM2] PM2 Successfully daemonized
[PM2] Starting /home/Shinobi/camera.js in fork_mode (1 instance)
[PM2] Done.
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0  │ camera             │ fork     │ 0    │ online    │ 0%       │ 28.9mb   │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
[PM2] Init System found: systemd
Platform systemd
Template
[Unit]
Description=PM2 process manager
Documentation=https://pm2.keymetrics.io/
After=network.target

[Service]
Type=forking
User=root
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Environment=PM2_HOME=/root/.pm2
PIDFile=/root/.pm2/pm2.pid
Restart=on-failure

ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect
ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all
ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill

[Install]
WantedBy=multi-user.target

Target path
/etc/systemd/system/pm2-root.service
Command list
[ 'systemctl enable pm2-root' ]
[PM2] Writing init configuration in /etc/systemd/system/pm2-root.service
[PM2] Making script booting at startup...
[PM2] [-] Executing: systemctl enable pm2-root...
Created symlink /etc/systemd/system/multi-user.target.wants/pm2-root.service → /etc/systemd/system/pm2-root.service.
[PM2] [v] Command successfully executed.
+---------------------------------------+
[PM2] Freeze a process list on reboot via:
$ pm2 save

[PM2] Remove init script via:
$ pm2 unstartup systemd
[PM2] Saving current process list...
[PM2] Successfully saved in /root/.pm2/dump.pm2
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0  │ camera             │ fork     │ 0    │ online    │ 100%     │ 72.0mb   │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
=====================================
||=====   Install Completed   =====||
=====================================
|| Login with the Superuser and create a new user!!
||===================================
|| Open http://192.168.123.162:8080/super in your web browser.
||===================================
|| Default Superuser : [email protected]
|| Default Password : admin
=====================================
=====================================

root@onecloud:~# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  459M     0  459M   0% /dev
tmpfs          tmpfs      99M  3.0M   96M   3% /run
/dev/mmcblk1p2 ext4      6.9G  2.6G  4.3G  38% /
tmpfs          tmpfs     495M     0  495M   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     495M     0  495M   0% /tmp
/dev/mmcblk1p1 vfat      256M   28M  229M  11% /boot
/dev/zram1     ext4       47M  1.7M   42M   4% /var/log
tmpfs          tmpfs      99M     0   99M   0% /run/user/0
root@onecloud:~# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda            8:0    0 119.2G  0 disk 
mmcblk0      179:0    0  28.9G  0 disk 
mmcblk1      179:16   0   7.3G  0 disk 
├─mmcblk1p1  179:17   0   256M  0 part /boot
└─mmcblk1p2  179:18   0     7G  0 part /var/log.hdd
                                       /
mmcblk1boot0 179:32   0     4M  1 disk 
mmcblk1boot1 179:48   0     4M  1 disk 
zram0        253:0    0 494.2M  0 disk [SWAP]
zram1        253:1    0    50M  0 disk /var/log
zram2        253:2    0     0B  0 disk 
root@onecloud:~# blkid /dev/mmcblk0
/dev/mmcblk0: UUID="16d35eb4-b756-4528-8e93-10d1734adc7b" BLOCK_SIZE="4096" TYPE="ext4"
root@onecloud:~# blkid /dev/sda
/dev/sda: UUID="93b002b0-3a94-4297-937f-98e4d2a2eb5f" BLOCK_SIZE="4096" TYPE="ext4"
root@onecloud:~# cd /
root@onecloud:/# mkdir DATA
root@onecloud:/# mkdir opt
root@onecloud:~# nano /etc/fstab
##
UUID=16d35eb4-b756-4528-8e93-10d1734adc7b   /DATA   ext4    defaults
UUID=93b002b0-3a94-4297-937f-98e4d2a2eb5f   /opt   ext4    defaults
##
root@onecloud:~# reboot

NVR in docker
通过docker部署摄像头录制软件shinobi
CASAOS 添加32位的ARM软件源方法

最后修改:2024 年 06 月 04 日
如果觉得我的文章对你有用,请随意赞赏