ShinobiCE/Installation

From r00tedvw.com wiki
(Difference between revisions)
Jump to: navigation, search
(Troubleshooting)
(Troubleshooting)
Line 54: Line 54:
 
└──────────┴────┴──────┴──────┴────────┴─────────┴────────┴──────┴───────────┴──────┴──────────┘</nowiki>
 
└──────────┴────┴──────┴──────┴────────┴─────────┴────────┴──────┴───────────┴──────┴──────────┘</nowiki>
 
<br>
 
<br>
Remove and re-add nodeJS services to PM2 for auto start on boot. It is '''CRITICAL''' that you start the JS processes from within the directory they live.  Unfortunately the JS processes rely on other dependencies that are called from the relative directory you are launching them from, not the folder the JS file lives in.
+
Remove and re-add nodeJS services to PM2 for auto start on boot.<br>It is '''CRITICAL''' that you start the JS processes from within the directory they live.  Unfortunately the JS processes rely on other dependencies that are called from the relative directory you are launching them from, not the folder the JS file lives in.
 
  <nowiki>~$ cd /opt/Shinobi
 
  <nowiki>~$ cd /opt/Shinobi
 
~$ sudo pm2 start /opt/Shinobi/camera.js
 
~$ sudo pm2 start /opt/Shinobi/camera.js

Revision as of 23:58, 20 April 2022

Installation

Contents

Overview

Node.JS Zoneminder CCTV alternative

Ubuntu 20.04

Requirements

estimate
per 5MP IP camera @ 30FPS 5000 bitrate (full resolution)

  • CPU - unknown
  • RAM - unknown
  • Disk - 72GB per day

Installation

Installation needs to be done as root

~$ sudo su

Dependencies

~$ add-apt-repository universe
~$ apt install -y wget curl git software-properties-common net-tools dos2unix make zip ffmpeg

NodeJS

~$ curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
~$ apt update -y && apt install -y nodejs

Clone Project

Place the project in the opt directory

~$ cd /opt/
~$ git clone https://gitlab.com/Shinobi-Systems/Shinobi.git Shinobi

Update SQL Scripts

I had issues with the default installation scripts so I had to make a few changes.

~$ vim /opt/Shinobi/sql/user.sql
CREATE USER 'majesticflame'@'%' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON ccio.* TO 'majesticflame'@'%';
FLUSH PRIVILEGES;

Install Shinobi

~$ cd /opt/Shinobi
~$ chmod +x INSTALL/ubuntu.sh && INSTALL/ubuntu.sh

Update pm2 so there are no autostart issues with the pm2-root service.

~$ pm2 unstartup
~$ npm install pm2@latest -g
~$ pm2 startup

Troubleshooting

Verify services are running.

MariaDB
~$ systemctl status mariadb.service
NodeJS
~$ systemctl status pm2-root.service

~$ sudo pm2 list
...
┌──────────┬────┬──────┬──────┬────────┬─────────┬────────┬──────┬───────────┬──────┬──────────┐
│ App name │ id │ mode │ pid  │ status │ restart │ uptime │ cpu  │ mem       │ user │ watching │
├──────────┼────┼──────┼──────┼────────┼─────────┼────────┼──────┼───────────┼──────┼──────────┤
│ camera   │ 0  │ fork │ 5821 │ online │ 0       │ 55s    │ 0.5% │ 99.3 MB   │ root │ disabled │
│ cron     │ 1  │ fork │ 5932 │ online │ 0       │ 41s    │ 0.2% │ 50.2 MB   │ root │ disabled │
└──────────┴────┴──────┴──────┴────────┴─────────┴────────┴──────┴───────────┴──────┴──────────┘


Remove and re-add nodeJS services to PM2 for auto start on boot.
It is CRITICAL that you start the JS processes from within the directory they live. Unfortunately the JS processes rely on other dependencies that are called from the relative directory you are launching them from, not the folder the JS file lives in.

~$ cd /opt/Shinobi
~$ sudo pm2 start /opt/Shinobi/camera.js
~$ sudo pm2 start /opt/Shinobi/cron.js
~$ sudo pm2 startup
~$ sudo pm2 save
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
2020 Election
Volkswagen
Covid
NCDMV
Toolbox