Firebird Documentation IndexFirebird 1.5 Quick Start → Installing Firebird
Firebird Home Firebird Home Prev: Default disk locationsFirebird Documentation IndexUp: Firebird 1.5 Quick StartNext: Working with databases

Installing Firebird

Installing the Firebird server
Testing your installation
Other things you need
Performing a client-only install

Installing the Firebird server

Installation drives

Firebird server – and any databases you create or connect to – must reside on a hard drive that is physically connected to the host machine. You cannot locate components of the server, or any database, on a mapped drive, a filesystem share or a network filesystem.

Note

You can mount a read-only database on a CD-ROM drive but you cannot run Firebird server from one.

Installation script or program

Although it is possible to install Firebird by a filesystem copying method – such as “untarring” a snapshot build file or decompressing a structured WinZip .zip file – it is strongly recommended that you use the distributed release kit the first time you install Firebird. The Windows executable installation script, the Linux rpm (RPM Package Manager, originally RedHat Package Manager) program and the official .tar.gz for other Posix platforms perform some essential setup tasks. Provided you follow the instructions correctly, there should be nothing for you to do upon completion but log in and go!

Windows platforms

The Firebird installer lets you choose between Superserver and Classic Server installation. As said before, you should choose Superserver unless you know the differences and have reasons to prefer Classic.

If you install Firebird under Windows 95/98/ME, uncheck the option to install the Control Panel applet. It doesn't work on these platforms. We'll give you a link to a usable applet later on in this guide.

On server platforms – Windows NT, 2000 and XP – the Firebird service will be running when the installation completes. Next time you boot up your server machine, it will be started automatically.

The non-server Windows platforms – Windows 95, 98 and ME – do not support services. The installation will start Firebird server as an application, protected by another application known as the Guardian. If the server application should terminate abnormally for some reason, the Guardian will attempt to restart it.

Posix platforms

In all cases, read the release notes that pertain to the version of Firebird that you are going to install. There may be significant variations from release to release of any Posix operating system, especially the open source ones. Where possible, the build engineers for each Firebird version have attempted to document any known issues.

Tip

If you do not find a copy of the release notes in your kit, go back to the Downloads page of the Firebird website at http://www.firebirdsql.org and download a copy from there.

If you have a Linux distribution that supports rpm installs, consult the appropriate platform documentation for instructions about using RPM Package Manager. In most distributions you will have the choice of performing the install from a command shell or through a GUI interface.

For Linux distributions that cannot process rpm programs, and for the various UNIX flavors, use the .tar.gz kit. You will find detailed instructions in the release notes.

Shell scripts have been provided. In some cases, the release notes may instruct you to modify the scripts and make some manual adjustments.

Testing your installation

If everything works as designed, the Firebird server process will be running on your server upon completion of the installation. It will start up automatically whenever you restart your server.

At this point, it is assumed that you will use the recommended TCP/IP protocol for your Firebird client/server network.

Note

For information about using NetBEUI protocol in an all-Windows environment, refer to Chapter 6, Network Configuration in the Using Firebird manual.

Warning

IPX/SPX networks are not supported by Firebird.

Pinging the server

Usually, the first thing you will want to do once installation is complete is ping the server. This just gives you a reality check to ensure that your client machine is able to see the host machine in your network. For example, if your server's IP address in the domain that is visible to your client is 192.13.14.1, go to a command shell and type the command

ping 192.13.14.1

substituting this example IP address for the IP address that your server is broadcasting.

Warning

If you get a timeout message, study the Using Firebird manual – Chapter 6: Network Configuration, and Chapter 7: Troubleshooting Connections – for further instructions.

Note that if you are connecting to the server from a local client – that is, a client running on the same machine as the server – you can ping the virtual TCP/IP loopback server:

ping localhost –or– ping 127.0.0.1

Checking that the Firebird server is running

After installation, Firebird server should be running as a service on Windows NT, 2000 or XP or on Linux.

Windows NT4, 2000 and XP

Open Control Panel -> Services (NT) or Control Panel -> Administrative Tools -> Services (2000, XP).

This illustration shows the Services applet display on Windows 2000. The appearance may vary from one Windows server edition to another.

If the Guardian is running (as shown in the screenshot, over) it may have a different service name because of version changes.

Note

On Windows 2000 and XP, the Guardian is a convenience rather than a necessity, since these two operating systems have the facility to watch and restart services. It is recommended that you keep Guardian active for other platforms if a SYSDBA is not available to restart the server manually in the event that it is stopped for some reason.

