Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Install Interbase + Linux (redHat 6.2)

74 views
Skip to first unread message

Daniel

unread,
Sep 20, 2001, 1:19:59 PM9/20/01
to
All,

Where I can find a How-to to install interbase to linux?

I took the file "InterBaseSS_LI-V6.0.1-1.i386.rpm" and executed the
commands:

$rpm -i InterBaseSS_LI-V6.0.1-1.i386.rpm
$cd /opt/interbase/bin
$./ibmgr -start -user SYSDBA -password masterkey

Return this message:
The InterBase license file is missing or corrupt.
Check that InterBase is installed correctly.
check $INTERBASE/interbase.log file for errors
can not start server

When I tried connect to database:
$SQL>connect /opt/interbase/examples/employee.dbg;

Return this message:

Statement failed, SQLCODE = -902

Unable to complete network request to host "localhost".
-Failed to establish a connection.
-Connection refused

What is wrong?
Does anyone have any solution? Please help!

Thanks for all

Daniel Patrick Pereira

Michael Jenner

unread,
Sep 22, 2001, 6:13:08 PM9/22/01
to
I recently installed the rpm binary of the Interbase on Redhat 7.1.
Below is listed the steps I went through. Comments on the installation
method are very welcomed. What I really didn't like was the need for
downgrading ncurses. Any solutions? - except having Borland recompile
the rpm package? IMHO it is really a problem that the newest RH
distribution, with Redhat probably being the most popular linux dist,
isn't really supported by the Interbase rpm ... hmmm ...

Regards,

Michael


Daniel wrote:

> All,
>
> Where I can find a How-to to install interbase to linux?
>
> I took the file "InterBaseSS_LI-V6.0.1-1.i386.rpm" and executed the
> commands:
>
> $rpm -i InterBaseSS_LI-V6.0.1-1.i386.rpm
> $cd /opt/interbase/bin
> $./ibmgr -start -user SYSDBA -password masterkey
>
> Return this message:
> The InterBase license file is missing or corrupt.
> Check that InterBase is installed correctly.
> check $INTERBASE/interbase.log file for errors
> can not start server

Seems you need a license file. Didn't you go for the open source
version?

> When I tried connect to database:
> $SQL>connect /opt/interbase/examples/employee.dbg;
>
> Return this message:
>
> Statement failed, SQLCODE = -902
>
> Unable to complete network request to host "localhost".
> -Failed to establish a connection.
> -Connection refused
>
> What is wrong?
> Does anyone have any solution? Please help!
>
> Thanks for all
>
> Daniel Patrick Pereira

**************************************
Interbase SS Installation history - (c) Michael Jenner, September 2001
**************************************

-----------------------------
1. Install binary
-----------------------------

rpm -i ../InterBaseSS_LI-V6.0-1.i386.rpm


-----------------------------
2. See where the RPM package went:
-----------------------------

rpm -ql InterBaseSS_LI | more

/opt/interbase is the answer.


-----------------------------
3. Install SysV start/stop script.
-----------------------------

Create file "/etc/init.d/interbase":

#!/bin/bash
#
# Interbase SysVinit script

case "$1" in
start)
/opt/interbase/bin/ibmgr -start -forever
echo "InterBase Server started!"
;;
stop)
/opt/interbase/bin/ibmgr -shut -password masterkey
echo "InterBase Server stopped!"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 { start | stop | restart }"
exit 1
esac
exit 0


And make sure that this file is only readable by
root - since the masterkey password is in it.

chmod go-rwx /etc/init.d/interbase


-----------------------------
4. Add /opt/interbase/bin to the PATH environment:
-----------------------------

Add the following line to /etc/profile (as root):

PATH="$PATH:/opt/interbase/bin"

Just before the following line appears:

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC


-----------------------------
5. Trust localhost access to the server:
-----------------------------

Create /etc/gds_hosts.equiv with the following contents:

localhost
<full dns name of host, or in other words the fqdn>

The file must be writable by root only!

chmod go-wx /etc/gds_hosts.equiv

Note: Compared to what others list, I had to add FQDN name to
/etc/gds_hosts.equiv Had to do this, or else I would see these errors:

