Page 1 of 1

Installing ZoneMinder on CentOS 5.5 / BlueOnyx server

Posted: Fri Dec 17, 2010 7:10 pm
by Mad Professor
Good day all.

I am looking for help and advice with regards to installing ZoneMinder on my home server.

I am still very new to linux, so only know the basics.

This server is running BlueOnyx and is based on CentOS 5.5, so I have been reading this post: My install guide for CentOS 5.5 - 32 bit....

This server is used for my hosting my own web sites, media server, and is running 24/7.

As there is not much load on the system, I tought it would be point less to build a 2nd system just for ZoneMinder, so I would like to get it running as well.

Server Specs
2x Duel-Core AMD Opteron 275 Processors @ 2.2GHz.
16GB PC3200 ECC Memory.
6x 2TB WDC Green Hard Drives in Raid-1.

The last thing I want to to is brake the current install.

Can you please advice me how I can test, and get all the info I need to help and install ZoneMinder on my server with all the other software as well.

Thanks for your time.

Best Regards.

Posted: Sat Dec 18, 2010 3:16 pm
by knight-of-ni
Your Opteron system is similar to mine. I run Zoneminder on a single server that hosts all sorts of applications (including a Drupal based web front end). I do not recall any incompatibilities with any other applications. Just make sure and dedicate a partition to nothing but video storage and also back up any existing mysql databases before you add the Zoneminder database (just in case).

Have you read this slightly outdated guide?
http://www.zoneminder.com/wiki/index.php/CentOS.
I believe most of it still applies to CentOS 5.5.

If minimizing the chances of breaking something is a top priority (and you are willing to take the time to do this), then I would recommend learning Zoneminder in a virtual machine. You could clone your existing system and restore it into that virtual machine. This assumes you have partitioned your system such that you can clone just the operating system and not whatever else you may have stored on all those 2TB hard drives.

You did not state the type and/or quantity of cameras you are using, but Zoneminder should run just fine within a virtual machine if you are using a handful of ip cameras.

And lastly on a slightly off topic note, you mentioned that you have six 2TB drives in a single RAID 1 volume. With that many drives, any other raid configuration is going to get you either more storage and/or better performance while still maintaining data redundancy. RAID 10 for example would get you better performance. Do you have a specific reason for going with RAID 1? Or was that a typo?

Posted: Sat Dec 18, 2010 3:40 pm
by Mad Professor
I am sure I have read that link, but I will read it again.

I will be using four standard 520TVL Colour CCTV Cameras.

I will be using the "High Performance 8 Channel 240 FPS Zoneminder compatible BT878a DVR card" from http://www.camsecure.co.uk/Zoneminder.html
Image
Image

I am still waiting for this to turn up in the post, should be here on monday I hope.

As for the raid that is something else I have never done before, so just setup Raid-1, to have a mirror backed of eveything.

Posted: Sun Dec 19, 2010 5:09 pm
by Mad Professor
I did not think about trying to run a virtual machine.

Today I did just that, but I can only get as far as the make command, then I get an error.

Installed a clean copy of BlueOnyx based on CentOS 5.5 onto my VirtualBox.

And here is what I did.
(1) yum -y update
(2) reboot
(3) yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-Archive-Zip subversion screen
(4) reboot
(5) nano /etc/yum.conf
Add
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

(6) rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
(7) yum -y install perl-MIME-tools perl-Date-Manip perl-LWP-UserAgent-Determined perl-PHP-Serialization perl-Device-SerialPort perl-Sys-Mmap.i386 perl-Module-Load git yasm ffmpeg ffmpeg-devel
(8) nano /etc/yum.conf
remove
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

(9) reboot
(10) wget http://www2.zoneminder.com/downloads/Zo ... 4.2.tar.gz
(11) tar -zxvf ZoneMinder-1.24.2.tar.gz
(12) cd ZoneMinder-1.24.2
(13) ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=
(14) make


