ติดตั้ง shinobi.video บน Centos 7
ที่มา จาก https://shinobi.video/docs/start
shinobi.video คือ โปรแกรม คล้ายๆ การทำ NVR ที่ใช้ในการดึงและเก็บ VDO จาก กล้อง CCTV หรือ อืนๆ ที่สามารถดึงข้อมูลในรูปแบบ VDO ได้
-
Open
Terminal
. -
Download and Install Node.js, NPM.
sudo yum update sudo yum install curl -y curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - sudo yum install nodejs npm -y
-
Install git command line library.
yum install git -y
-
Pull the
master
repository.git clone https://gitlab.com/Shinobi-Systems/Shinobi.git Shinobi
-
Open Shinobi directory.
cd Shinobi
-
Start the installer
chmod +x INSTALL/centos.sh && INSTALL/centos.sh
-
Packages will be installed. MariaDB will ask to create a password on first installation.
-
Once complete. Open up
http://localhost:8080
in your browser.-
Note : if you are installed on a remote computer open up the IP in your web browser.
-
-
Default credentials are as follows if you chose to install
default_data.sql
.Username : ccio@m03.ca Password : password
-
To update Shinobi with git and restart :
cd Shinobi git pull pm2 restart camera.js pm2 restart cron.js
ปัญหาที่พบ
หากทำการ rtsp ไปดูกล้อง แล้ว cpu สูง ลองปรับไม่ให้ auto และ disable api jpg ดู
เจอว่ากล้องค้างดูไม่ได้ ไปดู error ได้ที่ /home/Shinobi หรือตามที่ติดตั้ง จากนั้นใช้คำสั่ง pm2 logs
/root/.pm2/logs/camera-error.log last 15 lines:
0|camera | at IncomingMessage.emit (events.js:208:7)
0|camera | at abortIncoming (_http_server.js:439:9)
0|camera | at socketOnClose (_http_server.js:433:3)
0|camera | at emitOne (events.js:121:20)
0|camera | at Socket.emit (events.js:211:7)
0|camera | at TCP._handle.close [as _onclose] (net.js:561:12)
0|camera | BadRequestError: request aborted
0|camera | at IncomingMessage.onAborted (/home/Shinobi/node_modules/raw-body/index.js:231:10)
0|camera | at emitNone (events.js:106:13)
0|camera | at IncomingMessage.emit (events.js:208:7)
0|camera | at abortIncoming (_http_server.js:439:9)
0|camera | at socketOnClose (_http_server.js:433:3)
0|camera | at emitOne (events.js:121:20)
0|camera | at Socket.emit (events.js:211:7)
0|camera | at TCP._handle.close [as _onclose] (net.js:561:12)
จาก error ยังไม่ทราบว่าเกิดจากอะไร แต่ทำการ restart ด้วยคำสั่งนี้ไป pm2 restart all
หากในทางเลวร้ายไม่เจอวิธี อาจจะต้อง restart ทุกคืน