Since the official Zoneminder eoan has Dependency wait on lgw01-amd64-051 , We will have to install Zoneminder disco on Ubuntu 19.10.
There is a problem in the present PHP release which make errors with the “caching_sha2_password” introduced in the Mysql 8 by default .
Please refer the following link
https://www.php.net/manual/en/mysqli.requirements.php
Therefore , we will have to use “mysql_native_password” method in Mysql 8.
First of all we will have to install mysql-server-8 on Ubuntu 19.10 and enable mysql_native_password
The installation of mysql-server-8.0 can be done using the synaptic package manager .
![Screenshot from 2020-01-03 22-46-01](https://bkjaya.wordpress.com/wp-content/uploads/2020/01/screenshot-from-2020-01-03-22-46-01.png?w=700)
Figure:-1 Installed mysql-server-8 shown in synaptic package manager
Then open the Ubuntu terminal
sudo su
rm /etc/mysql/my.cnf
cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
gedit /etc/mysql/my.cnf
Then enter the following line below [mysqld] on the opened my.cnf file and save the file
[mysqld]
default_authentication_plugin= mysql_native_password
![Screenshot from 2020-01-04 00-20-27](https://bkjaya.wordpress.com/wp-content/uploads/2020/01/screenshot-from-2020-01-04-00-20-27.png?w=700)
Figure:-2 Amended /etc/mysql/my.cnf
Then on the Ubuntu terminal
systemctl restart mysql
Then enter the following commands on the terminal to set root password for mysql server
mysql
CREATE USER 'admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your password';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES ;
quit
systemctl restart mysql
Then install Zoneminder
The Zoneminder disco deb file is downloaded from https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder-master/+build/18492553/+files/zoneminder_1.33.16~20191229135312-disco_amd64.deb
GDebi Package Installer can be used to install the Zoneminder disco deb file
Before installing Zoneminder disco deb file to overcome dependency issues we will have to download libmysqlclient20and install first using the GDebi Package Installer.
Then install Zoneminder disco deb file that we have downloaded .
Creating user and zmpass
Open the Ubuntu terminal and enter following 5 commands
sudo su
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql
CREATE USER 'zmuser'@localhost IDENTIFIED WITH mysql_native_password BY 'zmpass';
GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES ;
quit
mysqladmin -uroot -p reload
It was observed that there are missing *.ini files in /etc/php/7.3/mods-available/ which will make problems in getting zoneminder Console.
Therefore the necessary files have to be copied from /usr/share/php7.3-mysql/mysql
sudo cp /usr/share/php7.3-mysql/mysql/*.ini /etc/php/7.3/mods-available/
sudo service apache2 reload
![Screenshot from 2020-01-03 22-17-43](https://bkjaya.wordpress.com/wp-content/uploads/2020/01/screenshot-from-2020-01-03-22-17-43.png?w=700)
Figure:-3 After coping mysql*.ini files from /usr/share/php7.3-mysql/mysql/
![Screenshot from 2020-01-03 22-12-15](https://bkjaya.wordpress.com/wp-content/uploads/2020/01/screenshot-from-2020-01-03-22-12-15.png?w=700)
Figure:-4 mysql*.ini files in /usr/share/php7.3-mysql/mysql/
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
adduser www-data video
a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
chown -R www-data:www-data /usr/share/zoneminder/
systemctl enable zoneminder
service zoneminder start
Add timezone to PHP ( This step is not essential for Zoneminder 1.33 as you can change the TIMEZONE later under Options/System/TIMEZONE )
gedit /etc/php/7.3/apache2/php.ini
edit line 956 with your timezone
Then
sudo service apache2 reload
Open zoneminder web console (http://localhost/zm/)
Figure:-5 Zoneminder Console , after adding an Usb camera
(Note :-
In order to have clean mysql-server-8.0 install , it is better to completely delete exiting mysql as follows
sudo apt remove --purge mysql-server mysql-client mysql-common
sudo apt autoremove
sudo apt autoclean
sudo rm -rf /etc/mysql )