Windows 9x or ME

On Windows 9x or ME Firebird server should be running as an application, monitored by the Guardian. The Guardian's icon should appear in the tray with a green graphic. If the icon is flashing or showing as a red graphic, it indicates that Guardian is either attempting to start the server or has failed.

If you used an installation kit that installed but did not automatically start the Guardian and the Firebird server, you can set it up as follows:

  1. Locate the executable file for the Guardian program (fbguard.exe) and create a shortcut for it in the Startup area of your machine's Start Menu.

  2. Open the Properties dialog of the shortcut and go to the field where the command line is.

  3. Edit the command line so it reads as follows:

    fbguard.exe -a (for Superserver)

    fbguard.exe -c (for Classic Server)

  4. Save and close the Properties dialog.

  5. Double-click on the shortcut to start the Guardian. The Guardian will proceed to start fbserver.exe or fb_inet_server.exe.

The Guardian should start up automatically next time you boot your Windows 9x or ME machine.

Alternatively, you can use a Control Panel applet to control the starting and stopping of the Firebird server.

Windows Control Panel applets

Since version 1.0.3, a control panel applet is included in the Firebird distribution. Whilst the applet is not essential, it does provide a convenient way to start and stop the server.

Unfortunately, the bundled applet only works on Windows NT, 2000 and XP. On Windows 9x and ME, if you want a handy applet like this, visit this webpage:

and download the Firebird Control Center fbcc-0.2.6.exe.

This applet looks different from the above screenshot, but offers the same functionality.

Posix servers

Use the top command in a command shell to inspect the running processes interactively. If a Firebird Superserver is running, you should see a process named fbguard. This is the Guardian process. Further, there will be one main and zero or more child processes named fbserver.

For Classic Server versions, the process name is fb_inet_server. There will be one instance of this process running for each network connection. Note that if there are no active connections, or if there are only direct local connections, you won't find fb_inet_server in the process list.

The following screen shows the output of top, restricted by grep to show only processes with names starting with the characters fb:

frodo:/inkomend/firebird # top -b -n1 | grep fb
 2587 firebird  24   0  1232 1232 1028 S  0.0  0.3   0:00.00 fbguard
 2588 firebird  15   0  4124 4120 2092 S  0.0  0.9   0:00.04 fbserver
 2589 firebird  15   0  4124 4120 2092 S  0.0  0.9   0:00.00 fbserver
 2604 firebird  15   0  4124 4120 2092 S  0.0  0.9   0:00.00 fbserver
 2605 firebird  15   0  4124 4120 2092 S  0.0  0.9   0:00.02 fbserver
 2606 firebird  15   0  4124 4120 2092 S  0.0  0.9   0:00.00 fbserver
 2607 firebird  15   0  4124 4120 2092 S  0.0  0.9   0:00.00 fbserver

As an alternative to top, you can use ps -ax or ps -aux and pipe the output to grep.

Other things you need

A network address for the server

  • If you are on a managed network, get the server's IP address from your system administrator.

  • If you have a simple network of two machines linked by a crossover cable, you can set up your server with any IP address you like except 127.0.0.1 (which is reserved for a local loopback server) and, of course, the IP address which you are using for your client machine. If you know the “native” IP addresses of your network cards, and they are different, you can simply use those.

  • If you are intending to try out a single-machine installation of both client and server, you should use the local loopback server address – localhost, with the IP address 127.0.0.1

Note

It is possible to connect directly to a local Windows Superserver, without using the TCP/IP loopback. This is not a TCP/IP connection and it is not a thread-safe way to connect to a local server. For using single instances of the command-line tools (gsec, gbak etc.) it works just fine. By contrast, direct database connections - even multiple - under a Linux Classic server are completely safe.

Default user name and password

The SYSDBA user has all privileges on the server. Depending on version, OS, and architecture, the installation program will either

  • install the SYSDBA user with the password masterkey (actually, masterke: characters after the eighth are ignored), or

  • ask you to enter a password during installation, or

  • generate a random SYSDBA password and store that in /opt/firebird/SYSDBA.password

If your server is exposed to the Internet at all and the password is masterkey, you should change it immediately using the gsec command-line utility.

How to change the SYSDBA password

Firebird comes with a command-line tool called gsec that is used to manipulate user accounts.

Important

