Difference between revisions of "How to Install ZoneMinder Master on UBUNTU 20.04 LTS (Focal Fossa)"

From ZoneMinder Wiki
Jump to navigationJump to search
(Created page with "'''How to Install ZoneMinder-Master ,v 1.35.4 on UBUNTU 20.04 LTS ( Focal Fossa)''' <code>sudo su sudo add-apt-repository ppa:iconnor/zoneminder-master sudo apt update...")
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''How to Install ZoneMinder-Master ,v 1.35.4 on UBUNTU 20.04 LTS ( Focal Fossa)'''
'''How to Install ZoneMinder-Master on UBUNTU 20.04 LTS (Focal Fossa)'''


Please note that master refers to the current development version of ZoneMinder. It may break at any time. 


<code>sudo su
We first install MySQL/MariaDB so that the ZoneMinder database will be auto-created:


<code>
sudo apt install mariadb-server
</code>


or
<code>
sudo apt install mysql-server
</code>
Now we add iconnor's ZoneMinder PPA:
<code>
sudo add-apt-repository ppa:iconnor/zoneminder-master
sudo add-apt-repository ppa:iconnor/zoneminder-master


sudo apt update
sudo apt update


apt install zoneminder
apt install zoneminder
 
</code>
 
Configuring Mysql and Changing  root password
 
 
rm /etc/mysql/my.cnf
 
 
cp /etc/mysql/mysql.conf.d/mysqld.cnf  /etc/mysql/my.cnf
 
 
/etc/init.d/mysql start
 
 
mysql
 
 
ALTER USER 'root'@'localhost' IDENTIFIED BY 'yourpassword';
 
 
FLUSH PRIVILEGES ;
 
 
quit</code>




Line 41: Line 29:




<code>mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
The ZM database should have been automatically created for you. If for some reason it wasn't, the following should do it:


<code>
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
</code>


mysql
The ZM user should been automatically created for you.  If it wasn't, the following should do it:


<code>
mysql -u root -p


CREATE USER 'zmuser'@localhost IDENTIFIED BY 'zmpass';</code>
CREATE USER 'zmuser'@localhost IDENTIFIED BY 'zmpass';
</code>


 
(If CREATE does not work try with ALTER)
(If CREATE does not work try with ALTER )




Line 62: Line 55:




mysqladmin -uroot -p reload</code>
mysqladmin -uroot -p reload
</code>




(Note:- Here use the 'yourpassword' created for 'root'@'localhost' earlier )
(Note:- Here use the 'yourpassword' created for 'root'@'localhost' earlier )
<code>mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.35.4.sql</code>
( Note:- Use zmpass as the password here )




Line 110: Line 98:




service apache2 reload</code>
service apache2 reload
</code>
   
   


Open zoneminder web console (http://localhost/zm/)
Open zoneminder web console (http://localhost/zm/)

Latest revision as of 12:21, 15 December 2021

How to Install ZoneMinder-Master on UBUNTU 20.04 LTS (Focal Fossa)

Please note that master refers to the current development version of ZoneMinder. It may break at any time.

We first install MySQL/MariaDB so that the ZoneMinder database will be auto-created:

sudo apt install mariadb-server

or

sudo apt install mysql-server

Now we add iconnor's ZoneMinder PPA:

sudo add-apt-repository ppa:iconnor/zoneminder-master

sudo apt update

apt install zoneminder


Creating zm sql data base


The ZM database should have been automatically created for you. If for some reason it wasn't, the following should do it:

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql

The ZM user should been automatically created for you. If it wasn't, the following should do it:

mysql -u root -p

CREATE USER 'zmuser'@localhost IDENTIFIED BY 'zmpass';

(If CREATE does not work try with ALTER)


GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost' WITH GRANT OPTION;


FLUSH PRIVILEGES ;


quit


mysqladmin -uroot -p reload


(Note:- Here use the 'yourpassword' created for 'root'@'localhost' earlier )


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/)