There has been a request to clarify a working recipe for installing Shinobi.
The recipe has been tested on Bionic64-v8 stock version with devx loaded.
once the system is up and running I believe one can unload the devx.
Get the devx_bionicpup64_8.0.sfs and load it using Menu->Setup->SFS-Load-on-the-fly
The devx sfs contains tools needed for compiling and has git included plus more of the PERL language modules.
Open a terminal ->
finish the prompts.
https://nodejs.org/en/download/
download nodejs LTS (in my case node-v10.16.0-linux-x64)
open it with xarchive (click on it)
extract to /root/my-applications
open /root/my-applications/node-v10.16.0-linux-x64/bin
sym-link the these files, open a termnal ->
Code: Select all
ln -s /root/my-applications/node-v10.16.0-linux-x64/bin/node /root/my-applications/bin/node
ln -s /root/my-applications/node-v10.16.0-linux-x64/bin/npm /root/my-applications/bin/npm
ln -s /root/my-applications/node-v10.16.0-linux-x64/bin/npx /root/my-applications/bin/npx
open a terminal ->
you should see a response like :
Open the PPM
search for "mariadb" and select -> mariadb-server_10.1.40
Let PPM install it
Open a terminal and type ->
open a 2nd terminal ->
Code: Select all
mkdir /var/log/mysql
chown -R mysql /var/log/mysql
mysqld_safe
Return to the 1st terminal an type ->
Code: Select all
/usr/bin/mysql_secure_installation
reply Yes for all the prompts and fill in a password for the root user
close the terminals
mysql is running and the nodejs server is almost ready now.
open a terminal ->
note the version which on this Bionic64 is
Code: Select all
ffmpeg version 3.4.4-0ubuntu0.18.04.1
you may need this command as well...doesn't hurt so go ahead and run it
Following from this page of the Shinobi docs -> https://shinobi.video/docs/start
Application Install
Download Shinobi with git (comes in the devx_bionicpup64_8.0.sfs)
Open Terminal in /root/my-applications
git clone
https://gitlab.com/Shinobi-Systems/Shinobi.git Shinobi
Set permissions on the shinobi directory. Where camera.js is located.
chmod -R 755 /root/my-applications/Shinobi
Open Shinobi directory.
cd /root/my-applications/Shinobi
Setup SQL. Go to sql and install the SQL files in your database.
cd sql
Access MariaDB SQL Database from Terminal. The password will have been set during the installation of MySQL.
mysql -u root -p
OPTIONAL : Create New SQL User with privileges. If you choose to use your own pre-defined credentials skip this step.
source ./user.sql
or create your own
CREATE USER 'majesticflame'@'127.0.0.1' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON * . * TO 'majesticflame'@'127.0.0.1';
FLUSH PRIVILEGES;
while still in the SQL client. Install the Shinobi database. It will create a database called ccio.
source ./framework.sql
OPTIONAL : default_data.sql contains a demo user and a demo jpeg input monitor.
source ./default_data.sql
After importing the data. Exit the sql client.
exit
Go up one directory to enter the main directory. Where camera.js is located.
cd ..
Copy conf.sample.json as another file named conf.json.
cp conf.sample.json conf.json
Edit conf.json to reflect your sql credentials. Puppy Linux users can use geany or leafpad to modify any of the config files.
geany conf.json
Install Libraries
Run npm install while in the main directory. This will install the libraries Shinobi needs. PM2 is needed to use UPDATE.sh and to Daeomonize the process
npm install&&npm install pm2 -g
or simplify with
npm install
npm install pm2 -g
Copy super.sample.json as another file named super.json.
cp super.sample.json super.json
Launch Shinobi
then to start :
pm2 start camera.js
pm2 start cron.js
Run pm2 logs to see the console for any errors.
forever is another program to daemonize, but i've had more success with pm2.
To get your IP you can run the following command.
ifconfig
Open up http://YOUR_IP:8080 in your browser. The Default Login was originally set by adding default_data.sql.
Username :
ccio@m03.ca
Password : password
REMEMBER:
all the passwords used are default and you can modify them as you wish.
once you have seen how it works one can place the components in any directories desired.