How to Install ZoneMinder-Master ,latest on UBUNTU 20.04 LTS ( Focal Fossa)
sudo su
sudo add-apt-repository ppa:iconnor/zoneminder-master
sudo apt update
apt install zoneminder
Configuring Mysql
rm /etc/mysql/my.cnf
cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
(press Enter key of key board when ask for password)
/etc/init.d/mysql start
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
( If you get an error "ERROR 1050 (42S01) at line 1034: Table 'Sessions' already exists" due to existence of zm database ,when creating zm sql database , you will have to drop the existing zm database as follows on the Ubuntu terminal and retry above command again
mysql -e "drop database zm;" )
mysql -e "CREATE USER 'zmuser'@localhost IDENTIFIED BY 'zmpass';"
( If CREATE does not work try with ALTER )
mysql -e "GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost' WITH GRANT OPTION;"
mysql -e "FLUSH PRIVILEGES ;"
mysqladmin -uroot -p reload
(press Enter key of key board when ask for password)
Configuring Zoneminder
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
adduser www-data
video a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
a2enmod headers
a2enmod expires
Starting Zoneminder and apache
systemctl enable zoneminder
service zoneminder start
service apache2 reload
Open zoneminder web console (http://localhost/zm/)