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

From ZoneMinder Wiki
Jump to navigationJump to search
(Created page with "<code>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/my...")
 
 
(5 intermediate revisions by the same user not shown)
Line 7: Line 7:
apt install zoneminder  
apt install zoneminder  


'''Configuring Mysql'''  
 
'''Configuring Mysql and alter mysql root password'''
 
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'yourpassword';"
 
'''(replace yourpassword with the new password)'''


rm /etc/mysql/my.cnf   
rm /etc/mysql/my.cnf   
Line 13: Line 18:
cp /etc/mysql/mysql.conf.d/mysqld.cnf  /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)
'''(press Enter key of key board when ask for password)'''


/etc/init.d/mysql start  
/etc/init.d/mysql start  


mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql</code>
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql</code>
(Enter your mysql root password when ask for password)


'''( 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
'''( 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


<code>mysql -e "drop database zm;"  )'''
<code>mysql -e "drop database zm;"</code> )'''
   
   
mysql -e "CREATE USER 'zmuser'@localhost IDENTIFIED BY 'zmpass';"
 
<code>mysql -e "CREATE USER 'zmuser'@localhost IDENTIFIED BY 'zmpass';"


'''( If CREATE does not work try with ALTER )'''  
'''( If CREATE does not work try with ALTER )'''  
Line 33: Line 41:
mysqladmin -uroot -p reload</code>
mysqladmin -uroot -p reload</code>


(press Enter key of key board when ask for password)
'''(Enter your mysql root password when ask for password)'''


'''Configuring Zoneminder'''
'''Configuring Zoneminder'''


<code>chmod 740 /etc/zm/zm.conf  
<code>chmod 740 /etc/zm/zm.conf  


Line 52: Line 61:


a2enmod expires  
a2enmod expires  


'''Starting Zoneminder and apache'''
'''Starting Zoneminder and apache'''


systemctl enable zoneminder  
systemctl enable zoneminder  

Latest revision as of 23:58, 16 November 2020

sudo su

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

sudo apt update

apt install zoneminder


Configuring Mysql and alter mysql root password

mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'yourpassword';"

(replace yourpassword with the new password)

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

(Enter your mysql root password when ask for password)

( 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

(Enter your mysql root password 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/)