Page 1 of 4

Ubuntu 7.04 (Feisty Fawn) installation walkthrough (kind of)

Posted: Tue Jul 10, 2007 3:23 pm
by ryscar
First, I would like to thank those that maintain this software and the live cd version. I initially did an installation from the live cd and it worked without any problems. 99.9% of this information came from other people so, thanks. Without you posting your stuff, I would not have been able to post this or get my system running. I chose to do the installation on Ubuntu/Debian because that is what I am familiar with. If someone finds this useful or feels that it should go somewhere else, feel free to copy or move it.

***Updated 2007-08-22***
Disclaimer:
I am not an expert, not even close. This is just what worked for me in my situation. Also, I have no idea if this is the right/secure way of doing things. Please excuse any typos, misinformation, horrible formatting or incoherent ramblings.
  • 1. Do a plain installation of Ubuntu server edition without LAMP or DNS.
    2. Log in to the root account.

    Code: Select all

    sudo -i
    3. Edit /etc/apt/sources.list and comment out the 3rd (I think) line so it will not look to the cd anymore.

    Code: Select all

    nano /etc/apt/sources.list
    4. Update

    Code: Select all

    apt-get update
    5. Upgrade

    Code: Select all

    apt-get upgrade
    6. Install ssh so you can use a Windows/Linux with a GUI machine to make any copy/pasting a lot easier.

    Code: Select all

    apt-get install ssh
    7. Get the ZonerMinder package (and thank Peter)

    Code: Select all

    wget ftp://www.northern-ridge.com.au/zoneminder/ubuntu/edgy/zoneminder_1.22.3-8_i386.deb
    8. Install the package. (This will complain about the missing dependencies but, step #9 should fix that.)

    Code: Select all

    dpkg -i zoneminder_1.22.3-8_i386.deb

    9. Fix the package dependices.

    Code: Select all

    apt-get –f install
    10. Create a symbolic link so Apache uses the correct configutation file.

    Code: Select all

    ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
    11. Install patch so you can patch files.

    Code: Select all

    apt-get install patch
    12. Move to the ZoneMinder directory

    Code: Select all

    cd /usr/share/zoneminder
    13. Get the filter patch file.

    Code: Select all

    wget http://www.zoneminder.com/downloads/zm-1.22.3-filter.patch
    14. Apply the patch

    Code: Select all

    patch -p0 < zm-1.22.3-filter.patch
    15. I read somewhere that you had to chown one of the files after patching it.

    Code: Select all

    chown www-data:www-data zm_actions.php
The installation of ZoneMinder is now complete. However, there are a few more things that should be done to make it function correctly. Take a look further down this page and follow the stuff that Lee Sharp suggests. It was necessary for to do the same things that he did and I will add them here once I get a chance to do a clean install. Once done with that stuff, I would suggest a restart.

Obviously this does not take into account the installation of capture cards and making sure they work. I was using the Kworld DVD Maker PCI cards that I picked up at my local Fry’s Electronics for a tad under $30 but, I recently purchased a 4-port card from Bluecherry and returned the other ones.

Thanks,
Ryan

Posted: Tue Jul 10, 2007 5:37 pm
by flat4
worked, great

Posted: Sun Jul 22, 2007 8:58 pm
by royce
Thanks for the walk though. I followed it to the letter and it worked great! :D

Posted: Mon Aug 06, 2007 8:35 pm
by mpoertner
I had to change my apache2 "DocumentRoot" from /var/www to /usr/share/zoneminder. Now it works.

The rest worked great! Thanks for sharing.

Posted: Tue Aug 07, 2007 1:35 am
by PeterHoward
mpoertner wrote:I had to change my apache2 "DocumentRoot" from /var/www to /usr/share/zoneminder. Now it works.
Hmmmm. You shouldn't have to do that. Step 11 should take care of the direction of http://{machine name}/zm.

Can you pls double-check that you really had to change to DocumentRoot? If so there's a problem somewhere . . .

Posted: Tue Aug 07, 2007 11:51 pm
by mpoertner
PeterHoward wrote:
mpoertner wrote:I had to change my apache2 "DocumentRoot" from /var/www to /usr/share/zoneminder. Now it works.
Hmmmm. You shouldn't have to do that. Step 11 should take care of the direction of http://{machine name}/zm.

Can you pls double-check that you really had to change to DocumentRoot? If so there's a problem somewhere . . .
I would check but I've reinstalled using Gentoo. That machine had other issues. I'm sure it's just me.

Cheers!
Matt

Posted: Sat Aug 11, 2007 10:42 pm
by martymoose
I had to do these steps from the wiki
The chmod option is discussed more in detail here :- http://www.zoneminder.com/forums/viewto ... mfix+chmod

and if this is your error, it can be fixed properly by following post 6 in the thread by typing :-

sudo chmod 4755 /usr/bin/zmfix

This basically gives the zoneminder program permanent enhanced privileges when accessing your video devices.


in ZM config, changed nph_zms to zms for more reliable video capture

(you probably do not have to do this. I changed nph_zms to zms because I was getting intermittent access. It would work once then fail, leaving zombie processes that leaked memory eventually crashing Ubuntu. This parameter is changed in the Config/paths tab. Change the field ZM_PATH_ZMS ; change the last bit from "nph-zms" to "zms" )

reloaded apache2, then off to the races....
also i have a ebay 4 port card pico2000
so i added this line to modeprobe.d /options

Code: Select all

options bttv card=77 tuner=4 radio=0 triton1=0 vsfx=0 autoload=0
now all good
now just to get the viewer program working

Posted: Sun Aug 12, 2007 12:30 am
by sesam_pt
hi, if you are talking about the xlib_shm viewer i have working using this steps

• Install xlib-shm-gl

sudo wget http://dig.hopto.org/xlib_shm/xlib_shm-0.6.3-gl.tgz
sudo tar xvf xlib_shm-0.6.3-gl.tgz
cd xlib_shm-0.6.3-gl/
sudo updatedb
sudo locate libmysqlclient.so.15
sudo ln -s /usr/lib/libmysqlclient.so.15 /usr/lib/libmysqlclient.so.12

Problem xlib only runs if started using sudo due to permission to access segment xxx, I’m waiting for help on this one, never happened in any of my fc5/fc6 installs

Posted: Sun Aug 12, 2007 2:45 am
by PeterHoward
Note that the latest release is now zoneminder_1.22.3-8_i386.deb, and it has the "Monitor Presets" patch applied, so you can skip applying that patch from now on.

Posted: Mon Aug 20, 2007 8:16 pm
by ryscar
PeterHoward wrote:Note that the latest release is now zoneminder_1.22.3-8_i386.deb, and it has the "Monitor Presets" patch applied, so you can skip applying that patch from now on.
Thanks! I will try and get around to updating the how-to to reflect that change and a couple of others this week. I will also try to make is a real "copy/paste" too.

Posted: Tue Aug 21, 2007 5:59 pm
by BillyHunt
Noob Alert!!!

I was doing so well :(
Then I came to number 11 and it totally lost me i tried typing in what I thought it meant with several different variations but I ain't getting anywhere

Help please! :?

Posted: Tue Aug 21, 2007 7:02 pm
by ryscar
I'm not sure I understand your problem.

If you type in this:

Code: Select all

 ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
You should be fine. All its doing is creating a symbolic link to from one file to another.

The

Code: Select all

/etc/init.d/apache2 reload
part will reload Apache so it uses the correct information. This step is not necessary as I have you do a reboot at the end.

Posted: Tue Aug 21, 2007 7:26 pm
by BillyHunt
ryscar wrote:I'm not sure I understand your problem.

If you type in this:

Code: Select all

 ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
You should be fine. All its doing is creating a symbolic link to from one file to another.

The

Code: Select all

/etc/init.d/apache2 reload
part will reload Apache so it uses the correct information. This step is not necessary as I have you do a reboot at the end.
Thanks! Man

A totally Noob mistake

At the expense of my total embarrassment I'll explain :oops:
I saw it as

In

Code: Select all

-s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
(If you do a

Code: Select all

/etc/init.d/apache2 reload 
here, you should be able to access the zm page now.)

All working now
Cheers!

Posted: Tue Aug 21, 2007 7:32 pm
by ryscar
No problem, glad I could help.

I am planing to getting this updated tomorrow. When I'm done, it should be easier to follow.

Posted: Tue Aug 21, 2007 9:58 pm
by Lee Sharp
Just an FYI, there is one part I disagree with in the instructions. There is no need to enable the root account, and it is dangerous for new users. I have several dozen Ubuntu/debian systems, and I am never "logged in" as root. Typing 'sudo -i' gives you a root shell that works just as well. Typing 'sudo nautilus --no-desktop' will give you a root file manager. This can also work over ssh. And please tell me that no one has ssh access to you root account! Or did you just send me the latest stock tip? :D Remember that these are "security" systems. They should be on "secure" systems.

These are my simple steps to install from a working Ubuntu desktop. You may want to increase shared memory. Often I use a gig. Also, here is the script I put on all my desktops. You do not need all of this. It is just how I do it. On open servers (where ssh can be port scanned) I also use fail2ban.

Code: Select all

Link Apache
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf

Restart Apache
sudo apache2ctl restart

suid zmfix
sudo chmod 4755 /usr/bin/zmfix

Run zmfix
zmfix -a

Fix export problem
sudo chown www-data.www-data /usr/share/zoneminder/temp


edit /etc/sysctl.conf and add the following lines (for 128meg shared mem)

kernel.shmall = 134217728
kernel.shmmax = 134217728

Download cambozola.jar and put it in /usr/share/zoneminder
Enable in options->Images.

Set path to ffmpeg in options -> Images
/usr/bin/ffmpeg

test with xawtv (-nodga may be needed)
And a shell script I run on new installs of Ubuntu to give drivers, codecs, and other things all systems should have.

Code: Select all

#!/bin/sh
# Ubuntu Update Script (Feisty)
#
# This is a script to update a default install to 
# a fully functional system. Most things are automated,
# but a few things still need to be done by hand.
#
# NTP Config
# Set the clock to update automatically from
# us.pool.ntp.org
#
# Note: Sudo must be enabled for this to work.
# (Type 'sudo ls' and the password before running
# this script)
#

# Add extra repositories

# Medibuntu
wget -q http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key add -
sudo wget http://medibuntu.sos-sts.com/sources.list.d/feisty.list -O /etc/apt/sources.list.d/medibuntu.list

# Wine HQ
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list

# Refresh repositories
sudo apt-get update

# Install everything

sudo apt-get install ssh traceroute p7zip unace rar xfonts-intl-european flashplugin-nonfree sun-java5-plugin faad ffmpeg gstreamer0.10-ffmpeg gstreamer0.10-pitfdll gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse lame liba52-0.7.4 libartsc0 libdc1394-13 libdvdread3 libfaac0 libfaad2-0 libgsm1 libid3tag0 libimlib2 liblame0 libmad0 libmjpegtools0c2a libmms0 libmodplug0c2 libmp4v2-0 libmpcdec3 libmpeg2-4 liboggflac3 libquicktime0 libsidplay1 libswfdec0.3 libxine-extracodecs libxine-main1 libxvidcore4 libxvmc1 mjpegtools ntp ntp-simple sox vorbis-tools libdvdcss2 w32codecs msttcorefonts ogle-mmx ogle-gui streamtuner streamripper