Possible issues and solutions while installing on Fedora 1

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
Post Reply
seb
Posts: 14
Joined: Wed Aug 25, 2004 7:27 am
Location: Belgium

Possible issues and solutions while installing on Fedora 1

Post by seb »

Hi, this is my first post.

As a small contribution to this exciting project, this is a description of how I got ZM working on my Fedora Core 1 system.

First of all, I installed MySql packages :

- mysql
- php-mysql
- mysql-server
- mysql-devel


Apache was already installed.

Dependencies :

- Perl-DBI
- Perl-DBD-MySQL

I also installed these packages found on dag.wieers.com :

- Perl-Data-Showtable
- Perl-Term-Clui
- Perl-Term-Readline-Gnu

I'm not sure about these packages being needed or no though.

- libjpeg-devel is needed too

yum installed these packages :
- netpbm
- netpbm-progs

As described in the docs, I imported the database schema in MySQL and renamed the DB "zm".

Next..

I had several issue while running ./configure...

It kept saying my cpp (/lib/cpp) had sanity check issues.
Packages needed in this case :
- gcc-c++
- libstdc++-devel
- zlib-devel

Next issue, libmysqlclient.a missing.. I slocated the file in /usr/lib/mysql..
Just symlink the file in /usr/lib

./configure then went thru

This is the command I issued for my system :

./configure --with-mysql=/var/lib/mysql --with-cgidir=/var/www/cgi-bin --with-webdir=/var/www/html/apps/zm

My www root directory is /var/www/html/apps/

You'll need this in your httpd.conf file :

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

Then restart Apache.

Once ./configure correctly went thru, type :
perl zmconfig.pl

You'll be asked many questions about the program, you need to be careful about the database name and host, the other questions as far as I remember are not critical since you can change these settings later on.

