CentOS 5.1 and ZoneMinder 1.23.3 (stuck)

Support and queries relating to all previous versions of ZoneMinder
Locked
mudputty
Posts: 16
Joined: Thu May 22, 2008 5:31 pm

CentOS 5.1 and ZoneMinder 1.23.3 (stuck)

Post by mudputty »

OK, I have been all over the forum trying to put together a step by step on installing the latest ZoneMinder on the latest CentOS, but I have hit a snag.

Here are the steps I have taken so far:

Code: Select all

I start from within /root/
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

wget http://www2.zoneminder.com/downloads/ZoneMinder-1.23.3.tar.gz
wget http://www.zoneminder.com/fileadmin/downloads/cambozola.jar

yum install mysql mysql-bench mysql-server mysql-devel mysqlclient10 php php-gd php-mysql httpd gcc pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools perl-Date-Manip perl-Time-HiRes perl-LWP-UserAgent-Determined perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Module-Load

yum -y update

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg/ 
./configure --enable-gpl --enable-swscale --prefix=/usr
make 
make install 
make install-libs

chkconfig httpd on 
chkconfig mysqld on 
chkconfig ntpd on 
service httpd start 
service mysqld start 
service ntpd start

cd /root/
tar -zxvf ZoneMinder-1.23.3.tar.gz
cd ZoneMinder-1.23.3/

The file you would need to change is zm_mpeg.h in src/ and change the following two lines in that file: 
1.	include <ffmpeg> 
2.	include <ffmpeg> 

Would have to be canged to: 
1.	include <libavformat> 
2.	include <libswscale> 

./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache --with-ffmpeg=/usr ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass

make
After I do a "make" for ZoneMinder I get an error:

Code: Select all

/usr/lib/libavformat.a(matroskadec.o): In function `matroska_parse_block':
/root/ffmpeg/libavformat/matroskadec.c:2920: undefined reference to `BZ2_bzDecompressInit'
/root/ffmpeg/libavformat/matroskadec.c:2929: undefined reference to `BZ2_bzDecompress'
/root/ffmpeg/libavformat/matroskadec.c:2932: undefined reference to `BZ2_bzDecompressEnd'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.23.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.23.3'
make: *** [all] Error 2
Any ideas as to where I should go next?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Simplest way is to download an earlier version of ffmpeg from svn. They are constantly changing things in ffmpeg so most of the time you'll find that it is constantly not able to be built against without some code changes. The only thing we can promise is that ZM will build with the version in SVN at the time of our version release which was SVN-r11879.

Also you will find a how-to already done in the wiki, might be better to put your effort in to maintaining that if there are any inconsistencies. Also mysql-bench, and mysqlclient10 are not needed to build or run ZM.
mudputty
Posts: 16
Joined: Thu May 22, 2008 5:31 pm

Post by mudputty »

I looked in the Wiki, but did not find any directions for Centos 5.x. Is there one that is perhaps just not linked correctly?

Anyway, how would I get the past version of ffmpeg? Is that what the error is relating to? The SVN method is new to me.
mudputty
Posts: 16
Joined: Thu May 22, 2008 5:31 pm

Post by mudputty »

I looked at these steps but they seem so old:

http://www.zoneminder.com/forums/viewtopic.php?t=5601


So, I looked a bit more and now I found this under the Fedora Wiki part. Do you think that this might work under Centos5:

Code: Select all

 wget http://rpm.livna.org/livna-release-8.rpm
 rpm -ih livna-release-8.rpm
 yum install ffmpeg
 yum install ffmpeg-devel
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Code: Select all

svn checkout -r 11879 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
This will check out version 11879 from the svn.
mudputty
Posts: 16
Joined: Thu May 22, 2008 5:31 pm

Post by mudputty »

OK, just about there. It all seems to install just fine. Now, I do not understand how I am to add a USB camera. I have a few I am wanting to try. Let's start with the Logitech Quickcam 2000...I think that is what it is. How do I find the correct port for it, and will I need to install drivers for it? I can't seem to figure out how to make it show-up once I goto http://ip-address/zm/

I did this:

Code: Select all

zmu -d /dev/video0 -q -v
And in turn I got this:

Code: Select all

Video Capabilities
  Name: Logitech QuickCam Pro 4000
  Type: 1
    Can capture
  Video Channels: 1
  Audio Channels: 1
  Maximum Width: 640
  Maximum Height: 480
  Minimum Width: 160
  Minimum Height: 120
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 160
  Height: 120
Picture Attributes
  Palette: 15 - YUV 4:2:0 Planar
  Colour Depth: 24
  Brightness: 32256
  Hue: 65535
  Colour :32768
  Contrast: 64512
  Whiteness: 63488
Channel 0 Attributes
  Name: Webcam
  Channel: 0
  Flags: 0
  Type: 2 - Camera
  Format: 0 - PAL

(I am keeping track of everything I am doing. Once done I will post it under the Wiki)
mudputty
Posts: 16
Joined: Thu May 22, 2008 5:31 pm

Post by mudputty »

GOT IT!!!! OK, I had to install the "cambozola.jar" then restart the ZM server, and now it is working great! I will post the Wiki version of this next week! Thanks for the pointers.

I would toss up the steps now, but I gota head out.
mudputty
Posts: 16
Joined: Thu May 22, 2008 5:31 pm

Post by mudputty »

I have started posting a CentOS install for ZoneMinder within the Wiki. My goal is to have it pretty well done this week.

http://www.zoneminder.com/wiki/index.php/CentOS
zaine68
Posts: 2
Joined: Tue Jun 10, 2008 10:14 pm

Post by zaine68 »

Thanks so much for the guide but 1 question, did you ever come across this...?

configure: error: zm requires libmysqlclient.a

I know its there because i get this when i go to locate and find it!

[root@bandit ZoneMinder-1.23.3]# locate libmysqlclient.a
/usr/lib/mysql/libmysqlclient.a
/usr/lib64/mysql/libmysqlclient.a

Regards.
zaine68
Posts: 2
Joined: Tue Jun 10, 2008 10:14 pm

Post by zaine68 »

OK Found out after searching... again that you have to use...

-- with-mysql=/usr/lib64/mysql -with-extralibs ="-L/usr/lib64 -L/usr/lib64/mysql"

and it all works!!
Locked