Here is the error when I try and run the make command
make all-recursive
make[1]: Entering directory `/home/.users/112/admin/tmp/ZoneMinder-1.24.2'
Making all in src
make[2]: Entering directory `/home/.users/112/admin/tmp/ZoneMinder-1.24.2/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -frepo -g -O2 -MT zmc.o -MD -MP -MF ".deps/zmc.Tpo" -c -o zmc.o zmc.cpp; \
then mv -f ".deps/zmc.Tpo" ".deps/zmc.Po"; else rm -f ".deps/zmc.Tpo"; exit 1; fi
/usr/include/libavutil/common.h: In function âint32_t av_clipl_int32(int64_t)â:
/usr/include/libavutil/common.h:154: error: âUINT64_Câ was not declared in this scope
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/home/.users/112/admin/tmp/ZoneMinder-1.24.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/.users/112/admin/tmp/ZoneMinder-1.24.2'
make: *** [all] Error 2
Being quite new to linux, this kind of error is well over my head.

Can you please advise.

Posted: Sun Dec 19, 2010 5:42 pm
by knight-of-ni
libavutil is part of ffmpeg. You've got a problem with the way ffmpeg has been installed and/or configured. This is a common problem.

Here are a couple of things to try:
- Try searching for "libavutil" in the forums... I'm sure this has been discussed.
- Compile ffmpeg yourself.

I have had better results compiling ffmpeg rather than troubleshooting the rpm from the repository. Note that you should uninstall ffmpeg (e.g. yum remove ffmpeg ffmpeg-devel) before compiling from source.

After downloading the latest svn from the ffmpeg site, here is how I compile ffmpeg:

Code: Select all

./configure \
--enable-gpl \
--enable-shared \
--enable-pthreads \
--enable-nonfree \
--cpu=opteron \
--extra-cflags="-O3 -march=opteron -mtune=opteron"
Then you do a make, make install, and most importantly make install-libs.
Then hopefully zoneminder will compile.

Posted: Sun Dec 19, 2010 8:30 pm
by Mad Professor
Can you please advice where I can find the source for the following, so that I can compile them on my system.
perl-MIME-tools
perl-Date-Manip
perl-LWP-UserAgent-Determined
perl-PHP-Serialization
perl-Device-SerialPort
perl-Sys-Mmap.i386
perl-Module-Load
Best Regards.

Posted: Sun Dec 19, 2010 11:09 pm
by knight-of-ni
Compiling Perl modules from source is in the zoneminder documentation. I believe it has been moved to the troubleshooting section. It is pretty straightforward.

However, once you add the rpmforge repositories you should be able to find nearly all the perl modules that Zonemidner needs w/o compiling from source. If I recall (it has been awhile) there were only two modules I had to compile from source... the x10 module and mmap module. I found rpm's for all the rest.

You can search for rpm's by using "yum search" from the command line or you can install yumex to add/remove/search for modules graphically.

Posted: Thu Dec 23, 2010 9:36 am
by Mad Professor
Thanks again for your replys.

Due to the problems of getting ZoneMinder installed on BlueOnyx / CentOS 5.5, I desided to start clean, and install Ubuntu 10.10 Server 64-Bit.

It took less then an hour to install the Ubuntu OS, and ZoneMinder.

Now just got to get some compatible hardward for my server, after I found out the car I ordered will not work with it.

Doh!.

Posted: Thu Dec 23, 2010 3:52 pm
by knight-of-ni
Yeah, compiling Zoneminder from source tends to be on the more complicated side. The learning curve is pretty steep especially for someone new to the Linux experience.

What I hope is that it does not discourage you from using either Zoneminder or Linux.

About your card, didn't it have four bt878 chips on it? The driver for that chipset is built into the kernal. The trick is to put the right module parameters into a text file under /etc/modprobe.d.

What I mean is something like this:

Code: Select all

options bttv gbuffers=32 card=77 tuner=4 radio=0 coring=1 full_luma_range=1 chroma_agc=1 combfilter=1 autoload=0 triton1=0 vsfx=0 no_overlay=0
This line is for a "pico" card, which only has 1 bt878. It probably won't work for your card, but with a little research in this forum you should be able to figure out what does work.