I will be recording the steps I take to compile ZoneMinder on Debian Etch as of Dec 2007.
- Raid storage, so the drives will have Raid 1 for boot, and Raid 5 for data storage. I will use only 2 GB for root and the rest for storage.
- Working PV-149 purchased from Bluecherry, with 2 cameras attached.
- I won't have a hot spare, but I'll have a cold spare. So when setting the 'active' devices and 'backup' devices keep that in mind.
Step one: Download Debian Etch netinstall and install to cd. You'll have to google the link. This way you get the newest version.
Step two: Put cd into the cd-rom drive and reboot the computer. Boot into the cd.(If you don't know what to do you'll need to google, ask on the forum, or quit here)
Step three: (Debian Install) -Press "Enter" to boot the cd. -Press "Enter" to select English -Press "Enter" to select American English -Press "Enter" to select American English keymap -Type in hostname. I use "debianDVR" Press "Enter" -Type is your domain name. If you don't have your own domain name, then leave it blank. If you do, and it's configured properly on your DHCP server it should be auto detected.
- Hard drive setup
-Select "Manual" partition -If there are already partitions on your drives select the partitions, press enter, then select delete the partition. Do this for all of your drives until they are all 'Free Space'. ONLY DO THIS FOR DRIVES THAT YOU WANT TOTALLY ERASED. IF YOU HAVE ANY DATA YOU WANT SAVED, THEN BY ALL MEANS DON'T DELETE THE PARTITIONS.
-Select the first drive's Free Space. Select 'Create a new partition'. Enter "2 GB", then continue. Select Primary. Select Beginning. Change use as to 'Physical Volume for RAID'. Done setting up the partition. Repeat for each of your drives.
-Now with the remaining free space on the drives do the same as above, but tell it to use the full drive space instead of 2 GB.
-Now once you are done, select 'Configure software RAID at the top of the partition screen. Select Yes to write changes. Select Create MD device. Select RAID 1. Set the number of active partitions equal to the number of drives you have. Set backup to 0. Select all of the sd*1's: such as sda1, sdb1, sdc1, etc.
-Now create another MD device. same as above, except that you select the remaining sd*2's.
-Select your RAID 5 drive, change 'use as' to physical volume for LVM.(This will let your change the size of your partitions later. This is very useful.) Finished setting up partition.
-Now select configure LVM. Select 'yes' to write changes to disk. Create volume group. I named my group name to "debianDVR". select your new md1 device.
-Create logical volume for swap. select your debianDVR group. I named mine "swap". use 2000 MB, since I have 2 GB of ram. Finished
-Create logical volume for /var. select your debianDVR group. I named mine "logicvar". use default size. Finished
-Select your larger LVM partition, change 'use as' to ext3, change mount point to '/var'. Finished.
-Select your smaller LVM partition, change 'use as' to swap, finished.
-Select your smaller RAID 1 drive now, set 'use as' to Ext 3, change Mount point to root "/ ". Then select Done setting up the partition.
-Select Finish partitioning and write changes to disk
-Select 'yes' you want to write the changes to disk.
- Everything else in the debian install
-Select your time zone
-Type your root password, confirm it. Type your username, confirm it, type the username password, confirm it.
-Select your mirror country, I use USA.
-Select your mirror. Try to select one that sounds close to you.
-You decide if you want to participate in the survey.
-Install only the base server system.
-Wait... and Wait some more.
-Yes you want to write it to the Master Boot Record.
-remove the cd and boot into your new Debian server that is now ready to compile zoneminder.
- Install Zone Minder.
-log into your server. Enter the command "vim /etc/apt/sources.list" copy the line that says "deb http://ftp.us.debian.org/debian/ etch main" and add another below that says "deb http://ftp.be.debian.org/debian/ unstable main". save and close vim. now type: apt-get update;apt-get install zoneminder. say yes to the question.
-sit back and let it install.
-Just a few commands to make it work. I installed zoneminder 1.22.3-9
- ln -s /usr/share/zoneminder /var/www/zm"
- /var/www# echo "AddType application/x-httpd-php .php" > /etc/apache2/httpd.conf
- /etc/init.d/apache2 restart
- chmod 666 /dev/video0
- log into your new server through firefox. I use the address http://192.168.100.241/zm/
- Add a camera "Add New Monitor->Type camera name->Change funtion to Mocord-> change device to /dev/video0-> set screen size to 320x240;
-Should be all done...