then issue "perl zmconfig.pl -noi" (don't ask me why, I have no clue.. found that on the forum)

make

make install

zpkg.pl start and http://server/apps/zm

You're in ZM console !

You need to create your monitor, considering your webcam is running properly on your system.

The most important tab when creating a monitor is the second one.

This is what I entered
Device Number (/dev/video?) : 0
Device Channel : 0
Device Format (0=PAL,1=NTSC etc) 0
Capture Palette YUV420P (works fine for me, depends on your cam)
Capture Width (pixels) 320
Capture Height (pixels) 240
Orientation Normal

Here we assume the cam is running on /dev/video0..

You should see the picture now.. if you don't double check cgi-bin is correctly set in apache config file.

Now you can have fun testing the different settings.. record, modect,..


============

If you don't have your webcam installed on your machine..

This is my experience, I have a Creative Webcam 3 or Plus, I never really knew.. it uses ov511..

I had USB deactivated on my system.. and in the BIOS.. (I wasted one hour wondering why USB wouldn't work :P )

When it restarted after enabling USB under BIOS, kudzu detected the new hardware and installed USB..

I would install pciutils if I were you, just to know which usb-uhci or usb-ohci you will need to use.. Once it's installed :

lspci -vv and check in the output

I needed uhci..

modprobe usbcore
modprobe usb-uhci <OR> modprobe usb-ohci
modprobe videodev
modprobe ov511

Then the camera was working !

Check alpha.dyndns.org for more info

Now, if i issue "lsmod" this is the output

ov511 81440 1
videodev 8288 1 [ov511]
keybdev 2656 0 (unused)
mousedev 5268 0 (unused)
hid 23908 0 (unused)
input 5888 0 [keybdev mousedev hid]
usb-uhci 26124 0 (unused)
usbcore 78752 1 [ov511 hid usb-uhci]

In the configuration of ZM I wanted to set the authentification on.
I wasn't able to log in entering the passwork I specified.. I still need to figure this out. To get back to the old setting I needed to change the value of "ZM_OPT_USE_AUTH" in MySQL to 0.

When starting MySQL it says it didn't start and times out.. SQL is correctly running though.. it's an issue about InnoDB that I still need to figure out.

I couldn't edit zones, you just need to grant access to the unprivileged user to your SQL DB..

Sometimes I can't access my server after a while I'm connected to ZM at home, it's my WinXP installation that messes around..


Voilà ! Hope this helps you out !


Note : I didn't figure out everything yet, there may be errors in my installation process.. correct me if I'm wrong of if I missed something or anything !

If you need help, you can always ask and I will try to help you !

Note 2 : I had my camera running on RH7.3 and FC1 always using ov511 drivers.. the camera tends to get redish when on low light.. the quality is quite poor... if someone had the experience and has a clue on how to improve that.. any info is welcome

Seb
Last edited by seb on Mon Aug 30, 2004 11:33 am, edited 1 time in total.
seb
Posts: 14
Joined: Wed Aug 25, 2004 7:27 am
Location: Belgium

Post by seb »

In the main window, the console, I wanted more than the 1 minute load and disk usage in the right upper corner..

I now have the 3 load average values + disk usage + mb free on the disk

Load: 0.11, 0.12, 0.09 / Disk: 7% / Free: 4666.12M

edit zm_funcs.php

Code: Select all

function getLoad()
{
       $uptime = shell_exec( 'uptime' );
       $load = '';

       if ( preg_match( '/load average: (\d.+\d.+\d.)/', $uptime, $matches ) )
               $load = $matches[1];
       return( $load );
}

function getDiskPercent()
{
        $df = shell_exec( 'df '.ZM_DIR_EVENTS );
        $space = '-1';
        if ( preg_match( '/\s(\d+)%/', $df, $matches ) )
                $space = $matches[1];
        return( $space );
}

function getFreeSpace()
{
        $df = disk_free_space( ZM_DIR_EVENTS );
        $dfM = round(( ( $df / 1024 ) / 1024 ),2) ;
        return( $dfM );
}
Then, edit zm_html_view_console.php and replace the bighead table by this piece of code :

Code: Select all

<td class="bighead" align="center"><strong><a href="http://www.zoneminder.com" target="ZoneMinder">ZoneMinder</a> <?= $zmSlangConsol
e ?> - <?php if ( canEdit( 'System' ) ) { ?><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=state', 'zmState', <?= $jws['stat
e']['w'] ?>, <?= $jws['state']['h'] ?> );"><?= $status ?></a> - <?php } ?><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=vers
ion', 'zmVersion', ".$jws['version']['w'].", ".$jws['version']['h']." );", "v".ZM_VERSION, canEdit( 'System' ) ) ?></strong></td>
<td class="smallhead" align="right"><?= $zmSlangLoad ?>: <?= getLoad() ?> / <?= $zmSlangDisk ?>: <?= getDiskPercent() ?>% / Free: <?= getFreeSpace() ?>M</td>


Hope you like..
seb
Posts: 14
Joined: Wed Aug 25, 2004 7:27 am
Location: Belgium

Post by seb »

Installed the latest version (1.22.0) of Zoneminder under CentOS 4.2 (kernel 2.6)

I came across some similar errors I experienced under FC1 :

I had to use this command or it would complain about libmysqlclient.a missing :
./configure --with-mysql=/usr --with-cgidir=/var/www/cgi-bin --with-webdir=/var/www/html/apps/zm

Device number became Device path : you'll have to fill in the full path.. /dev/video0 for me

Seemed like the "perl zmconfig.pl" command was no longer needed

Had to allow FollowSymLinks under Apache for the ZM directory

I gotta say the javascript resizing the window ticks me off :
Just comment this line under zm_html_view_console.php:
window.resizeTo( <?= $jws['console']['w'] ?>, <?= $jws['console']['h']+(25*(count($monitors)>6?count($monitors):6)) ?> );



Voilà :D
Seb
Last edited by seb on Tue Feb 28, 2006 6:01 pm, edited 1 time in total.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

You should be able to turn off the console resizing with the ZM_WEB_RESIZE_CONSOLE option.
Phil
Post Reply