Installing to Raspbian "buster"

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
bugmenot
Posts: 34
Joined: Tue Feb 10, 2015 2:23 pm

Installing to Raspbian "buster"

Post by bugmenot »

Now that Raspbian is Debian “buster” based, could you give for newbies installaton instructions. Thanks
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Installing to Raspbian "buster"

Post by bbunge »

Procedure on the WIKI for Debian should work. Am installing the new Raspbian to test. Stay tuned...
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Installing to Raspbian "buster"

Post 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
bugmenot
Posts: 34
Joined: Tue Feb 10, 2015 2:23 pm

Re: Installing to Raspbian "buster"

Post by bugmenot »

When i do

apt install zoneminder

i get error:

E: Unable to locate package zoneminder
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Installing to Raspbian "buster"

Post 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
bugmenot
Posts: 34
Joined: Tue Feb 10, 2015 2:23 pm

Re: Installing to Raspbian "buster"

Post 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.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Installing to Raspbian "buster"

Post 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.
pms
Posts: 11
Joined: Sat Aug 24, 2019 3:59 pm

Re: Installing to Raspbian "buster"

Post 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
Post Reply