How to install the Shinobi database manually
A simple setup guide for people who missed the database setup or want to redo it.
For this article we will assume your Shinobi directory is found in the default location /home/Shinobi.
Installing the database for MariaDB/MySQL
1. Navigate to your Shinobi directory
cd /home/Shinobi
2. Open the MariaDB/MySQL Terminal client.
mysql
3. Load the SQL files. framework.sql is the database architecture. user.sql are the credentials for Shinobi to connect to the database.
source sql/framework.sql; source sql/user.sql;
4. Exit the SQL client
exit;
4. If you need to enable the mysql database type you can run the following.
node tools/modifyConfiguration.js databaseType=mysql
5. Restart Shinobi
pm2 restart all
Installing the database for SQLite3
1. Navigate to your Shinobi directory
cd /home/Shinobi
2. Copy the blank database file to the main directory to make it active.
cp sql/shinobi.sample.sqlite shinobi.sqlite
3. If you haven't enabled SQLite3 in the conf.json you can do so by running the following.
node tools/modifyConfiguration.js databaseType=sqlite3
4. Now restart Shinobi
pm2 restart all