Installing Clients - Firebird

Installing remote clients is an essential part of deploying your database applications in a client/ server network. If you are new to Firebird and client/ server networking, it is recommended that you bypass this section until you have had a chance to experiment with clients running locally on the same machine as the server.

Each remote client machine needs to have the client library that matches the release version of the Firebird server. In general, it will be safe to use a client library from a different build of a release, as long as the version numbers match. However, when upgrading the server, do read any README documents that come with a point release, to determine whether any “gotchas” exist regarding lower client versions.

Search carefully in the system path of any client workstation on which you want to deploy a Firebird client, to find and, if necessary, disable existing client installations for InterBase or Firebird.

  • In Firebird 1.0.x, the client libraries share names and default locations with their InterBase counterparts. Although it is possible to set up applications to use a renamed client library, it is strongly recommended to avoid housing Firebird 1.0.x and InterBase applications on the same workstation unless you are confident that your applications are positioned to find and load the right library.
  • Firebird 1.5 and later versions on Windows can coexist with InterBase or Firebird 1.0.x on both the server and client. In Firebird 1.5, it is still a matter of setting things up manually, although with less trouble than 1.0. x. In versions later than 1.5, multiple servers and versions can be installed automatically on Windows.

Installing a Linux/UNIX Client

POSIX operating system layouts are famously idiosyncratic. The suggestions presented in this section should be helpful as a guide to installing clients on many common Linux and UNIX flavors, but this is an area where uncertainty is the only certainty!

Log into the client machine as root and look for the client library in the server installation.

  • For Firebird 1.0.x, its name is libgds.so.0 and its default location is /usr/lib.
  • For Firebird 1.5, the binary for remote clients is libfbclient.so.1.5.0, installed by default in /opt /firebird /lib.

Copy the library to /usr/lib on the client and create symbolic links for it, using the following commands:

  • For v.1.0.x:
    ln -s /usr/lib/libgds.so.0 /usr/lib/libgds.so
  • For v.1.5 (two linkings):
    ln –s /usr/lib/libfbclient.so.1.5 /usr/lib/libfbclient.so.0
    ln –s /usr/lib/libfbclient.so.0 /usr/lib/libfbclient.so

    Create a directory /opt/firebird (/opt/interbase for v.1.0.x) on the client for the message file and copy the file from the firebird root on server to the client:

  • For v.1.0.x, copy interbase.msg to /opt/interbase/.
  • For v.1.5 and higher, copy firebird.msg to /opt/firebird/.

    In a systemwide default shell profile, or using setenv() from a shell, create the environment variable that will enable the API routines to find the messages:

  • For v.1.0.x, create the variable INTERBASE and point it to /opt/interbase/.
  • For v.1.5 and higher, create the variable FIREBIRD and point it to /opt/firebird/.

Installing a Windows Client

Firebird 1.0.x

On Windows, the InterBase client library was always installed by default in the system directory. By default, it is C:WINNTsystem32 on Windows NT 4 and 2000, C:Windowssystem32 on Windows XP and Server 2003, and C:Windows or C: Windows system on Windows 9 x and ME. Firebird 1.0.x followed suit as a temporary measure, retaining the old names and locations. The library is gds32.dll.

Using the Firebird Installer

The simplest way to install a Firebird 1.0.x client is to copy the Firebird installer to a CD-ROM or flash drive and run it on the client machine, selecting a client-only install option when prompted by the installer dialog box. You can choose whether to install the client with or without the command-line tools. Most clients will not need the tools and it is not recommended to install them on client workstations that do not need admin access to the server.

The installer will create the default root directory in C:Program FilesFirebird, which you can vary when it prompts for a location. Here, it will write the message file, interbase.msg, and, if you selected to install the tools, it will create a in directory beneath the root and install the tools there.

It writes gds32.dll to the system directory and, if the Microsoft C runtime library is old or absent, it will write msvcrt.dll there also.

Finally, it runs a program named instreg.exe to install the Registry key. If you chose the default installation directory, the key is HKLM Software Borland InterBase. If any running DLLs were overwritten during the installation, you will be prompted to reboot the machine.

Installing a Client Manually

Installing a client manually requires all of the preceding steps. You will need to copy the files gds32.dll, interbase.msg, and instreg.exe to a diskette or flash drive. Also copy msvcrt.dll from the system directory if you have clients where it is not installed. On these non-service-capable platforms, the location seems to vary. If a previous Firebird or InterBase client has been installed, you should check both.

Once you have created your Firebird root directory, copy interbase.msg there. Next, run instreg.exe from the diskette, in a command window:

A:> instreg.exe 'C:Program FilesFirebird'

If you placed your Firebird root directory somewhere different, use that path as the root directory argument.

Copy gds32.dll and, if needed, msvcrt.dll to the system directory.

Firebird 1.5 and Higher

