How to install Zoneminder , ( v1.33.16.) with Mysql 8 on Ubuntu 19.10
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 .
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

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


Figure:-4 mysql*.ini files in /usr/share/php7.3-mysql/mysql/
sudo service apache2 reload
Open zoneminder web console (http://localhost/zm/)

Figure:-5 Zoneminder Console , after adding an Usb camera
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 .
Figure:-1 Installed mysql-server-8 shown in synaptic package manager
Then open the Ubuntu terminalsudo 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

Figure:-2 Amended /etc/mysql/my.cnf
Then on the Ubuntu terminalsystemctl 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

Figure:-3 After coping mysql*.ini files from /usr/share/php7.3-mysql/mysql/

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

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
)
Comments
Post a Comment