Getting ZoneMinder into debian and ubuntu

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
muzzol
Posts: 5
Joined: Thu Feb 01, 2007 10:41 am

Post by muzzol »

can you provide source debs?

i mean the .dsc + .tar.gz + .changes files.

i would like to test them on my ubuntu system.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Those are up on debs development site when it becomes available. I don't think anything is ready yet as it was just put in.
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

muzzol wrote:can you provide source debs?

i mean the .dsc + .tar.gz + .changes files.

i would like to test them on my ubuntu system.
Sorry about the delay on response. You can get them from http://mentors.debian.net/debian/pool/m ... oneminder/ or from ftp://www.northern-ridge.com.au/zoneminder
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Finally!!!!!!!!

Post by PeterHoward »

For those still watching this topic . . . Zoneminder was finally accepted into Debian unstable this morning.


Phew!

And its the 1.22.3-3 version which installs properly (as opposed to the "don't try to install this unless you like pain" -1 version)
jan
Posts: 17
Joined: Sat May 20, 2006 7:55 am
Location: europe

Re: Finally!!!!!!!!

Post by jan »

PeterHoward wrote:For those still watching this topic . . . Zoneminder was finally accepted into Debian unstable this morning.


Phew!

And its the 1.22.3-3 version which installs properly (as opposed to the "don't try to install this unless you like pain" -1 version)
excellent!
rjewell
Posts: 23
Joined: Fri Mar 03, 2006 12:38 am
Location: CA

exciting!

Post by rjewell »

I'm happy you're creating a package. I have installed zm a few times and it's tough work. The howto's for ubuntu skip steps and I spend countless nights searching posts.

I am trying to use the deb on dapper and have a few problems. Are there instructions somewhere?

I removed my zm database and get an error that the package can't connect to it. Should I create that? It seems like I need to go through a few of the installation steps.

I also had issues because I wasn't using the stock username/password. Is it zmpass?.

prepare_cached can't be called on an undefined value at config.pm line 91.

There were other compilation failures but I would like to fix the obvious problems first.
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Re: exciting!

Post by PeterHoward »

I am trying to use the deb on dapper and have a few problems. Are there instructions somewhere?
No formal instructions; it should just install. The only special detail is in the README.debian file (to do with linking the apache config file).
I removed my zm database and get an error that the package can't connect to it. Should I create that? It seems like I need to go through a few of the installation steps.

I also had issues because I wasn't using the stock username/password. Is it zmpass?.
The package attempts to create the database from scratch; I'm not 100% sure what's going wrong here, but if there's not zm database at all in mysql it should create it properly (and yes, the default username & passwd are used in the package)
prepare_cached can't be called on an undefined value at config.pm line 91.
Sounds like this is just fallout from the above.
There were other compilation failures but I would like to fix the obvious problems first.
Which version of the package are you using? You say "compilation failures" - are you trying to build from the source package?

PJH
rjewell
Posts: 23
Joined: Fri Mar 03, 2006 12:38 am
Location: CA

Re: exciting!

Post by rjewell »

The package attempts to create the database from scratch; I'm not 100% sure what's going wrong here, but if there's not zm database at all in mysql it should create it properly (and yes, the default username & passwd are used in the package)
I am using 1.22.3-6 that I downloaded from your site yesterday. I am probably making some simple mistake... :)

Which version of the package are you using? You say "compilation failures" - are you trying to build from the source package?
This is from the terminal window feedback when you install the package via the gui. It talks about compilation failures. The first problem is that DBI connect failed because the database zm is unknown.

Do I need to create a mysql account before running this and/or is there assumption about mysql root access to create the database?

Thanks for the help. I appreciate your taking the time to create a package for this!

Ryan
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

How did you install mysql? The relevant bits from the postinstall script are:

Code: Select all

mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
cat /usr/share/zoneminder/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
echo 'grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "{deleted}";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
So it expects the standard debian.cnf to be there. If you installed mysql via apt-get, it should be there.
rjewell
Posts: 23
Joined: Fri Mar 03, 2006 12:38 am
Location: CA

more info

Post by rjewell »

How did you install mysql?
I believe it was there from the original ubuntu installation. I use apt-get or synaptic to install/update.

Code: Select all

mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
cat /usr/share/zoneminder/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
echo 'grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "{deleted}";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
So it expects the standard debian.cnf to be there. If you installed mysql via apt-get, it should be there.
I checked and it's there.

Could you explain the passwords to me? First, where you have "deleted" above, are you hiding the password or is this the real code? I have been using "zmpass" for zmuser. I don't understand how an installer can create the databases without root access to mysql...

I ran the above code and it created the database. I still get the same error when I install the package. Access denied for user 'zmuser'@localhost (using password: YES).

Thanks again!
Ryan
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

Are you able to purge the package? i.e.

Code: Select all

sudo dpkg --purge zoneminder
(Don't try reinstalling after that; I need to check up something and I primarily want to see if that works)
rjewell
Posts: 23
Joined: Fri Mar 03, 2006 12:38 am
Location: CA

think purge worked

Post by rjewell »

I believe the purge worked but I got similar error messages (shown below). The database was gone. Thanks.

Ryan



ryan@ubuntu:~$ sudo dpkg --purge zoneminder
Password:
(Reading database ... 112357 files and directories currently installed.)
Removing zoneminder ...
Stopping ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password: YES) at /usr/local/share/perl/5.8.7/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/local/share/perl/5.8.7/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.7/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/share/perl/5.8.7/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.7/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 45.
Zoneminder already stopped

Database "zm" dropped
Purging configuration files for zoneminder ...
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Clearing out residue

Post by PeterHoward »

Now go into mysql as root, and change to database mysql.

Look for any mention of zoneminder (e.g. "zmuser") in the table "user" and get rid of it.

Then try the reinstall over; i.e. "sudo dpkg install zoneminder_1.22.3-6_i386.deb" and, if necessary, "sudo apt-get -f install" and see what happens.
rjewell
Posts: 23
Joined: Fri Mar 03, 2006 12:38 am
Location: CA

progress

Post by rjewell »

zmuser wasn't in the user table.

The reinstall reported success and didn't give any errors. :) The database and user are in mysql.

I still don't get zm via the browser. /var/www/zm and its html sub are empty.

Ryan
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

README.debian

Post by PeterHoward »

To save you looking right now:

Code: Select all

sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zm.conf
sudo /etc/init.d/apache2/reload
Post Reply