With some Firebird installations, you can only run gsec if you are logged into the operating system as Superuser (root on Linux) or as the user the Firebird server process runs under. On Windows server platforms, you typically need to be in the Power User group or higher to run gsec successfully.

If you have enough privileges but invoking gsec results in a message like “unavailable database - unable to open database”:

  • you're either running Windows Classic Server and you didn't provide a correct -database argument (see below), or

  • the server may not be running at all. In that case, go back to Testing your installation and fix the problem.

Let's say you decide to change the SYSDBA password to icuryy4me.

  1. Go to a command shell on your server and change to the directory where the command-line utilities are located. Refer to the Firebird installation components table to find this location.

  2. Type the following command, except if you run Windows Classic Server:

    gsec -user sysdba -password masterkey

    In case of a Windows Classic Server, you must specify the full network location of the security database (unfortunately!):

    gsec -user sysdba -password masterkey -database "localhost:C:\Program Files\Firebird\Firebird_1_5\security.fdb" (adapt the path if necessary)

    Note

    • On Linux, type ./gsec rather than gsec. Otherwise there's a chance that a “wronggsec is launched, or that it isn't found at all.

    • Paths and file names are case-sensitive on all platforms except Windows; passwords are always case-sensitive.

    In either case, you should now see the shell prompt for the gsec utility:

    GSEC>

  3. Type this command:

    modify sysdba -pw icuryy4me

  4. Press Enter. The new password icuryy4me is now encrypted and saved and masterkey is no longer valid.

  5. Now quit the gsec shell:

    quit

Note

Because Firebird ignores all characters in a password past the eighth character, icuryy4m will work, as will icuryy4monkeys.

An Admin tool

The Firebird kit does not come with a GUI admin tool. It does have a set of command-line tools, executable programs which are located in the bin subdirectory of your Firebird installation.

The range of excellent GUI tools available for use with a Windows client machine is too numerous to describe here. A few GUI tools written in Borland Kylix, for use on Linux client machines, are also in various stages of completion.

Inspect the Downloads > Contributed > Admin Tools page at http://www.ibphoenix.com for all of the options.

Note

You can use a Windows client to access a Linux server and vice-versa.

Performing a client-only install

Each remote client machine needs to have the client library – libfbclient.so on Posix clients, fbclient.dll on Windows clients – that matches the release version of the Firebird server.

Firebird versions from 1.5 onward can install symlinks or copies named after the 1.0 libs (with the “old” InterBase names), to maintain compatibility with third-party products which need these files.

Some extra pieces are also needed for the client-only install.

Windows

At present, no compact installation program is available to assist with installing the client pieces on a Windows client. If you are in the common situation of running Windows clients to a Linux or other Posix Firebird server (or another Windows machine), you need to download the full Windows installation kit that corresponds to the version of Firebird server you install on your Linux or other server machine.

Fortunately, once you have the kit, the Windows client-only install is easy to do. Run the installation program, just as though you were going to install the server – but select the CLIENT ONLY option from the install menu.

Linux and some other Posix clients

A small-footprint client install program for Linux clients is not available either. Additionally, some Posix flavors – even within the Linux constellation – have somewhat idiosyncratic requirements for filesystem locations. For these reasons, not all *x distributions for Firebird even contain a client-only install option.

For most Linux flavors, the following procedure is suggested for a Firebird client-only install. Log in as root for this.

  1. Look for libfbclient.so.1.m.n (m.n being the minor plus patch version number) in /opt/firebird/lib on the server where Firebird server is installed. Copy it to /usr/lib on the client.

  2. Create chained symlinks using the following commands:

    ln -s /usr/lib/libfbclient.so.1.m.n /usr/lib/libfbclient.so.1

    ln -s /usr/lib/libfbclient.so.1 /usr/lib/libfbclient.so

    replacing 1.m.n with your version number, e.g. 1.5.0 or 1.6.1

    If you're running applications that expect the legacy libraries to be present, also create the following symlinks:

    ln -s /usr/lib/libfbclient.so /usr/lib/libgds.so.0

    ln -s /usr/lib/libfbclient.so /usr/lib/libgds.so

  3. Copy the firebird.msg file to /opt/firebird

  4. In the system-wide default shell profile, or using setenv() from a shell, create the FIREBIRD environment variable and point it to /opt/firebird, to enable the API routines to locate the messages.

Prev: Default disk locationsFirebird Documentation IndexUp: Firebird 1.5 Quick StartNext: Working with databases
Firebird Documentation IndexFirebird 1.5 Quick Start → Installing Firebird