-
Notifications
You must be signed in to change notification settings - Fork 172
Install
Find videos about Shinobi on YouTube : https://www.youtube.com/user/MrMoea92
- Windows, Linux, Mac OS : Vagrant
- Windows, Linux, Mac OS : Plain VirtualBox
- Mac OS : Native
- Ubuntu 16.04 : The Easier Way
- Ubuntu 16.04 : The Harder Way
- How to Update
This sets up an Ubuntu 16.04 Virtual Machine running on VirtualBox
and uses Vagrant
to setup and configure everything in one command.
-
Open
Terminal
. -
Download the repo via GIT
git clone git@github.com:moeiscool/Shinobi.git -o origin
-
Download and Install Vagrant https://www.vagrantup.com/downloads.html
-
Go to the
/Shinobi
directory which you created in Step 2 Runvagrant up
from the terminal or command line
VIDEO TUTORIAL : https://www.youtube.com/watch?v=kENOPPTA0Xg
- You know what to do with this if you know what VirtualBox is.
- Shinobi-12-29-2016.ova
https://mega.nz/#!rkZQHQBT!9gTBRwUU5UGpOvtBUAMUUVAJhEaW5zrDMs8MgaN1JNo
Username : shinobi
Password : night
- Shinobi-12-29-2016.ova
https://mega.nz/#!rkZQHQBT!9gTBRwUU5UGpOvtBUAMUUVAJhEaW5zrDMs8MgaN1JNo
-
Once logged in
cd shinobi
-
Start server.
pm2 start camera.js
-
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.
Username : ccio@m03.ca
Password : password
-
Note : if you are installed on a remote computer open up the IP in your web browser.
-
To get your IP you can run the following command.
ifconfig
-
Open
Terminal
. -
Install the required system packages
git nodejs npm mysql
viabrew
. If you don't have brew, download it from here: http://brew.sh/ If you have these already on your system you can skip this step.brew install git nodejs npm mysql
-
Install the
ffmpeg
package viabrew
.brew install ffmpeg
-
Download the repo via GIT
git clone git@github.com:moeiscool/Shinobi.git -o origin
-
Import the
sql/framework.sql
SQL file, it will create a database calledccio
cat sql/framework.sql | mysql -u root -p
-
Import the
sql/default_data.sql
SQL file, it will create a default user and camera sourcecat sql/default_data.sql | mysql -u root -p ccio
-
Run
npm install
from yourShinobi
directory to install the requirednodejs
packages.npm install
-
Copy
conf.sample.json
toconf.json
in yourShinobi
directory and enter your database connection detailscp conf.sample.json conf.json
-
Set your timezone in
conf.json
. This is important if your event times are not matching."utcOffset":"-0800"
-
Run
npm start
from yourShinobi
directory to start the Shinobi App.npm start
-
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.
Username : ccio@m03.ca
Password : password
-
Note : if you are installed on a remote computer open up the IP in your web browser.
VIDEO TUTORIAL : https://www.youtube.com/watch?v=CZSKV5gRd90
-
Open
Terminal
. -
Download Shinobi with
wget
if you don't havegit
installed.- Do this only if you haven't already downloaded the files.
wget https://github.com/moeiscool/Shinobi/tarball/master
-
Untar the downloaded file. The extracted directory is the shinobi directory.
tar -xzf master
-
Rename the directory for easier access. The extracted folder name will be different.
moeiscool-Shinobi-XXXXXXX
is only an example.mv moeiscool-Shinobi-XXXXXXX shinobi
-
Open Shinobi directory.
cd shinobi
-
Make INSTALL.sh an executable file.
chmod +x INSTALL.sh
-
Execute
INSTALL.sh
. Run :
-
This installs
libav-tools
,nodejs
,npm
,pm2
, andmysql-server
./INSTALL.sh
-
Packages will be installed. MySQL will ask to create a password on first installation.
-
Then the installer will ask you for the credentials created. The default username is usually
root
. -
Copy
conf.sample.json
as another file namedconf.json
.cp conf.sample.json conf.json
-
Set your timezone in
conf.json
. This is important if your event times are not matching."utcOffset":"-0800"
-
Edit
conf.json
to reflect your sql credentials. I don't reccommend using root.nano conf.json
-
After installation is complete
pm2 start camera.js
-
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.
Username : ccio@m03.ca
Password : password
-
Note : if you are installed on a remote computer open up the IP in your web browser.
-
To get your IP you can run the following command.
ifconfig
VIDEO TUTORIAL : https://www.youtube.com/watch?v=jfgUNfVEEEc
Dont have FFMPEG installed?
-
Open
Terminal
. -
To install :
apt-get install ffmpeg
- If that doesn't work try :
apt-get install libav-tools
Dont have Node.js installed?
-
Open
Terminal
. -
Install Node.js and it's package manager
-
Note :
#apt-get install node
installs something else, not Node.js.
apt-get install nodejs npm
-
Note :
-
Create a symlink to use nodejs.
- pm2 needs this. If you don't plan on using pm2, then ignore this step.
ln -s /usr/bin/nodejs /usr/bin/node
-
Not on Ubuntu? Other operating systems can be found here.
Dont have MySQL installed?
-
Open
Terminal
. Run :apt-get install mysql-server
-
Installation of MySQL prompt you to set a password for
root
user in MySQL on your first install.
- Mac OS (will need more techiness ironically, follow this link) : https://blog.joefallon.net/2013/10/install-mysql-on-mac-osx-using-homebrew/ .
Application Install
-
Open
Terminal
. -
Download Shinobi with
wget
if you don't havegit
installed.- Do this only if you haven't already downloaded the files.
wget https://github.com/moeiscool/Shinobi/tarball/master
-
Untar the downloaded file. The extracted directory is the shinobi directory.
tar -xzf master
-
Rename the directory for easier access. The extracted folder name will be different.
moeiscool-Shinobi-XXXXXXX
is only an example.mv moeiscool-Shinobi-XXXXXXX shinobi
-
Set permissions on the shinobi directory. Where
camera.js
is located.chmod -R 755 shinobi
-
Open Shinobi directory.
cd shinobi
Setup SQL
-
Go to
sql
and install the SQL files in your database.cd sql
-
Terminal SQL client can be accessed by running :
- 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 demortsp to mp4
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 namedconf.json
.cp conf.sample.json conf.json
14a. Edit conf.json
to reflect your sql credentials. I don't reccommend using root.
```
nano conf.json
```
14b. Set your timezone in conf.json
. This is important if your event times are not matching.
```
"utcOffset":"-0800"
```
Install Libraries
-
Run
npm install
while in the main directory. This will install the libraries Shinobi needs.npm install
- Can't get
npm install
to work? Try downloading this, the required node libraries already built. Place thenode_modules
folder in the same directory ascamera.js
.
- Can't get
Launch Shinobi
-
To start :
node camera.js
- If you did not make the symlink for nodejs then you must run
nodejs camera.js
instead.
- If you did not make the symlink for nodejs then you must run
-
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.
Username : ccio@m03.ca
Password : password
-
Note : if you are installed on a remote computer open up the IP in your web browser.
-
To get your IP you can run the following command.
ifconfig
PM2 is needed to use UPDATE.sh and to Daeomonize the process
```
npm install pm2 -g
```
then to start :
```
pm2 start camera.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`.
These commands remove and recreate camera.js, web, and UPDATE.sh. If you have made any changes to the source code please back them up before running the update command.
By Terminal
navigate to your Shinobi
directory, then run the following command. This command only works for those with builds from 8/Jan/2017 and after
chmod +x UPDATE.sh&&./UPDATE.sh
By API
updateKey
can be set in conf.json
.
https://github.com/moeiscool/Shinobi/wiki/Configuration
http://xxx.xxx.xxx.xxx/[API KEY]/update/[UPDATE KEY]