Difference between revisions of "Devuan Ascii with Zoneminder 1.32.3 from ZM Repo"

From ZoneMinder Wiki
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a guide for a Sysvinit based Devuan / Debian system. Debian Stretch / Devuan Ascii and Zoneminder Stable 1.32.3 from the ZMRepo.  
This is a guide for a Sysvinit based Devuan / [[Debian]] system. Debian Stretch / Devuan Ascii and Zoneminder Stable 1.32.3 from the ZMRepo.  


'''Requirements:'''
'''Requirements:'''
Line 17: Line 17:


  service apache2 restart
  service apache2 restart


Add zmrepo to /etc/apt/sources.list
Add zmrepo to /etc/apt/sources.list
  deb https://zmrepo.zoneminder.com/debian/release/ stretch/
  deb https://zmrepo.zoneminder.com/debian/release/ stretch/


NOTE: 1.32.3 is currently in release. This is subject to change. Confirm 1.32.3 is there before installing.
NOTE: 1.32.3 is currently in release folder on zmrepo. This is subject to change. Confirm 1.32.3 is there before installing.


NOTE: In order to make this guide, all the existing guides for [[Debian]] were parsed.  
NOTE: In order to make this guide, all the existing guides for [[Debian]] were parsed.  
Line 28: Line 27:
https://wiki.zoneminder.com/Debian_9_64-bit_with_Zoneminder_1.30.4_the_Easy_Way
https://wiki.zoneminder.com/Debian_9_64-bit_with_Zoneminder_1.30.4_the_Easy_Way
https://wiki.zoneminder.com/Debian_10_Buster_with_Zoneminder_1.34.x_from_ZM_Repo
https://wiki.zoneminder.com/Debian_10_Buster_with_Zoneminder_1.34.x_from_ZM_Repo
 
(these names are changed periodically, so refer to [[Debian]])
etc...
etc...


Line 46: Line 45:
  mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
  mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
  mysqladmin -uroot -p reload
  mysqladmin -uroot -p reload
chown -R www-data:www-data /usr/share/zoneminder/


may need to set timezone in /etc/php/7.0/apache2/php.ini
may need to set timezone in /etc/php/7.0/apache2/php.ini
Line 64: Line 62:


zoneminder should start:
zoneminder should start:
 
<pre>
# service zoneminder start
# service zoneminder start
Starting ZoneMinder: 01/27/2020 12:27:42.776878 zmpkg[2722].INF [main:57] [Command: start]
Starting ZoneMinder: 01/27/2020 12:27:42.776878 zmpkg[2722].INF [main:57] [Command: start]
Line 71: Line 69:
01/27/2020 12:27:44.231615 zmpkg[2722].INF [main:205] [Single server configuration detected. Starting up services.]
01/27/2020 12:27:44.231615 zmpkg[2722].INF [main:205] [Single server configuration detected. Starting up services.]
success
success
 
</pre>


double check by reviewing  
double check by reviewing  
  ps auxw | grep zm
  ps auxw | grep zm
Now, navigate to the Apache server which hosts ZM gui at http://serverip/zm
Review syslog for any error messages.


==Upgrading==
==Upgrading==


Now, if you are importing an existing db, now is a good time. Stop zm, and import the db.
If you are importing an existing db, now is a good time. Stop zm, and import the db.


  service zoneminder stop
  service zoneminder stop

Latest revision as of 11:01, 6 February 2020

This is a guide for a Sysvinit based Devuan / Debian system. Debian Stretch / Devuan Ascii and Zoneminder Stable 1.32.3 from the ZMRepo.

Requirements:

  • Debian 9/sysvinit
  • Devuan Ascii
  • Zoneminder 1.32.3

Install

install mariadb, apache2, php based on: https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-lamp-on-debian-stretch/

apt-get install mariadb-server apache2 php7 libapache2-mod-php7.0

restart apache

service apache2 restart

Add zmrepo to /etc/apt/sources.list

deb https://zmrepo.zoneminder.com/debian/release/ stretch/

NOTE: 1.32.3 is currently in release folder on zmrepo. This is subject to change. Confirm 1.32.3 is there before installing.

NOTE: In order to make this guide, all the existing guides for Debian were parsed.

https://wiki.zoneminder.com/Debian_9_64-bit_with_Zoneminder_1.30.4_the_Easy_Way https://wiki.zoneminder.com/Debian_10_Buster_with_Zoneminder_1.34.x_from_ZM_Repo (these names are changed periodically, so refer to Debian) etc...

apt-get update
apt-get install apt-transport-https gnupg
wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | sudo apt-key add -
apt-get update
apt-get install zoneminder  vlc-plugin-base php7.0-gd
adduser www-data video
apt-get install zoneminder
a2enmod cgi
a2enmod rewrite
a2enconf zoneminder
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
mysqladmin -uroot -p reload

may need to set timezone in /etc/php/7.0/apache2/php.ini (for 1.32.3 you do. In 1.34 it will be managed in zm options)

e.g. date.timezone America/New_York

service apache2 restart

At this point, you will not have an /etc/init.d/ file for zoneminder

You must copy one from an existing install, or from 1.29 or 1.30.4. I'm going to put the init script from 1.30.4 in Zoneminder_Init_Script


after copying that in, and chmod +x /etc/init.d/zoneminder

zoneminder should start:

# service zoneminder start
Starting ZoneMinder: 01/27/2020 12:27:42.776878 zmpkg[2722].INF [main:57] [Command: start]
01/27/2020 12:27:42.778627 zmpkg[2722].INF [main:305] [Sanity checking States table...]
01/27/2020 12:27:42.780839 zmpkg[2722].INF [main:97] [Command: start]
01/27/2020 12:27:44.231615 zmpkg[2722].INF [main:205] [Single server configuration detected. Starting up services.]
success

double check by reviewing

ps auxw | grep zm


Now, navigate to the Apache server which hosts ZM gui at http://serverip/zm

Review syslog for any error messages.

Upgrading

If you are importing an existing db, now is a good time. Stop zm, and import the db.

service zoneminder stop
mysqldump -u root -p zm > dump.sql  (export old db) 
mysql -uroot -p zm < dump.sql  (import old db)

After this is done, you need to update the db

# zmupdate.pl

run this at least twice, as it tends to error out. If it's already updated, nothing new will happen.

you should see something like: Database upgrade to version 1.32.3 successful.

Then start zm

service zoneminder start

you might want to run zmaudit.pl to delete non existing events on the new install



1.32.3 Version Notes

Make sure to configure storage for each camera. in 1.32.3 cameras can now record to specific partitions.