Subject RE: [firebird-support] Installation Mutli-instance of Firebird 1.5 et 2.0 on Mac OS X
Author Carrell Alex

I presume, you will have the same set up as a linux version, unix and bsd being similar. Not having much knowledge of Mac.

If I remember Anderson Farias /Mark o'Donohue detailed neatly how you do that, and posted it to this list.

The installs currently set the library environment path to only the last version installed, over writing prior libraires during the install.

So the key is you install manually by unzipping-untarring the tar balls, and then manually copy the files into the correct directories, ommitting those that go into the environment search path of the OS. Then you point the xinetd(whatever service tool) to point to shell scripts in the firebird bin directory(or any place that is sensible). Since the shell scripts fire up in there own enviroment, you can change it. So the scripts start up the firebird server but, with the correct environment paths (for the libraries and binaries) exported before hand(see end of email for example).

If you understand me that is.
Works - I have had three versions running, I have 1.5x and a 2.0.x running live all the time.

searching my records here was the last mail I found on the matetr Anderson Farias /Mark o'Donohue-
but I am sure Anderson Farias or someone posted a more definitive version.

Hi Mark,

It works for me, but here what I did:

(I have firebird 1.5 CS on /opt/fb15 and firebird 2.1 CS on /opt/firebird)

1) created sym links for /opt/fb15/lib/ and
/opt/fb15/lib/ on /usr/lib (somehow those where deleted when I installed fb2.1)

OBS:: sym links for,,, and are all pointing to /opt/firebird/lib (fb 2.1)

2) I created scripts on /usr/local/sbin to access FB15/bin tools (isql, gbak, etc), eg:


export FIREBIRD=/opt/fb15
/opt/fb15/bin/isql $@

than to access FB 2.1 i do:

/opt/firebird/bin/isql localhost/3051:employee -u sysdba -p sysdba_2.1_pass

and to access FB 1.5 i do:

/usr/local/sbin/isql1 localhost:employee.fdb -u sysdba -p sysdba_1.5_pass

that works fine. so I used your same solution to fb_inet_server to run fb
1.5 tools. If that still don't work for you, let me know.

Anderson Farias

----- Original Message -----
From: "Mark O'Donohue" <mark.odonohue@...>
To: <>
Sent: Monday, December 15, 2008 10:23 AM
Subject: Re: [firebird-support] Multiple server installs on linux

> Hi Anderson,
> You are so close don't give up too quickly :-).
> To run two services,you have to have:
> /etc/services
> # Local services
> gds_db 3050/tcp # Firebird SQL Database Remote Protocol
> gds_db2 3051/tcp # Firebird SQL Database Remote Protocol
> for your second /etc/xinetd.d/oldfirebird script:
> service gds_db2
> {
> ...
> server = /opt/fb15/bin/
> ...
> }
> Then create the /opt/fb15/bin/ script as:
> #!/bin/bash
> export FIREBIRD=/opt/fb15
> /opt/fb15/binfb_inet_server
> $chmod ug+x
> is a now a shell script that sets the environment
> variables then runs the server.
> I had done this, originally to set LD_LIBRARY_PATH, (and FIREBIRD)
> variables but then found that with the old /usr/lib/
> pointing to an invalid path they were picked up first.
> But congratulations, it seems you have solved your problem :-).
> Cheers - Mark
> BTW: It still doesnt work for me, but I suspect given what you have it
> will work for you. Here is my problem: (and was going to be my next
> suggestion for you to try) :
> from the cmd line in another window do:
> export FIREBIRD=/opt/fb15
> cd /opt/fb15/bin
> strace ./fb_inet_server -d
> The above gives a one shot run of the server, and lists all the system
> calls.
> then run the client in another window,
> /opt/firebird/bin/isql localhost:/opt/firebird/examples/employee.fdb -u
> sysdba -d masterkey
> Somehow on my Ubuntu 7.10 system although it listens on both ports, the
> base CS1.5.5. still doesnt work, even in the correct directory, it
> somehow seems to muck up the database names appending a '_m' to the
> databse name for the database and the security database.
> Here is the strace where it resolves the database:
> rt_sigaction(SIGFPE, {0xb7de2d50, [], SA_RESTART}, {SIG_DFL}, 8) = 0
> readlink("/opt", 0xbf82a190, 4096) = -1 EINVAL (Invalid argument)
> readlink("/opt/firebird", 0xbf82a190, 4096) = -1 EINVAL (Invalid argument)
> readlink("/opt/firebird/examples", 0xbf82a190, 4096) = -1 EINVAL
> (Invalid argument)
> readlink("/opt/firebird/examples/employee.fdb", 0xbf82a190, 4096) = -1
> EINVAL (Invalid argument)
> access("/opt/firebird/examples/employee.fdb_m", F_OK) = -1 ENOENT (No
> such file or directory)
> But it's ok, I am focused on fb2.5 ish anyway :-)
> On 15/12/08 23:53, Anderson Farias wrote:
>> Hi Dimitry,
>>> Yes. That's exactly what I meant.
>> Ok, I've tryed changing firebird xinetd script like:
>> server = chroot /opt/fb15 /opt/fb15/bin/fb_inet_server
>> but it does not work! xinetd complains server must be a service. so this
>> aproach won't work for CS. I'll give it I try with SS later and post back
>> results (althought the target box is a 4-core machine and I'm used to
>> work
>> with CS)
>> Many thanks for your tip.
>> regards,
>> Anderson Farias


By the way I would not bother chroot,

my xinetd for firebird this:
cat /etc/xinetd.d/firebird1_5

service gds_db
socket_type = stream
wait = no
user = firebird
server = /opt/firebird1_5/bin/
flags = REUSE

the shell script xinetd is:

cat /opt/firebird1_5/bin/

export FIREBIRD=/opt/firebird1_5
export LD_LIBRARY_PATH=/opt/firebird1_5/lib:$LD_LIBRARY_PATH

<< similar for 2.x, but different /etc/services entry gds_db2 on port 35550 and command line in the sheel script telling the server to use that port via command switch



This message and any attachments (the message) are intended solely for the addressees and are
confidential. If you receive this message in error, please delete it and immediately notify
the sender. Any use not in accordance with its purpose, any dissemination, copying or disclosure,
either whole or partial is prohibited without prior formal approval. The internet cannot
guarantee the integrity of the message. The companies of Bobst Group do not accept any liability
for data corruption, delay, interception or any modification in relation with this message.