Revisiting this endeavor - Zoneminder is Linux software
First wrote about Zoneminder here ==>
Zoneminder Ubuntu Server Installation with ZMXAP to use with HS MCSXP - December 18, 2010, 12:03 PM
Just recently purchased another Lenova Tiny computer for use with Ubuntu 20.01. I am using Lenova Tiny computers for (and a couple of desktops)
1 - Windows 2016 64 bit server - used for RDP for Windows Leviton PCA, UPB Upstart, Hikvision software, Homeseer Designer, et al
2 - Ubuntu 18.04 64 bit server - running LMS and Plexserver and MythTV
Hardware used for new Zoneminder computer - identical to computer servers 1 and 2
1 - Lenova Tiny M93P with 16Gb RAM / Haswell chip set / i5 / Bluetooth / WLAN / Gb NIC / 1 Tb 2.5" HD
2 - Optional USB / RS-232 side mounted expansion interface
Software base:
1 - Ubuntu 20.04 LTS - Desktop - optional server installation with LAMP
2 - Zoneminder Installation following this receipe:
ZoneMinder on Ubuntu 20.04 -
Posted on July 15, 2020 by Brian, the Inept Tech
Prerequisites
Before we can install ZoneMinder we have to install and configure the software it needs to run. This includes Apache2, PHP7, & MySQL. We can install these one by one or, the easy way, by using tasksel.
Note that you were not asked for password during the MySQL installation. Starting in 16.04 there is no need for a root password. Instead you can only connect via local socket, meaning you have to type “sudo mysql” at the command line to log in as root.
Next, per ZoneMinder’s recommendation, we’ll replace the default MySQL config file.
Edit my.cnf and add sql_mode = NO_ENGINE_SUBSTITUTION to the [mysqld] section.
Save the file and restart mysql
Time & Time Zones
This one is very important and one that you don’t see mentioned a lot. You need to setup the time and time zones before installing ZoneMinder. If you make changes afterwards, you’ll start to see error messages in the ZM logs and, in my case, lose access to see videos from the last hour.
If you’re in the US, like me, do not select US. Instead select America and find your time zone there. For me, its America > Chicago
Next, set the time in PHP.
Search for date.timezone and uncomment the line by removing the ; at the begging. Set your time zone according to the PHP website. Again, making sure they match. For me its America/Chicago.
By default MySQL is set to system time. If you changed the Time Zone on the system, restart the service before checking MySQLs time. To check, run this command:
If the time matches, then you’re good to go.
ZoneMinder Installation
First we’ll need to install the official ZoneMinder PPA from Isaac Conner and then we can install ZoneMinder
Once the installation finishes, we’ll need to configure Apache2 by copying and enabling the zm.conf file, enabling a few mods, and finially restarting ZoneMinder and Apache2.
Zoneminder should be installed and ready to add cameras.
To test this, go to hxxp://ip_address/zm and the interface should be available.
Its also a good idea to test the API by going to hxxp://ip_address/zm/api/host/getVersion.json.
You should see the API version in your browser.
That’s it! ZoneMinder is ready to go and you can start adding your cameras. I wont cover cameras here since there are a ton of different models and what works for me, might not work for you. But, I will say, get yourself an ONVIF compliant camera and you shouldn’t have any issues.
First wrote about Zoneminder here ==>
Zoneminder Ubuntu Server Installation with ZMXAP to use with HS MCSXP - December 18, 2010, 12:03 PM
Just recently purchased another Lenova Tiny computer for use with Ubuntu 20.01. I am using Lenova Tiny computers for (and a couple of desktops)
1 - Windows 2016 64 bit server - used for RDP for Windows Leviton PCA, UPB Upstart, Hikvision software, Homeseer Designer, et al
2 - Ubuntu 18.04 64 bit server - running LMS and Plexserver and MythTV
Hardware used for new Zoneminder computer - identical to computer servers 1 and 2
1 - Lenova Tiny M93P with 16Gb RAM / Haswell chip set / i5 / Bluetooth / WLAN / Gb NIC / 1 Tb 2.5" HD
2 - Optional USB / RS-232 side mounted expansion interface
Software base:
1 - Ubuntu 20.04 LTS - Desktop - optional server installation with LAMP
2 - Zoneminder Installation following this receipe:
ZoneMinder on Ubuntu 20.04 -
Posted on July 15, 2020 by Brian, the Inept Tech
Prerequisites
Before we can install ZoneMinder we have to install and configure the software it needs to run. This includes Apache2, PHP7, & MySQL. We can install these one by one or, the easy way, by using tasksel.
Code:
sudo apt install tasksel sudo tasksel install lamp-server
Next, per ZoneMinder’s recommendation, we’ll replace the default MySQL config file.
Code:
sudo rm /etc/mysql/my.cnf sudo cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
Code:
sudo nano /etc/mysql/my.cnf
Save the file and restart mysql
Code:
sudo systemctl restart mysql
This one is very important and one that you don’t see mentioned a lot. You need to setup the time and time zones before installing ZoneMinder. If you make changes afterwards, you’ll start to see error messages in the ZM logs and, in my case, lose access to see videos from the last hour.
Code:
sudo dpkg-reconfigure tzdata
Next, set the time in PHP.
Code:
sudo nano /etc/php/7.4/apache2/php.ini
By default MySQL is set to system time. If you changed the Time Zone on the system, restart the service before checking MySQLs time. To check, run this command:
Code:
sudo systemctl restart mysql sudo mysql -e “SELECT NOW();”
ZoneMinder Installation
First we’ll need to install the official ZoneMinder PPA from Isaac Conner and then we can install ZoneMinder
Code:
sudo add-apt-repository ppa:iconnor/zoneminder-1.34 sudo apt install -y zoneminder
Code:
sudo chmod 740 /etc/zm/zm.conf sudo chown root:www-data /etc/zm/zm.conf sudo chown -R www-data:www-data /usr/share/zoneminder/ sudo a2enmod cgi rewrite expires headers sudo a2enconf zoneminder sudo systemctl enable zoneminder sudo systemctl start zoneminder sudo systemctl restart apache2
To test this, go to hxxp://ip_address/zm and the interface should be available.
Its also a good idea to test the API by going to hxxp://ip_address/zm/api/host/getVersion.json.
You should see the API version in your browser.
That’s it! ZoneMinder is ready to go and you can start adding your cameras. I wont cover cameras here since there are a ton of different models and what works for me, might not work for you. But, I will say, get yourself an ONVIF compliant camera and you shouldn’t have any issues.
Comment