SOLUTION Re: [rt-devel] RT.pm with multiple instances and FastCGI
Dan Shearer
dan at shearer.org
Tue Nov 25 07:28:54 EST 2003
On Tue, Nov 25, 2003 at 06:01:51PM +1030, Dan Shearer wrote:
> I am trying to get NameVirtualHosts going with multiple instances of
> RT3.07. I took the advice in the archives of this list and am using
> FastCGI.
>
> I have created two of everything, leaving the default installation and
> adding another domain alongside:
Phil Homewood pointed out I need to ./configure to put each instance in
its own directory hierachy. I thought this was to be fixed from RT2
(shows how little I watch this list :-) and it is rather messy to say
the least. Then there is upgrading, keeping in tune with your OS's
package management etc etc. No thanks :-) I now have what seems so far
to be a better solution. Someone here will probably disillusion me!
The details that follow are specific to Debian. However the technique
could work in a very similar way for FreeBSD and other systems depending
how the packager has built his package.
Goal
----
Take the source for a given version of the RT3 Debian package and make
the minimum number of changes required to create an identical Debian
package that installs into a different directory hierachy.
Implementation
--------------
mkdir /usr/src/rt ; cd /usr/src/rt
apt-get source request-tracker3
cd request-tracker3-3.0.6
fakeroot dpkg-buildpackage
perl -e "s/request-tracker3/request-tracker3-testing/g;" -pi.bak \
$(find . -type f)
# this find command should really have some exceptions to it.
fakeroot dpkg-buildpackage
This should produce two files:
request-tracker3-testing_3.0.6-2_all.deb
request-tracker3_3.0.6-2_all.deb
Now you can install them both. The second deb will want to overwrite
some files of the first, but that won't matter because they are
identical.
dpkg -i request-tracker3_3.0.6-2_all.deb
dpkg -i --force-overwrite request-tracker3-testing_3.0.6-2_all.deb
Caveats
-------
1. If the .debs aren't completely identical (ie they come from
the same source deb) then you will probably destroy things. Plan
to upgrade all your instances at once.
2. Such a global find/replace simply shouldn't work. So far
it looks like it does, but I'm sure there will be something
broken. The reason it works so well is that the name
"request-tracker3" is specific to the Debian package.
Corollary
---------
Don't run multiple instances on one OS, RT is just not made for it. Far
better to run instances in their own little sandbox, for example inside
User Mode Linux.
--
Dan Shearer
dan at shearer.org
More information about the Rt-devel
mailing list