Page 1 of 1

Installing to Raspbian "buster"

Posted: Tue Jun 25, 2019 6:33 am
by bugmenot
Now that Raspbian is Debian “buster” based, could you give for newbies installaton instructions. Thanks

Re: Installing to Raspbian "buster"

Posted: Tue Jun 25, 2019 2:35 pm
by bbunge
Procedure on the WIKI for Debian should work. Am installing the new Raspbian to test. Stay tuned...

Re: Installing to Raspbian "buster"

Posted: Tue Jun 25, 2019 6:36 pm
by bbunge
Become root

sudo su

Install additional LAMP components Mariadb server (recommended)

apt install mariadb-server mariadb-client php php-mysql apache2 libapache2-mod-php

Secure Mariadb, create root password et. al.

mysql_secure_installation

Edit sources.list

nano /etc/apt/sources.list

For Pi uncomment:

deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free$

Ctrl+o Enter to save

Ctrl+x to exit

Update apt

apt update

Install Zoneminder

apt install zoneminder

Set permissions of /etc/zm/zm.conf to root:www-data 740

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

Enable Zoneminder service to start at boot

systemctl enable zoneminder.service

Add www-data to the sudo group (to enable use of local video devices)

adduser www-data video

For Pi, Create Zoneminder database in Mariadb (Note: this also creates the default Zoneminder user and permissions in MySQL)

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


Start Zoneminder

systemctl start zoneminder.service

Check to see that Zoneminder is running

systemctl status zoneminder.service

Enable CGI and Zoneminder configuration in Apache.

a2enmod cgi

a2enmod rewrite

a2enconf zoneminder

Add timezone to PHP

sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/7.3/apache2/php.ini

Change permissions in /usr/share/zoneminder/

chown -R www-data:www-data /usr/share/zoneminder/


Restart Apache

service apache2 restart

Re: Installing to Raspbian "buster"

Posted: Wed Jun 26, 2019 5:02 am
by bugmenot
When i do

apt install zoneminder

i get error:

E: Unable to locate package zoneminder

Re: Installing to Raspbian "buster"

Posted: Wed Jun 26, 2019 8:58 pm
by bbunge
Edit sources.list

nano /etc/apt/sources.list

For Pi uncomment:

deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free$

Note: It the above is not exactly as shown in the sources.list file just uncomment the last line in the file. By uncomment I mean remove the # and the following space.

Ctrl+o Enter to save

Ctrl+x to exit

Update apt

apt update

Re: Installing to Raspbian "buster"

Posted: Thu Jun 27, 2019 10:24 am
by bugmenot
Thanks. That helped.

Now when i do

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

it asks password and no matter what i put there, raspberry password or return or password created during mysql_secure_installation, i always get empty row. Cursor just goes to start of next row.

Re: Installing to Raspbian "buster"

Posted: Sat Jun 29, 2019 1:06 am
by bbunge
bugmenot wrote: Thu Jun 27, 2019 10:24 am Thanks. That helped.

Now when i do

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

it asks password and no matter what i put there, raspberry password or return or password created during mysql_secure_installation, i always get empty row. Cursor just goes to start of next row.
Not sure what you mean by "empty row"
The password is the database password entered when you secured the database.
the command "mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql" will prompt you for the database password, will appear to do nothing for up to a minute or so then return to the command prompt. Just keep going through the procedure.

Re: Installing to Raspbian "buster"

Posted: Sat Aug 24, 2019 4:11 pm
by pms
bbunge wrote: Tue Jun 25, 2019 6:36 pm
>>For Pi, Create Zoneminder database in Mariadb (Note: this also creates the default Zoneminder user and permissions in MySQL)

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
Thanks for your Excellent manual how to install Zoneminder!
I am a first time user /installer and was wondering about the password for user 'zmuser'.
I used 'zmpass' as you mentioned in the doc.

Should I have used a unique password or is this OK?
(can't remember if I had to enter this password in the configuration of ZM somewhere later)

Thanks!
PMS