Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Has Anyone Ever Installed ZoneMinder?

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

Has Anyone Ever Installed ZoneMinder?

#1 Post by Carlosinfl »

I was looking into this tool called ZoneMinder. It looks really cool but however it requires a MySQL database which I have never configured and or managed. I am sure installing MySQL is simple and in fact, ZoneMinder is available as a .deb package in the "unstable" repo which I have installed but now that it's installed, I really don't know where to go from here.

I checked their README.debian file and it says:
There is one manual step to get the web interface working.
You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf,
then reload the apache config (i.e. /etc/init.d/apache2 reload)

-- Peter Howard <pjh@northern-ridge.com.au>, Wed, 10 Jan 2007 16:35:51 +1100
I really don't understand what they are telling me to do. I know how to restart Apache but how do I create the link they specify. :?:

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#2 Post by chrismortimore »

Code: Select all

ln -s /etc/apache2/conf.d/zoneminder.conf /etc/zm/apache.conf
Is all they are looking for.

When apache is started, it reads each file in /etc/apache2/conf.d/ and configures anything described in those files. Whats basically happening with zoneminder is they have shipped the apache config that you need, but they have put it in /etc/zm/apache.conf to keep all of the zoneminder stuff together. By linking /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf using the above command, when apache loads, it'll read zoneminder's configuration and set up the interface for you. Clear as mud? :P
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#3 Post by Carlosinfl »

Ah - so I guess we're creating a link of some kind to /etc/zm/apache.conf then, huh?

I ran the command and here is what I got:

# ln -s /etc/apache2/conf.d/zoneminder.conf /etc/zm/apache.conf
ln: creating symbolic link '/etc/zm/apache.conf' to '/etc/apache2/conf.d/zoneminder.conf': File exists

Does this mean there was a problem or did I do something wrong?

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#4 Post by chrismortimore »

Run "ls -l /etc/apache2/conf.d/". It might have made the link when it was installed...
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#5 Post by Carlosinfl »

When I run the ls -l command, this is all I see...

Code: Select all

cwilliams@watcher:~$ ls -l /etc/apache2/conf.d/
total 4
-rw-r--r-- 1 root root 24 2007-05-06 09:56 charset

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#6 Post by chrismortimore »

Doh! Do "ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf". Sorry, I always get those things backwards. Never figured out why.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#7 Post by Carlosinfl »

OK - I did the following which returned me back to the CLI prompt with no errors and or messages...

Code: Select all

watcher:/home/cwilliams# ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
I assume at this point, I just need to restart Apache service, correct?

Thanks so much for your input.

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#8 Post by chrismortimore »

Carloswill wrote:I assume at this point, I just need to restart Apache service, correct?
I'd double check with "ls -l /etc/apache2/conf.d/" and make sure zoneminder.conf is there and pointing to /etc/zm/apache.conf. If it is, then just restart apache and you're good to go.
Carloswill wrote:Thanks so much for your input.
You're welcome :)
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#9 Post by Carlosinfl »

Yes - there appears to be a valid symbolic link.

Code: Select all

watcher:/home/cwilliams# ls -l /etc/apache2/conf.d/
total 4
-rw-r--r-- 1 root root 24 2007-05-06 09:56 charset
lrwxrwxrwx 1 root root 19 2007-05-08 13:09 zoneminder.conf -> /etc/zm/apache.conf

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#10 Post by chrismortimore »

Cool. Just restart apache, and cross your fingers ;)
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#11 Post by Carlosinfl »

Yes - I was able to hit the web interface and now I assume I just need to manage my camera and all that good stuff.

I for some reason thought I had to create a MySQL database and do all this nasty stuff to get this working but I assume not since I got this far. That or the .deb package did this all for me...

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#12 Post by chrismortimore »

Carloswill wrote:I for some reason thought I had to create a MySQL database and do all this nasty stuff to get this working but I assume not since I got this far. That or the .deb package did this all for me...
If the mediawiki .deb is anything to go by, you'll have to do it yourself. I hate installing mediawiki, my knowledge of SQL is very very limited. On the plus side, the mysql manual is amazing.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#13 Post by Carlosinfl »

I don't know what mediawiki is - do I need that for ZoneMinder to work?

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#14 Post by chrismortimore »

Carloswill wrote:I don't know what mediawiki is - do I need that for ZoneMinder to work?
Nope, sorry I was rambling off on a tangent. Just ignore me ;)
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#15 Post by Carlosinfl »

Ok - cool. Everything worked great so far however I can't get any video feed from my one and only added "monitor".

It appears that since I installed ZoneMinder via Apt-Get, I have a permissions issue using the USB camera located at /dev/video0.

You can see my troubles here...

http://www.zoneminder.com/forums/viewto ... 1266#31266

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#16 Post by chrismortimore »

For the permissions, post the output of "ls -l /dev/video0".
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#17 Post by Carlosinfl »

Here are the permissions for /dev/video0...

Code: Select all

watcher:/home/cwilliams# ls -l /dev/video0 
crw-rw---- 1 root video 81, 0 2007-05-06 09:59 /dev/video0
I asked on the ZoneMinder forums and it seems because I installed ZoneMinder via APT-GET and not the traditional way, I would be kind of on my own as they feel this is a Debian related issue.

Any ideas why ZoneMinder can't use /dev/video0? It appears that only root and video can read/write to this. Should I chmod 777 /dev/video0?

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#18 Post by chrismortimore »

Carloswill wrote:I asked on the ZoneMinder forums and it seems because I installed ZoneMinder via APT-GET and not the traditional way, I would be kind of on my own as they feel this is a Debian related issue.
I'd agree on this one.
Carloswill wrote:Any ideas why ZoneMinder can't use /dev/video0? It appears that only root and video can read/write to this. Should I chmod 777 /dev/video0?
chmoding it should work, and if your not fussed about "everyone" (meaning people logged into your computer) being able to view the camera, then it's probably easier. The other alternative is to find out what user zoneminder is running under and add it to the video group. If you run "ps -AF", it will show you a list of every process and the user running it. Just dig it out from there, and use "gpasswd -a [username] video" and restart zoneminder. From what I can see, if you do "ps -AF | grep zm", it should give you the zoneminder-related info. If you have no luck, let me know and I'll install it at my end and give it a go myself.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Carlosinfl
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

#19 Post by Carlosinfl »

I just ran this command:

Code: Select all

cwilliams@watcher:~$ su
Password: 
watcher:/home/cwilliams# ps -AF | grep zm
www-data 11119     1  0  2966  6520   0 May08 tty1     00:00:07 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
www-data 11146 11119  0  4330 13132   0 May08 tty1     00:00:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl
www-data 11149 11119  0  2968  7644   0 May08 tty1     00:00:00 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
www-data 11152 11119  0  2938  7520   0 May08 tty1     00:00:05 /usr/bin/perl -wT /usr/bin/zmwatch.pl
root      9130  9128  0   739   740   0 18:29 pts/0    00:00:00 grep zm
Would I be correct in understanding that the user is www-data?

Should I run the command you suggested against www-data?

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#20 Post by chrismortimore »

Yup, "gpasswd -a www-data video" should do it. Remember to restart zoneminder and any related programs afterwards.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Post Reply