[root@thor interbase]# /etc/init.d/interbase start


check $INTERBASE/interbase.log file for errors
can not start server

And the /opt/interbase/interbase.log file shows entries like:

thor.lan (Server) Sat Sep 22 00:53:52 2001
SERVER/process_packet: connection rejected for root

-----------------------------
6. Verify that gds_db is added to /etc/services
-----------------------------

This was done by the rpm script ... great!


-----------------------------
7. Downgrade the ncurses library
-----------------------------

Trying to start the "bugger":

[root@thor /root]# /etc/init.d/interbase start
/opt/interbase/bin/ibmgr.bin: error while loading shared libraries:
libncurses.so.4: cannot load shared object file: No such file or
directory InterBase Server started!

Ok ... again one of these shared library conflicts.

ldd /opt/interbase/bin/<replace-with-name-of-binary>

Shows that all binaries, except gsplit and ibserver, depend on the
libncurses.so.4 shared library, so I'd better install the library. I
downloaded ncurses version 4 from Redhat's site:

wget
ftp://ftp.redhat.com//pub/redhat/linux/6.1/en/os/i386/RedHat/RPMS/ncurs*

and tried to install them with:

rpm -i ../ncurses-4.2-25.i386.rpm > test.txt 2>&1

Outcome is then listed in the test.txt file - including error messages.

package ncurses-5.2-8 (which is newer than ncurses-4.2-25) is already
installed
file /usr/bin/clear from install of ncurses-4.2-25 conflicts with file
from package ncurses-5.2-8
file /usr/bin/infocmp from install of ncurses-4.2-25 conflicts with file
from package ncurses-5.2-8
file /usr/bin/tic from install of ncurses-4.2-25 conflicts with file
from package ncurses-5.2-8
file /usr/bin/toe from install of ncurses-4.2-25 conflicts with file
from package ncurses-5.2-8
file /usr/bin/tput from install of ncurses-4.2-25 conflicts with file
from package ncurses-5.2-8
file /usr/bin/tset from install of ncurses-4.2-25 conflicts with file
from package ncurses-5.2-8
file /usr/share/terminfo/6/6053 from install of ncurses-4.2-25 conflicts
with file from package ncurses-5.2-8
[cut - remainer of test.txt is all referred to file
/usr/share/terminfo/...]

Ok so it might be possible to force the install without breaking "too
much", so I went for a forced install:

rpm -i --force ../ncurses-4.2-25.i386.rpm > test.txt 2>&1

[root@thor interbase]# ldd /usr/lib/libncurses.so.4
libc.so.6 => /lib/i686/libc.so.6 (0x4004c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)

Which shows that I have the libraries required by this library. Phew!

-----------------------------
7.5 Start server
-----------------------------

/etc/init.d/interbase start

-----------------------------
8. Check if server is running
-----------------------------

Can use various commands:

a. Check that the process is running:

ps -ef | grep ibserver
root 1986 1985 0 00:58 ? 00:00:00
/opt/interbase/bin/ibserver
root 1987 1986 0 00:58 ? 00:00:00
/opt/interbase/bin/ibserver
root 1990 1987 0 00:58 ? 00:00:00
/opt/interbase/bin/ibserver
root 2054 1726 0 01:12 pts/0 00:00:00 grep ibserver

b. Check that the server is listening for connects:

netstat -a | grep gds_db

c. Use isql (interbase SQL client):

isql
SQL> CONNECT '/opt/interbase/examples/employee.gdb';
SQL> show tables;
SQL> quit;


-----------------------------
9. Correct the worst security issues
-----------------------------

The /opt/interbase directory was VERY open to anyone. That is not that
bad, but what was BAD was that the file isc4.gdb was rw by OTHERS!!!
... I'm paranoid so I ran the following commands (as root):

