Page 1 of 1

installing ZM 1.24.x and a fork on same machine ?

Posted: Wed Jan 26, 2011 4:44 pm
by bdmcnxn
Hi,

Wondering if some of the ZM developers on list could comment on whether it is possible to run the stock ZM 1.24.x, and a fork of same, simultaneously on the same machine s.t., I could access those like this --

http://localhost/zm (stock)
http://localhost/zmfork (fork) or
http://localhost:9090/zm (alternative way for fork)

And what all I might need to change ? For the first option of fork (i.e. URL being ../zmfork), wondering if running the "./configure" script changing all occurances of "zm" to "zmfork" (s.a. for database name, database credentials etc.) would do the trick ? Note that fork may also have different binaries (zmc etc.), and "make install" may overwrite the stock ones. Any way to avoid that ?

The reason for trying to something this dirty is to see if I can do a near seamless version migration, and also because I don't have another machine at the moment.

thanks,
bdm

Re: installing ZM 1.24.x and a fork on same machine ?

Posted: Wed Jan 26, 2011 8:35 pm
by jdhar
bdmcnxn wrote: The reason for trying to something this dirty is to see if I can do a near seamless version migration, and also because I don't have another machine at the moment.
If your reason is just to migrate versions, there are easier ways to do it. I constantly migrate between 1.24.1, .2 and .3. I keep all of their source in separate directories, and when I want to switch versions, I just run a simple script that runs configure and installs the appropriate one. Since running zmupdate preserves database integrity, there's no issue in doing this:

Code: Select all

#!/bin/bash
echo "Enter old version..."
read OLDVER
echo "Enter new version..."
read NEWVER
echo "Using old version $OLDVER, new version $NEWVER"
OLDDIR=$(pwd)/ZoneMinder-$OLDVER
NEWDIR=$(pwd)/ZoneMinder-$NEWVER

echo "Old directory: $OLDDIR, New Directory: $NEWDIR"
echo "Stopping ZM"
sudo /etc/init.d/zoneminder stop

echo "Making $NEWVER"
cd $NEWDIR
sudo make install

echo "Updating DB"
sudo zmupdate.pl --version=$OLDVER

echo "Starting ZoneMinder"
sudo /etc/init.d/zoneminder start
This is of course if your purpose is to just migrate versions a lot. If it's to actually run simultaneously, you would have to do what you described, and also change the install paths, but some binaries are referenced w/o an absolute path, so I don't see any easy way to do that.[/code]

Posted: Thu Feb 10, 2011 7:11 am
by bdmcnxn
Thanks jdhar. Finally I decided to put each ZM version on a different VM image, however for sequential testing, your script would be quite useful.