Installing Shinobi on CentOS 8
Have Shinobi installed and ready to use in less than an hour
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.
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 the language you wish to use during installation
Before the installation can begin several selections will need to be made.
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.
Configure network settings and hostname as applicable to your network configuration.
Configure your time zone and network time settings.
Configure the partitioning of the OS drive, in most cases you can use the default settings.
Once you have finished configuring the installation, click the blue Begin Installation button
While the installation proceeds, you can set the password for the root account and create a separate user if desired.
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.
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.
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.
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.
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.
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.
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.
As part of securing the MariaDB installation you will be asked to enter the root password. In most cases this will be blank.
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.
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.
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.
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.
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.
Installation is now complete. If you enabled superuser access you will see the default connection information for your new Shinobi installation.
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).
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.
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.
With our new user created we can now log in to Shinobi for the first time.
After logging in, we are greeted with the default Shinobi interface.
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.