|Firebird Docset → Firebird Database Docs → Firebird 2 Quick Start → Installing Firebird|
The instructions given below for the installation of Firebird on Windows and Linux should be sufficient for the vast majority of cases. However, if you experience problems or if you have special needs not covered here, be sure to read the INSTALLATION NOTES chapter in the Release Notes. This is especially important if you are upgrading from a previous version or if there are remnants of an old (and maybe long gone) InterBase or Firebird installation floating around your system (DLLs, Registry entries, environment variables...)
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.
You can mount a read-only database on a CD-ROM drive but you cannot run Firebird server from one.
Although it is possible to install Firebird by a filesystem
copying method – such as “untarring” a snapshot build or
decompressing a structured
archive – it is strongly recommended that you use the distributed
release kit (
.exe for Windows,
.rpm for Linux), especially if this is the first
time you install Firebird. The Windows installation executable, the
Linux rpm program and the
install.sh script in the official
.tar.gz for various Posix platforms all
perform some essential setup tasks. Provided you follow the
installation instructions correctly, there should be nothing for you
to do upon completion but log in and go!
The Firebird installer lets you choose between Superserver and Classic Server installation. Both are fully mature and stable and there is no reason to categorically prefer one to the other. Of course you may have your own specific considerations.
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. You'll find a link to a usable applet further down. (Note: the option to install the applet is only available for Superserver.)
On Windows server platforms – NT, 2000, 2003 and XP – Firebird will run as a system service by default, but during the installation you can also choose to let it run as an application. Non-server Windows systems – 95, 98 and ME – don't support services; running as an application is the only option there.
The Firebird Guardian is a utility that monitors the server process and tries to restart it if it terminates abnormally. The Guardian does not work with Firebird Classic Server on Windows if run as an application. This is due to a known bug, which will be fixed later. Currently the Firebird 2 installer doesn't give you the option to include the Guardian at all with a Classic Server, even if you install it as a service.
The Guardian works correctly with Superserver, whether run as an application or as a service.
If you run Firebird as a service on Windows 2000, 2003 or XP, the Guardian is a convenience rather than a necessity, since these operating systems have the facility to watch and restart services. It is recommended that you keep the Guardian option on (if possible) in all other situations.
In all cases, read the Release Notes that came with your Firebird package (chapter Installation Notes, section Posix Platforms). 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.
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 Unix flavours for
.rpm kit is provided,
.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 edit the scripts and make some manual adjustments.
Firebird 2 allows the operation of multiple servers on a single machine. It can also run concurrently with Firebird 1.x or InterBase servers. Setting this up is not a beginner's task though. If you need to run multiple servers, consult the Installation Notes chapter of the Release Notes, and have the Firebird 1.5 Release Notes handy too – you will be directed to them at a certain point during your reading of the Installation Notes.
If everything works as designed, the Firebird server process will be running on your server machine upon completion of the installation. It will also start up automatically whenever you restart your computer.
Before testing the Firebird server itself, it is advisable to verify if the server machine is reachable from the client at all. At this point, it is assumed that you will use the recommended TCP/IP network protocol for your Firebird client/server connections.
If you have installed a Classic Server on Linux/Unix or any Firebird server on Windows, it is possible to connect directly to the local server, without using a network layer. If you intend to use Firebird for this type of connection only, you can skip the “Pinging the server” section below.
For information about using the NetBEUI protocol in an all-Windows environment, refer to the Network Configuration chapter in the Using Firebird manual sold by IBPhoenix, or consult the InterBase 6 Operations Guide (http://www.ibphoenix.com/downloads/60OpGuide.zip).
Firebird does not support IPX/SPX networks.
The ping command – available on most systems
– is a quick and easy way to see if you can connect to a server
machine via the network. For example, if your server's IP address in
the domain that is visible to your client is
18.104.22.168, go to a command shell on
the client machine and type the command
substituting this example IP address with the IP address that your server is broadcasting. If you are on a managed network and you don't know the server's IP address, ask your system administrator. Of course you can also ping the server by its name, if you know it:
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
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.
Once you have verified that the server machine is reachable from the client, you can go on to the next step.
After installation, Firebird server should be running:
As a service.
As a service or as an application. Service is default and highly recommended.
As an application.
The following sections show you how to test the server in each of these situations.
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
The following screen shows the output of
top, restricted by
grep to show only lines containing the
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.
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.
fb_lock_mgr should be
present though as soon as any kind of Classic connection has been
Other ways to test a Firebird server immediately after installation include connecting to a database, creating a database, and launching the gsec utility. All these operations are described later on in this guide.
Open Control Panel -> Services (NT) or Control Panel -> Administrative Tools -> Services (2000, XP).
You should at least find the Firebird server in the services listing. The Guardian may or may not be running, depending on the choices you made during installation.
If Firebird is up and running as an application, it is represented by an icon in the system tray:
A green and grey server symbol if controlled by the Guardian;
A round yellow and black graphic if running standalone.
A flashing icon indicates that the server is in the process of starting up (or at least trying to do so). A red icon, or an icon with an overlying red stop sign, indicates that startup has failed.
One way to make 100% sure if the server is running or not is
to press Ctrl-Alt-Del and look for the
fb_inet_server process (and possibly
fbguard) in the task
On some occasions, you may need to start the Guardian or server once explicitly via the Start menu even if you opted for “Start Firebird now” at the end of the installation process. Sometimes a reboot is necessary.
If you're desperately trying to start Firebird and nothing seems to work, ask yourself if you've installed Firebird 2 Classic server with the Guardian option enabled (the installation program doesn't offer this possibility anymore, but there are other ways). As said before, the combination Classic + Guardian currently doesn't work if Firebird runs as an application. Uninstall Firebird if necessary and reinstall Classic without Guardian, or Superserver with or without Guardian.
You can shut the server down via the menu that appears if you right-click on the tray icon. Notice that this also makes the icon disappear; you can restart Firebird via the Start menu.
Windows Classic Server launches a new process for every
connection, so the number of
fb_inet_server processes will always
equal the number of client connections plus one. Shutdown via the
tray icon menu only terminates the first process (the
listener). Other processes, if present,
will continue to function normally, each terminating when the
client disconnects from the database. Of course, once the listener
has been shut down, new connections can't be made.
In the case of Superserver you can also use a Control Panel applet to check and alter the Firebird server status. Some available applets will be presented a little later in this guide.
Each remote client machine needs to have the client library –
libfbclient.so on Posix
Windows clients – that matches the release version of the Firebird
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.
At present, no separate installation program is available to install only the client pieces on a Windows machine. If you are in the common situation of running Windows clients to a Linux or other Unix-like 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 server machine.
Fortunately, once you have the kit, the Windows client-only install is easy to do. Start up the installation program just as though you were going to install the server, but select one of the client-only options from the installation menu.
A small-footprint client install program for Linux clients is not available either. Additionally, some Posix flavours – 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 flavours, the following procedure is suggested
for a Firebird client-only install. Log in as
root for this.
m.n being the minor plus patch version
/opt/firebird/lib on the machine
where the Firebird server is installed. Copy it to
/usr/lib on the client.
Create chained symlinks using the following commands:
ln -s /usr/lib/libfbclient.so.2.
ln -s /usr/lib/libfbclient.so.2 /usr/lib/libfbclient.so
version number, e.g.
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
firebird.msg to the client
machine, preferably into the
/opt/firebird directory. If you place
it somewhere else, create a system-wide permanent
FIREBIRD environment variable pointing to the right
directory, so that the API routines can locate the
Optionally copy some of the Firebird command-line tools –
e.g. isql – to the client machine.
Note: always copy the tools from a
Superserver kit, regardless of the architecture of the server(s)
you're planning to connect to. Tools from Classic distributions
terminate immediately if they can't find the
libfbembed library (which is
useless for network connections) upon program start.
Instead of copying the files from a server, you can also pull
them out of a Firebird
kit. Everything you need is located in the
/opt/firebird tree within the
buildroot.tar.gz archive that's packed inside the
|Firebird Docset → Firebird Database Docs → Firebird 2 Quick Start → Installing Firebird|