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
 
Line 18: 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  
Line 41: Line 41:
mysqladmin -uroot -p reload</code>
mysqladmin -uroot -p reload</code>


(Enter your mysql root password when ask for password)
'''(Enter your mysql root password when ask for password)'''


'''Configuring Zoneminder'''
'''Configuring 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/)