Subject Re: [firebird-support] Multiple server installs on linux
Author Anderson Farias
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/libfbclient.so.1 and
/opt/fb15/lib/libfbclient.so.1.5.5 on /usr/lib (somehow those where deleted
when I installed fb2.1)

OBS:: sym links for libfbclient.so, libfbembed.so, libib_util.so, libgds.so
and libgds.so.0 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:

/usr/local/sbin/isql1

#!/bin/bash
#
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.


Regards,
Anderson Farias





----- Original Message -----
From: "Mark O'Donohue" <mark.odonohue@...>
To: <firebird-support@yahoogroups.com>
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/run_server.sh
> ...
> }
>
>
> Then create the /opt/fb15/bin/run_server.sh script as:
>
> #!/bin/bash
> export FIREBIRD=/opt/fb15
> /opt/fb15/binfb_inet_server
>
>
> $chmod ug+x run_server.sh
>
> run_server.sh 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/libfbembed.so.1...
> 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
>>
>>
>>
>> ------------------------------------
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>> Visit http://www.firebirdsql.org and click the Resources item
>> on the main (top) menu. Try Knowledgebase and FAQ links !
>>
>> Also search the knowledgebases at http://www.ibphoenix.com
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> Yahoo! Groups Links
>>
>>
>>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>