In Firebird versions from 1.5 onward, client installations come with a number of options aimed at avoiding “DLL hell” in the Windows system directory. Until existing third-party tools, drivers, and component sets catch up with the changes, Firebird 1.5 on Windows creates its own special brand of DLL hell. The default client install, using the installer, will almost certainly be incompatible with software built using Borland RAD products such as Delphi or C++Builder.

Read through this section carefully before you start, to work out what you need for the particular client environment for which you are doing the installation. You can go back later and adapt the installation manually.

Using the Firebird Installer

Although there are other options, the recommended way to install a client is to use the Firebird 1.5 installer program.

If you use the installer, the first choice you need to make is where to locate the root of the client installation (see Figure). It is recommended that you take the default (C: Program Files FirebirdFirebird_1_5), since it will simplify future upgrades. However, you can specify a custom location if necessary.

Although you are not going to install the server, allowing the installer to install to a root location will ensure that optional pieces, including the Registry key, that are needed by some software products are available on the client machine. If you are installing the command-line tools, a properly installed root location is essential. Later, you can customize the setup manually, if necessary.

Choosing a location for the installation root

Choosing a location for the installation root

The next decision is to choose your install option. You can choose whether to install the client with or without the command-line tools, as shown in Figure.

Selecting a client-only install

Selecting a client-only install

Most clients will not need the tools and it is not recommended to install them on client workstations that do not need admin access to the server. For a minimal installation, select the option “Minimum client install - no server, no tools” and click Next.

The selection you make on the next dialog box (see Figure) is especially important if you are using third-party software on the client.

Selecting client “version” and location

Selecting client “version” and location

Previously, installers would install the old client library, gds32.dll, in the system directory, along with the C language runtime, msvcrt.dll, if it was not present.

For version 1.5, by default the installer installs all DLLs—the new client, fbclient.dll, and (if required) the C runtime and the C++ runtime, msvcp60.dll—into the /bin directory beneath the Firebird root.

  • (A) Relocation of the client library: If you need compatibility with software that expects to find the client library in the system directory, check this box. The library will be copied to the system directory as fbclient.dll.
  • (B) Name of the client library: If your software or components need the client library to be named gds32.dll, check this box. The installer will generate a special copy of fbclient.dll named gds32.dll and set an internal version string that is compatible with the Borland proprietary InterBase drivers and components. The location of this file depends on the state of the first check box (A).

Click Next to complete the installation.

Installing a Client Manually

Installing a client manually requires all of the steps that would be performed by the installer. You will need to copy the following files from your server installation to a diskette or flash drive:

  • %system%gds32.dll (C:WINNTsystem32 or C:Windows)
  • firebird.msg
  • binfbclient.dll
  • binmsvcrt.dll (if needed)
  • binmsvcp60.dll (if needed)
  • bininstreg.exe
  • bininstclient.exe
  • binfbclient.local
  • binmsvcrt.local
  • binmsvcp60.local

On the client, follow these steps:

  1. Create a Firebird root directory and copy firebird.msg there.
  2. Beneath the new directory, create a directory named bin.
  3. Copy the files from the bin directory on the diskette to this new bin directory.
  4. Run instreg.exe from the new in directory, in a command window. It is essential that you run this program from the in directory of the Firebird root, where instreg.exe is located. For example, if your Firebird root directory is C:Firebird_Client:
    C:Firebird_Clientin> instreg.exe
  5. If you have an application that needs a client library named gds32.dll, you will need to run the program instclient.exe. Instructions are in the next section.

Running instclient.exe

The program instclient.exe can be run when you need a client version that can be accessed and used by existing software, drivers, or components that expect the client to be named gds32.dll and/or to be located in the Windows system path. It is a command-line program, located in the in directory beneath the Firebird root of your server installation. If necessary, copy this file to the equivalent location on the client machine.

Installing the Client in the System Directory

Open a command window and cd to the rootin location. The syntax for installing the client is

instclient.exe {i[nstall]} [-f[orce]] {fbclient | gds32}

The parameters i (or install ) and either fbclient or gds32 are required.

If the program finds there is already a file in the system directory with the name of the file you are trying to install (fbclient.dll or gds32.dll), it will not proceed. To have the program write the file even if it finds a pre-existing copy, use the –f (or – force) switch.

Your operating system may require you to reboot the machine to complete the installation.

Querying the Installed Client

The instclient.exe program can be used for querying about Firebird 1.5 clients running on the machine. The syntax for querying about the client is

instclient.exe {q[uery] fbclient | gds32}

Figure shows the information that is returned.

Querying with instclient.exe

Querying with instclient.exe

Using instclient.exe to Uninstall a v.1.5 Client

To remove a Firebird 1.5 client that is installed in the system directory, use the following syntax:

instclient.exe {r[emove] fbclient | gds32}

Summary of Client Library Names and Locations

Table presents a summary of client library names and default locations of Firebird clients.

Names and Default Locations of Firebird Clients

Names and Default Locations of Firebird Clients

Names and Default Locations of Firebird Clients

Names and Default Locations of Firebird Clients


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Firebird Topics