Difference between revisions of "SuSE 10.1 and ZoneMinder"
Line 139: | Line 139: | ||
===Configuration Time=== | ===Configuration Time=== | ||
Within Terminal window, in ZoneMinder-1.22.2 directory | Within a Terminal window, in ZoneMinder-1.22.2 directory | ||
./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 | ./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 | ||
Revision as of 15:57, 12 October 2006
Dgsconseil was kind enough to write a step-by-step
newbie kit to install ZoneMinder under SUSE
10.0 OSS. I copied it and modified it to for
SuSE 10.1 with a GUI and the KDE.
This is only a short How-To on how I installed SuSE and
ZoneMinder software on SUSE 10.1 OSS,
it is not intended to be a reference because I do not specify any of the
security rules or optimizations needed for a production server. I just specify the main steps to get Zone
Minder Running.
By the
way, this is not the smallest installation possible. It’s just what I used and it worked. It seemed that if I skipped any of the additional packages, I’d
run into trouble.
Fresh install SuSE 10.1 OSS (CD install)
Base installation with KDE Desktop and additional packages
- Additional Software Packages chosen during install
-
- Graphical Base system
- KDE Desktop Environment
- All of KDE
- Help and Supports Docs
- Office applications
- Multimedia
- Simple Web Server with Apache2
- LDAP Server and Tools
- Network and Server
- C/C++ Complier and Tools
- Kernel Development
- KDE Development
- TCL/TK development system
- Java
- Experienced user
- LaTex, SGML and XML
If using the firewall, add HTTP Server to the Allowed Services list, if you want to access ZoneMinder with a web browser.
Once the Installation is finished, open the YAST control center. (Under System)
- If you have an internet connection - In YAST, add packman as an http installation source(used to install ffmpeg)
- Type : HTTP
- Server : packman.unixheads.com
- Path : suse/10.1
Go into YAST Software Management
- Verify that these packages are installed, Install any that are missing (Enter each name in Search box)
- apache2
- apache2-worker
- apache2-mod_perl
- apache2-mod_php5
- apache2-mod-apparmor
- php5
- mysql
- mysql-devel
- gcc
- gcc-c++
- libmpeg2
- libmpeg2-devel
- ffmpeg
- libffmpeg0
- libffmpeg0-devel
- libjpeg
- libjpeg-devel
- pcre-devel
- xawtv
- openssl-devel
Updating perl CPAN and installing perl packages
I've done all off the perl related installation under user root because of problems with cpan packages installation. It seems like a slow process, have patience.
From within a Terminal window:
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
Configure servers to be started at boot time
From within a terminal window:
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 manually
From within a terminal window:
sudo /etc/rc.d/apache2 start sudo /etc/rc.d/mysql start
Downloading and installing latest Zoneminder release (v1.22.2) :
Download and save ZoneMinder tarball from: http://www2.zoneminder.com/downloads/ZoneMinder-1.22.2.tar.gz
Extract tarball
From within a Terminal window, inside directory that ZoneMinder download was saved to
tar zxvf ZoneMinder-1.22.2.tar.gz cd ZoneMinder-1.22.2
Download and apply the v1.22.2 patch for ffmpeg from Wiki
http://www.zoneminder.com/wiki/index.php/1.22.2_Patches
To apply the patch you should do the following
- Download the patch and move a copy to your ZoneMinder build directory
- Open a command shell (terminal window)
- Change directory to your ZoneMinder build directory
- Apply the patch by typing the following command
- patch -p0 < zm-1.22.2-ffmpeg.patch
- Check that the patch is applied correctly and you do not get any rejects
- If necessary rebuild, then reinstall
Configuration Time
Within a Terminal window, in ZoneMinder-1.22.2 directory
./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
Configure MySQL
Within a Terminal window, Make sure you’re in the ZoneMinder-1.22.2 directory and Login to MySQL (PW is blank)
mysql -h localhost -u root -p
Under MySQL prompt type (Entering Each line will echo a bunch of lines, just ignore them)
source db/zm_create.sql; grant select,insert,update,delete on zm.* to 'zm'@localhost identified by 'zm'; flush privileges; quit
Compile ZoneMinder
Within a Terminal window, Make sure you’re in the ZoneMinder-1.22.2 directory Now compile and install this nice piece of software !
make sudo make install
Configure ZoneMinder to be started at boot time
Within a Terminal window, Make sure you’re in the ZoneMinder-1.22.2 directory
su - # from zoneminder source directory cp scripts/zm /etc/rc.d cd /etc/rc.d chmod +x zm cd rc5.d ln -s ../zm S99zm ln -s ../zm K00zm
Logoff and logon as root, or create a new session as root.
- Edit /etc/rc.d/zm with your favorite text editor (kwrite ?)
- 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!)
Minor changes in the htdocs folder
Copy the /srv/www/htdocs/zm.php file on top of the /srv/www/htdocs/index.php file.
Rename or delete the /srv/www/htdocs/index.html file
Add the following lines to your /etc/sysctl.conf file: (I chose 256,000,000 because my cams are 640x480)
# Memory modifications for ZoneMinder kernel.shmall = 256000000 kernel.shmmax = 256000000
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 already started when you boot your computer :
From within a Terminal window
sudo /etc/rc.d/apache2 start sudo /etc/rc.d/mysql start sudo zmpkg.pl start
Now open your web browser and point to http://localhost/ If that doesn’t work, try http://localhost/zm.php
Create your monitor and start playing
Here are some options I use when configuring a monitor for my Axis IP camera at 640x480, color.:
- Under the General Tab
-
- Source Type = Remote
- Function = Modetect
- Enabled = Checked
- Linked Monitors = (leave it blank)
- Maximum FPS = 4.0
- Alarm Maximum FPS = 8.0
- Under the Source Tab
-
- Remote host name = IP of camera (i.e. 192.168.3.2)
- Remote Host Port = 80
- Remote Host Path = /axis-cgi/jpg/image.cgi?resolution=640x480
- Remote Image Colours = 24 bit colour
- Capture Width = 640
- Capture Height = 480
If you want to utilize mpeg instead of jpeg, use this for the host path:
Remote Host Path = /axis-cgi/mjpg/video.cgi?
- Additional Information
- ZoneMinder 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
Apache2 Logs are in /var/logs