cd /opt/
chmod o-rwx -R interbase/*
chmod o+rw interbase/interbase.msg
chmod o+rx interbase/bin/
chmod o+rx interbase/bin/isql
chmod o+rx interbase/bin/g*


-----------------------------
10. Change the default SYSDBA password:
-----------------------------

Equally as important as item 9.

gsec
modify sysdba -pw <password>

Remember to change the /etc/init.d/interbase SysV script from
using the masterkey password into using the new one.


-----------------------------
10. Add users
-----------------------------

gsec -user sysdba -password secret
add <username> -pw secret -uid 500 -gid 500 -fname <Firstname> -mname
<Middlename>
-lname <Lastname>
display


-----------------------------
11. Reserve "space" for database files
-----------------------------

As root,

mkdir /opt/interbase/var

This is now chosen as commonplace for ALL Interbase databases.

-----------------------------
12. Adding databases
-----------------------------

It is NOT recommended to add a database as SYSDBA. Therefore, as a
newly created user you can add a database:

isql -user <username> -password secret
create database '<fqdn of localhost>:/opt/interbase/var/test.gdb'
password 'yourpassword'
page_size = 1024
default character set iso8859_1;

The ";" will make the database creation begin!

Now while still connected to this database run the following
SQL command:

alter database
add file '/opt/interbase/var/test2.gdb' starting at 1001;

This will create a secondary file. Remember to use a
proper value of "starting at" - see note below on that
issue before creating your database.

See the data on the database by running the isql command:

show database;

Database: /opt/interbase/var/test.gdb
Owner: <USERNAME>
File 1: "/opt/interbase/var/test2.gdb", length 0, start 1001
PAGE_SIZE 1024
Number of DB pages allocated = 232
Sweep interval = 20000
Default Character set: ISO8859_1

********************************************
Note: setting page_size and length secondary files etc ...
********************************************

Interbase supports file sizes up to 4GB. If more
than one file is specified the first is filled first,
then the next etc ... If only one is specified the
application will stop when that limit is reached.

The size parameter is an integer multiplied by page
size, i.e.:

Maximum file size = Length x Page size.

We could choose a 400MB maximum file size by setting:

Page size=1024, and length=4000

Linux only supports file sizes of 2GB. So we should
ensure that the maximum file size of at least the
primare file name is less than that limit - and with
a proper margin.

We could for instance use:

page size = 1024, and length 1000 000 which should give
1GB file size. Using this setup the "starting at" value
should be 1000001 which should fill up the primary file
with 1GB of data before the (first) secondary will be
in heavy use.

Note: Even though a length is specified this doesn't mean
that all the mentioned space is allocated from the beginning.
As an example I created a 1000x1024 database and in the beginning
only 229 pages was allocated (229x1024=234496bytes).

Andrew Cairns

unread,
Sep 27, 2001, 10:25:17 AM9/27/01
to
MIchael,
Following your method (although on Mandrake 7.2) I still get errors in the
log :

INET/inet_error: connect errno = 111

/opt/interbase/bin/ibguard: guardian starting bin/ibserver

SERVER/process_packet: connection rejected for root

...

Andy ideas ?
The server seems to be working partially e.g. I can access the employee.gdb
from Kymlix, although other things don't work e.g. isql

Regards,
Andrew

Jeff Overcash (TeamB)

unread,
Sep 27, 2001, 10:31:30 AM9/27/01
to
Please watch your over quoting. Thank you.

Andrew Cairns wrote:

--
Jeff Overcash (TeamB) | Talk about failure
(Please do not email | To fall is not to fail
me directly unless | Failure isn't about falling down
asked. Thank You) | Failure is staying down (Marillion)

Tom Gardner

unread,
Oct 3, 2001, 1:07:29 PM10/3/01
to
> INET/inet_error: connect errno = 111
>
> /opt/interbase/bin/ibguard: guardian starting bin/ibserver
>
> SERVER/process_packet: connection rejected for root

The error "INET/inet_error: connect errno = 111" is generated because after you
execute the the start command IBMGR instantaneously attempts to connect to the
security database isc4.gdb. This happens so quickly it's before the server is
ready to accept connections and it generates the error. IBMGR will try
repeatedly to connect to isc4.gdb and usually after a millisecond or two the
server will be ready to accept connections so usually the next entry in the log
will probably be, "/opt/interbase/bin/ibguard: guardian starting bin/ibserver"
indicating that the server has been successfully started.
-Tom

0 new messages