SUSE 10 OSS Installation intruction with network camera

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
dgsconseil
Posts: 13
Joined: Sun Feb 12, 2006 3:20 pm

SUSE 10 OSS Installation intruction with network camera

Post by dgsconseil »

Well here is a step by step newbie kit (made by a noob.... me) to install ZoneMinder under SUSE 10.0 OSS.

This is only a short HowTo on how to install all off the required pieces of software on SUSE 10.0 OSS, it is not intended to be a reference because i do not specify any of the security rules or optimisations needed for a production server.
I just specify the main steps to get Zone Minder Running.

enjoy !

Fresh install Suse 10 OSS 64Bits (net install)
Base installation without additionnal package
My network parameters for network install:
  • Type : FTP
    Server Ip : 193.190.198.20
    Path : mirror/ftp.opensuse.org/opensuse/distribution/SL-10.0-OSS/inst-source
Add packman source install for ffmpeg
  • Type : HTTP
    Server : packman.rsync.zmi.at
    Path : suse/10.0
Package installation using YAST2
  • apache2-worker
    apache2
    apache2-mod_perl
    apache2-mod_php4
    php4-session updated 2006-03-24 thnax to mickecarlsson
    mod_php4-core
    mysql
    mysql-devel
    gcc
    gcc-c++
    libmpeg2-devel
    ffmpeg
    libjpeg-devel
    pcre-devel
    xawtv
    lynx Updated 2006-03-23 : needed by cpan configuration
    ncftp Updated 2006-03-23 : needed by cpan configuration
    openssl-devel
Configure servers to be started at boot time

Code: Select all

su -
cd /etc/rc.d/rc5.d
ln -s ../apache2 S98apache2
ln -s ../apache2 K01apache2
ln -s ../mysql S98mysql
ln -s ../mysql K01mysql
Start servers

Code: Select all

	sudo /etc/rc.d/apache2 start
	sudo /etc/rc.d/mysql start
Updating perl CPANand installing perl packages
I've done all off the perl related installation under user root because of problems with cpan packages installation

Code: Select all

perl -MCPAN -e shell
install Bundle::CPAN
reload CPAN
install Archive::Tar (seems to be optional => depend on the way you install yourdistro)
install Archive::Zip (seems to be optional => depend on the way you install yourdistro)
install MIME::Lite
install MIME::Tools
install DateTime 
install Date::Manip updated 2006-03-04 thanx to mickecarlsson
install Bundle::libnet
install Device::SerialPort
install Astro::SunTime Updated 2006 03 24 correct spelling error on SunTime (thanx to mickecarlsson)
install X10
Downloading and installing latest Zoneminder release :
Extract tarball

Code: Select all

tar zxvf ZoneMinderTarball.tar.gz
cd ZoneMinderSourceDirectory
Now Configuration Time !

Code: Select all

./configure --with-webdir=/srv/www/htdocs/ --with-cgidir=/srv/www/cgi-bin/ --with-webgroup=www --with-webuser=wwwrun ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zm ZM_DB_PASS=zm --with-libarch=lib64
Login to MySQL

Code: Select all

mysql -h localhost -u root -p
Under MySQL prompt type

Code: Select all

source db/zm_create.sql;
grant select,insert,update,delete on zm.* to 'zm'@localhost identified by 'zm';
flush privileges;
quit


Now compile and install this nice piece of software !

Code: Select all

make
sudo make install
Dealing with the Shared Memory problem
just add the following lines to your /etc/sysctl.conf file:

Code: Select all

kernel.shmall = 134217728
kernel.shmmax = 134217728 


Configure ZoneMinder to be started at boot time

Code: Select all

su -
# from zoneminder source directory
cp scripts/zm /etc/rc.d
cd /etc/rc.d
chmod +x zm
# edit zm with your favorite text editor (vi ?)
# remove the line related to include functions
# replace all occurences of echo_success by echo success
# replace all occurences of echo_failure by echo failure
# save the changes (ie :x!)
cd rc5.d
ln -s ../zm S99zm
ln -s ../zm K00zm
Now you can reboot your computer to apply changes

Well we are at the end of the process
Start all servers if they are not allready started when you boot your computer :

Code: Select all

sudo /etc/rc.d/apache2 start
sudo /etc/rc.d/mysql start
sudo zmpkg.pl start
Now open your browser and point to http://localhost/zm.php
Create your monitor and start playing !

Logs are in /tmp
  • zmaudit.log
    zmupdate.log
    zmwatch.log => take attention to this one because the shared memory problem is reported here
    zmpkg.log
    zmdc.log
My test config is :
  • Case : Antec SLK3000b
    Power suply : Fortron 350W
    Mother board : MSI K8MM
    CPU : Sempron 2600+
    Ram : 512 Mo DDR PC3200
    HDD : 80 Go Maxtor
    Graphic card : ASUS GEFORCE4 TI4200 AGP 8X
    Network Camera : TrendNet TV-IP200W
Last edited by dgsconseil on Wed Mar 29, 2006 6:33 pm, edited 6 times in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Thank you for a very nice SuSe howtoo.
I know this well be usefull.

Regards,
Corey
dgsconseil
Posts: 13
Joined: Sun Feb 12, 2006 3:20 pm

Post by dgsconseil »

thx
majik-br
Posts: 17
Joined: Mon Sep 19, 2005 12:46 pm
Location: Sao Paulo, Brazil

Post by majik-br »

This is a great complete guide!

I was simply ignoring my shared memory errors until I found this guide :)

Other than that I compiled latest Apache (2.2.0), PHP (5.1.2) and MySQL (5.0.18) on my SuSE 10.0 (32bit). Everything working ok.

Thanks!
farmer
Posts: 3
Joined: Sat Feb 25, 2006 3:28 am

Post by farmer »

Any chance of getting a tarball of a compiled Suse 10.0 ZM system to try?
mickecarlsson
Posts: 8
Joined: Sat Feb 25, 2006 7:14 pm

Post by mickecarlsson »

I have just finished installing ZoneMinder on a SuSe 10.0 server.

Add to Package installation using YAST2
php4-session

Add to Updating perl CPAN and installing perl packages:

install Date::Manip

correct the spelling error:
install Astro::Suntime
should be
install Astro::SunTime

After installation:
cd /srv/www/htdocs
rm index.php
mv zm.php index.php

this is to get rid of 404 error when ZoneMinder refreshes.
Last edited by mickecarlsson on Sat Apr 01, 2006 9:00 pm, edited 1 time in total.
dgsconseil
Posts: 13
Joined: Sun Feb 12, 2006 3:20 pm

Post by dgsconseil »

thx for the remark and update
dgsconseil
Posts: 13
Joined: Sun Feb 12, 2006 3:20 pm

Post by dgsconseil »

farmer wrote:Any chance of getting a tarball of a compiled Suse 10.0 ZM system to try?
nop at the moment ... sorry not enough time to try that !
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

Needing help to install ZM in Suse 10.0 AMD64

Post by pre-newbie »

Hi everybody.
This is my first time in the forum and ZM. :lol:

I was totally lost until I found step by step manual made by dgsconseil.
I have no experience with mysql, nor php4 nor ZM. Then this manual and forum is my hope to set ZM to monitor a marine protected area where illegal hunt is usual.

Everything has been done logged as root
- I installed all the mentioned packages.
- I configured and started the apache and mysql servers.
- In the Perl update/install my problems started...

After install Bundle::CPAN
I got "Enter arithmetic or Perl expression: exit" (I pressed enter and continued)
After Install:Astro a lot of text appeared in the console, enting with:
"Shall I follow them and prepend them to the queue of modules we are processing right now?" I answered yes. More text appeared in the console ending with:
"make test had returned bad status, won't install without force"
I added then the last command Install X10 resulting in the same text.

Checking the messages, I found:
Warning: prerequisite Astro::SunTime 0.01 not found.
Warning: prerequisite Device::SerialPort 0 not found.
Warning: prerequisite Time::ParseDate 0 not found.

I guess that is the problem. But I installed all the packages and updated them. Am I missing something?

Later during the mysqul section, I am stuck at the level of the command: source db/zm_create.sql;

I get the error:
ERROR: Failed to open file 'db/zm_create.sql', error: 2

can anybody help this newbie?
thanks!
benny
Posts: 1
Joined: Mon Apr 10, 2006 11:12 am

Re: SUSE 10 OSS Installation intruction with network camera

Post by benny »

Hello,

I installed a ZONEMINDER with a TrendNet TV-IP200W but I can not watch video comming from this IP camera.

Could you share your ZM and TrendNet TV-IP200W configuration?

Thanks by advance
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Needing help to install ZM in Suse 10.0 AMD64

Post by zoneminder »

pre-newbie wrote: Later during the mysqul section, I am stuck at the level of the command: source db/zm_create.sql;

I get the error:
ERROR: Failed to open file 'db/zm_create.sql', error: 2
This would imply that configure hasn't run, or that you are trying to run from a directory other than your ZM build dir.
Phil
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

installing in suse10.0

Post by pre-newbie »

Hi Phil, you are totally right. That made the change.
I passed the CPAN section...
Now I am in the mysql.
I just copied all the settings porposed. Finally, the names and passwords, I guess they can be changed later. I just want to see ZM running.

I did log in mysql with the user and password proposed.
However, in the mysql prompt, after entering:
mysql> source db/zm_create.sql;

I got:
ERROR 1044 (42000): Access denied for user 'zm'@'localhost' to database 'zm'
I do not understand it because I already logged in the database... When I use the Mysql manager that comes with the mysql package i can connect to the database. Any idea?
Can I just restart from the CPAN section and creeate then the database again with another host, user and pass directly or I have to delete something from previous attempts?
Thanks for helping me
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

If you followed the README then the database user you created, e.g. 'zm' will only have limited permissions on the database (as they only neeed to access and insert etc). You should have a systemwide mysql user that has privileges to create databases etc. So you may be able to just log in by doing

Code: Select all

mysql zm
or you may need something like

Code: Select all

mysql zm -Uroot
or

Code: Select all

mysql zm -Uroot -P<a password>
Phil
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

zm and mysql

Post by pre-newbie »

thanks Phil
I am logged as the user zm in linux.
my database's host is localhost, name is zm, user is zm and password zm.
mysql zm -> access denied.
mysql zm -uroot -pzm -> unknown database 'zm'
mysql zm -uzm -pzm -> unknown database 'zm'

when using the mysql administrator application, with host: localhost, user: zm and pass: zm, it connects. But if I check the User Administrator folder, a pop up apperas: "Could not retrieve user privileges information".
then I try the buttton "new user", to add the user and that just makes the application to cruch.

any idea? I know this might be very basic, so if you want I can contact you directly in order to not bother other forum users with such silly questions.
thanks very much.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

pre-newbie its best to do it in the forum because least of all it helps me!! lol
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Post Reply