meta data for this page
Installation
Preliminary considerations
Firebird is available for the following platforms:
- Win32 (Windows 2003, XP, 2000, NT4, etc.)
- Linux (i386, AMD64)
- FreeBSD (Intel), HP/UX, Mac OS-X and Sun Solaris x86. These are not described in any further detail in this handbook.
Firebird is an extremely slim server, the full installation requires less than 20 MB hard drive space. Clients can also be installed on all supported operating systems. The clients are also slim and in their simplest form the DLL comprises but a few hundred kilobytes (fbclient.dll).
Terms and definitions
Server: The computer upon which the Firebird service is running.
Service: A Windows service or Linux demon.
Database: a file (or connected multiple files), that contain a related set of tables, indices, procedures, triggers etc.
Procedure
The procedure for installing the database server, database and clients roughly follows these steps:
- Verification or alteration of the services configuration (firebird.conf).
- Specification of users and if necessary, alteration of the SYSDBA password.
- Setting up the database.
Superserver, Classic server
The Firebird service can be installed as a “Superserver” or “Classic server”:
- Superserver: a new thread is started for each incoming client connection. It is quick and requires less system resources.
Recommended.
- Classic server: a new process is started for each incoming client connection. This can scale better on multi-processore machines.
Windows installation
Target directory
It is possible to install multiple Firebird services on a single system, although this will be seldom necessary for an operative installation.
We recommend abbreviating the directory path proposed by the install wizard and using the directory: C:\Program Files\Firebird:
Components
For productive environments we recommend installing the Superserver as this consumes less resources. The Server components and Developer and admin tools components should also be installed:
Additional tasks and functions
- Guardian: The Firebird Guardian can be installed along with the Firebird service. This is a monitoring utility that does nothing other than check whether the Firebird server is running or not, restarting it if necessary (Watchdog).
Recommendation: Use the Guardian.
- Run the Firebird Server as an application or service: Firebird should be run as a service on productive servers.
Recommendation: Run as a service.
- Start Firebird automatically every time you boot up Of course!
Recommendation: Yes.
- Copy Firebird client library to <system> directory: If this option is checked, the Firebird client DLL fbclient.dll is also copied in the Windows System directory, and can be found more easily by applications. This isn't necessary on pure database server machines. It can however be advantageous (although not essential) on servers that co-function as file servers or for administrative purposes.
Recommendation: don't check this option.
- Generate client library as GDS32.DLL for legacy app. support: Check this option, if you still want to run Borland InterBase™ applications, which will expect the presence of a GDS32.DLL.
Recommendation: don't check this option.
Following installation the Firebird service and, if selected, the Firebird Guardian service are immediately ready for use (Automatic start).
Services
The following services appear in the Windows Services panel:
- Firebird Guardian: DefaultInstance (if installed)
- Firebird Server: DefaultInstance
If the Guardian has been installed, it is sufficient just to start and end the Guardian. Otherwise the database services can be started manually or automatically in the usual Windows way.
Ports
Firebird listens by default to TCP Port 3050, the service is called gds_db. This can however lead to conflicts, if another Borland InterBase™ database is already running on the same machine. In this case, the port needs to be altered in the firebird.conf (found in the Firebird root directory) and, if necessary, an entry in the etc/services file. Apart from that, no further changes are necessary.
Example: changing the port to 3051:
Specify in firebird.conf:
RemoteServiceName = firebirdsql RemoteServicePort = 3051
Specify in the services file:
firebirdsql 3051/tcp # Firebird 1.5 Server
Databases
The database files need to be on the same local file system as the database service itself. Netwerk drives cannot be used (independent of whether these correspond via a UNC path or a drive letter).
Database administrator SYSDBA
When a service is first installed there is only one database user: the SYSDBA. This user has the password, masterkey.
To change the SYSDBA password, use the command-line GSEC tool, stored in the Firebird bin directory. Enter the following command (directly on the server wher the database service is running):
cd \Programme\Firebird\bin gsec -user sysdba -password masterkey -modify sysdba -pw <new password>
When the password for example should be defined as master, enter the following:
gsec -user sysdba -password masterkey -modify sysdba -pw master
Only the first eight characters of the password are significant. If the new password is longer, the following warning appears:
Warning - maximum 8 significant bytes of password used
See also:
Installing on Linux
Install the rpm package with a suitable package tool. It sets up the Firebird demon and the Firebird Guardian demon. The Guardian is a watchdog demon, checking if the Firebird demon itself is still running and restarts it if necessary.
rpm Package Manager
Firebird can be installed and deinstalled using the command-line Package Manager:
Installation
rpm -ivh <rpm-Datei>
for example:
rpm -ivh FirebirdSS-1.5.1.4481-0.i686.rpm
Deinstallation
Determine the exact package names with:
rpm -qa Fire*
Deinstall using:
rpm -e <Package-Name>
For example:
rpm -e FirebirdSS-1.5.1.4481-0
Database administrator SYSDBA
When service is newly installed there is just one user: the SYSDBA. This has a password allocated by the installation, which can be found in the SYSDBA.password file, found in the Firebird root directory (usually /opt/firebird). To change this automatically generated password, which is difficult to memorize and type, use the bin/changeDBAPassword.sh script.
Write permission
Important: the user account firebird requires write permission on all directories, in which databases are to be stored!
Firebird Manager fbmgr
The Firebird server process can be started and stopped using the Firebird Manager fbmgr. fbmgr can be found in the bin subdirectory. It can only be started by an administrator.
Starting up
The service process can be started using the –start option:
./fbmgr -start
A further option may be specified to determine whether the Guardian should also run or not:
–once Starts Firebird without the Guardian. –forever Starts Firebird with the Guardian. This is the default parameter.
./fbmgr -start -forever
Shutting down
Using the option –shut all transactions are rolled back (ROLLBACK), all client connections disconnected and the service process shut down. The SYSDBA password has to be specified:
./fbmgr -shut -password masterkey
See also:
Windows client installation
The client installation can install either a minimal client, that can be used to start Firebird applications, or a client together with the administration tools.
Start the same setup program that was used to install the services. Under Select components select the option Install client tools for developers and database administrators.
You should carry out this installation on all computers, where administrative tasks are to be done. Tools such as GBAK, GFIX, GSEC etc. are installed here.
There are some applications that have their own client, in this case a separate installation is not necessarily required.
See also: