Firebird

Firebird is an open source Relational Database Management System. Its code base was originally based upon Interbase 6, a proprietary product released by Borland.

Portage
The firebird package is available in Gentoo Portage under dev-db/firebird.

Classic versus Super-server
Firebird has two modes, "classic" and "super server". In "classic" mode, Firebird runs as a daemon and forks off a new process for each connection. However, in "super server" mode(which is default), Firebird will have all clients talk to a single process, which allocates one thread per connection. This allows for lower transaction overhead for a large number of connections, but means that a long-running query is sometimes able to hog the CPU time of the entire server.

If you wish to enable classic-server mode, you will need inetd to launch firebird. Before installing it, set the xinetd USE flag when emerging the package:

Configuration
By default, firebird will not provide the user any default location to create database files. As a result, it is up to the user to select a folder for storing databases. The simplest approach is to create a new location according to Gentoo convention, such as:

Starting Firebird
To start classic server installation, you have to run xinetd. Do not forget to edit /etc/xinet.d/firebird to enable the service and /etc/xinetd.conf to allow remote connections to the server.

Firebird Super Server is controlled by an init script:

Note that the init script may detect an error when there isn't one. It may report:

* Starting Firebird server ... check /var/log/firebird/firebird.log file for errors can not start server                                                  [ ok ]

And the log will show:

myserver (Client) Fri Nov 21 17:07:05 2008 INET/inet_error: connect errno = 111 myserver (Client) Fri Nov 21 17:07:05 2008 /usr/share/firebird/../../../usr/bin/fbguard: guardian starting ../../../usr/bin/fbserver

However, the database will function normally.

Creating Databases
This is usually done through the administration client, fbsql. It is also possible through GUI clients such as FlameRobin (which is currently masked in Portage).

The syntax can be found in the Firebird Quick Start Guide.

Security problems
If you have firebird installed, there is a security advisory. You should upgrade to version 2.0.3.12981.0-r6 or greater.