Intro

CentOS 8 Is the latest release of the community release of Red Hat Enterprise Linux. With it's long-term support and extreme reliability, it provides an ideal operating system for an network video recorder. This walkthrough will show you step by step, how to install CentOS 8 and Shinobi as well as how to create your first user and log in for the first time. Later walkthroughs will explain how to add cameras, enable motion/object detection, and enable discord notifications.

Requirements

System requirements are dependant on many factors. A large number of cameras, resolution, framerate, and whether you want to use motion (or object) detection all will require more resources.

For this article, I am using a VM running on ESXi 6.7 U2 with 1 quad-core vCPU, 4 GB of RAM and a 40 GB vHDD. These specifications should allow for several cameras to be connected with motion detection enabled.

Install CentOS 8

Before we can install Shinobi, we need to install CentOS. While you can install CentOS  on a virtual machine or on physical hardware, I would suggest using a VM if you have a system that is capable of doing so. This allows for simplified management and recovery (through the use of snapshots) if something should go wrong.

Begin Installation For this article I am using CentOS 8, build 1905. You should use the latest build, which will reduce the time needed for updates after installation

Select language Select the language you wish to use during installation

Installation options Before the installation can begin several selections will need to be made.

Software selection For dedicated NVR use select a minimal installation of CentOS 8. While it it possible to run Shinobi on a shared system, for maximum stability and reliability a dedicated system/virtual machine is recommended.

Network configuration Configure network settings and hostname as applicable to your network configuration.

Timezone settings Configure your time zone and network time settings.

Disk partitioning Configure the partitioning of the OS drive, in most cases you can use the default settings.

Begin installation Once you have finished configuring the installation, click the blue Begin Installation button

Set root password and create users While the installation proceeds, you can set the password for the root account and create a separate user if desired.

Setting root password

CentOS 8 installation complete Once the installation is completed, click the blue Restart button to finish the installation of CentOS 8 and restart the system.

Install Shinobi

Now that CentOS is installed, we are ready to install Shinobi.

Step 1.Once the system has finished restarting, login as root, or the user you wish to install Shinobi under. For simplicity, we will install under the root account.

Step 1. To start the Shinobi installation run the following command:

bash <(curl -s https://technokami.com/shinobicctv/centos/centos_install.sh)

This script will download the latest version of Shinobi and install all required components for a basic installation. If you wish to see what the script does you can use wget to download the script and run it manually later.

Step 1.Press Enter to begin the Shinobi installation. The script will begin by installing any dependencies needed and making sure the system is up to date.

Step 1.Select whether you would like to use the Master or Development branch of Shinobi. The Development branch of Shinobi is recommended since it has the latest bug fixes and features. For this example we will use the Development branch.

Next Node.js will be installed if needed, followed by NPM, and FFMPEG.

Step 1.Select whether you would like to install MariaDB. In most cases you will want to install MariaDB. However, you may skip installation if you have already installed MariaDB or wish to use a separate database server.

Step 1.If you installed MariaDB you will be asked if you would like to configure some basic security settings. While this can be skipped, you should only do so if you are planning to secure the installation later.

Step 1.As part of securing the MariaDB installation you will be asked to enter the root password. In most cases this will be blank.

Step 1.In most cases you will want to answer yes to all the questions and set a new root user password. Only answer no if you are sure of what you are doing.

Step 1.If you are installing Shinobi for the first time, you will want to install the default database. When prompted enter the username and password of the user you wish to use to insert the database.

If you are reinstalling or attempting to recover a previous installation, this can be skipped.

Step 1.Once the database has been inserted, any missing PM2 modules will be installed. When the modules have been installed, you will be asked if you want the installer to create the necessary firewall rules. Select yes to create them automatically, or no, if you intend to create them manually later. Note that you will be unable to access Shinobi until port 8080/tcp is open.

Step 1.After the firewall rules have been created, you will be asked if you wish to enable superuser access. As the installer states, this feature may be useful for account and password management, especially in commercial deployments. Enabling superuser access greatly simplifies configuration after installation, so I have selected yes.

Step 1.At this point, the installation is nearly complete. The final steps will be to select whether you would like Shinobi to start automatically after system startup, and if you want to start Shinobi now. Again, in most cases you will want to select yes.

Step 1.Installation is now complete. If you enabled superuser access you will see the default connection information for your new Shinobi installation.

Step 1.In a web browser, open the URL provided (in this example http://10.10.3.116:8080/super) and login with the credentials provided (username: [email protected], password: admin).

Step 1.From this page you can configure many of Shinobi's settings. We will keep it simple and start by creating a new standard user. Click on the grey button marked Add.

Step 1.In the popup, enter an email address and password for the user you are creating. This user will be my main Shinobi user, so I will leave Permissions set to all privileges and the rest of the settings as their default.

Step 1.With our new user created we can now log in to Shinobi for the first time.

Step 1.After logging in, we are greeted with the default Shinobi interface.

Step 1.There isn't much here yet, but I will show you how to change that in a later walkthrough. In the meantime, check out some of the links that appear on the popup for more information on using Shinobi.