Install FireBird Database on Debian 12 | Debian 11

Firebird is a free, fully accessible SQL relational database management system based on Borland Software Corp’s (previously known as Inprise Corp) open source edition of InterBase. Firebird is written in C and C++ and works on a variety of hardware and software components, including Windows, Linux, and Mac OS X. Firebird supports application programs and triggers, as well as many ANSI SQL standard features. Its multi-generational design enables for simultaneous OLTP (Online Transaction Processing) and OLAP (Online Analytical Processing) activities.

In this post, I’ll cover the process of installing the Firebird database on Debian 12 | 11.

Features of FireBird Database

The following are the features of Firebird database:

  • The system context provides access to the session time zone: The SESSION TIMEZONE argument has been added to the SYSTEM namespace of the built-in function RDB$GET CONTEXT, which returns the current session’s time zone.
  • Replication plugins should be able to deny the current attachment: The replication plugin API has been enhanced to allow it to check attachments and produce an error if it refuses to replicate changes.
  • RSA SIGN and RSA VERIFY have been renamed: The functions RSA SIGN and RSA VERIFY, which were formerly known as RSA SIGN and RSA VERIFY, have been changed to RSA SIGN HASH and RSA VERIFY HASH, respectively.
  • Make RDB$GET TRANSACTION CN work the same in Super and Classic: The built-in function GET TRANSACTION CN has been corrected in all architectures to provide the same result (appropriate commit number) for the specified transaction number. In Classic Server, it may previously return NULL.
  • DSQL drop and DSQL unprepare commands are executed immediately: To release resource locks quicker, the DSQL drop and DSQL unprepare options of the dsql free statement() procedure have been replaced by an instantaneous execution.
  • In public headers, include time zone ID constants: The Firebird engine’s time zone IDs have been made accessible in the public API’s header files.
  • SUBSTRING is now more efficient for the UTF-8 character set: When called with UTF-8 input strings, the built-in function SUBSTRING has been modified to give better performance.

FireBird Database Installation Requirements

To install Firebird database on Debian 12 | 11, we require the following:

  1. Debian 12 | 11 server or desktop.
  2. Disk space of 4Mb, standard is 33Mb.

1: Install FireBird Database on Debian 12 | Debian 11

Log in as a user with sudo access to your Debian 12 | 11 system. Before you begin the installation, make sure your system is up to date:

sudo apt update -y && sudo apt upgrade -y

Now, run the following command to install Firebird database on Debian 12 | 11. For the installation prompt press “y” to continue with the installation.

$ sudo apt install firebird-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'firebird3.0-server' instead of 'firebird-server'
The following package was automatically installed and is no longer required:
  linux-image-6.1.0-25-amd64
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  firebird3.0-common firebird3.0-common-doc firebird3.0-server-core firebird3.0-utils libfbclient2 libib-util libtommath1
Suggested packages:
  firebird3.0-doc
The following NEW packages will be installed:
  firebird3.0-common firebird3.0-common-doc firebird3.0-server firebird3.0-server-core firebird3.0-utils libfbclient2 libib-util libtommath1
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,806 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Before installation is complete, you will be prompted to set the Firebird database password as show below:

Input your password and press “ENTER” to continue with the installation.

2: Configure FireBird Database on Debian 12 | 11

Firebird can store and retrieve SQLite-style databases from anywhere, but it can also limit where they may be accessed. Simply modify the configuration file firebird.conf in the /etc/firebird/3.0/ directory to make it available from anywhere or from a specified location.

$ sudo vim /etc/firebird/3.0/firebird.conf
# ----------------------------
 Database Paths/Directories
#
# DatabaseAccess may be None, Full or Restrict. If you choose Restrict,
# provide ';'-separated trees list, where database files are stored.
# Relative paths are treated relative to the root directory of Firebird.
# Default value 'Full' gives full access to all files on your site.
# To specify access to specific trees, enum all required paths 
# (for Windows this may be something like 'C:\DataBase;D:\Mirror',
# for unix - '/db;/mnt/mirrordb'). If you choose 'None', then only
# databases listed in databases.conf can be attached.
#
# Note: simple quotation marks shown above should *NOT* be used when
# specifying values and directory path names. Examples:
#
#Uncomment #DatabaseAccess = Full below by removing #
# DatabaseAccess = None
# DatabaseAccess = Restrict C:\DataBase
# DatabaseAccess = Restrict C:\DataBase;D:\Mirror
# DatabaseAccess = Restrict /db
# DatabaseAccess = Restrict /db;/mnt/mirrordb
DatabaseAccess = Full

Save changes and exit the file.

Now restart Firebird database and enable to start on machine boot:

sudo systemctl restart firebird3.0
sudo systemctl enable firebird3.0

Run the following command to check if Firebird database is active and running:

$ systemctl status firebird3.0
● firebird3.0.service - Firebird Database Server ( SuperServer )
     Loaded: loaded (/lib/systemd/system/firebird3.0.service; enabled; preset: enabled)
     Active: active (running) since Thu 2025-02-13 10:20:30 EAT; 21s ago
       Docs: https://firebirdsql.org/en/firebird-rdbms/
   Main PID: 4664 (fbguard)
      Tasks: 5 (limit: 7034)
     Memory: 7.3M
        CPU: 32ms
     CGroup: /system.slice/firebird3.0.service
             ├─4664 /usr/sbin/fbguard -daemon -forever
             └─4665 /usr/sbin/firebird

Feb 13 10:20:30 debian systemd[1]: Starting firebird3.0.service - Firebird Database Server ( SuperServer )...
Feb 13 10:20:30 debian systemd[1]: Started firebird3.0.service - Firebird Database Server ( SuperServer ).

3: Example Usage of FireBird Database

We are going to see basic usage of Firebird databse.

Create Database

Login to Firebird database using the following command:

sudo isql-fb

Use the following syntax to create database in Firebird database:

CREATE DATABASE ['database_path.fdb'] USER ['user'] PASSWORD ['password'];

Create a database “testdb” with user “testuser” and password “StrongPassword“.

CREATE DATABASE '/home/cloudspinx/Documents/testdb.fdb' USER 'testuser' PASSWORD 'StrongPassword';

Let’s check the database created above:

SQL> show database;
Database: /home/cloudspinx/Documents/testdb.fdb
        Owner: CLOUDSPINX                       
PAGE_SIZE 8192
Number of DB pages allocated = 196
Number of DB pages used = 176
Number of DB pages free = 20
Sweep interval = 20000
Forced Writes are ON
Transaction - oldest = 1
Transaction - oldest active = 2
Transaction - oldest snapshot = 2
Transaction - Next = 5
ODS = 12.0
Database not encrypted
Creation date: Feb 13, 2025 10:22:52
Default Character set: NONE

Connecting to the database created above:

SQL> CONNECT '/home/cloudspinx/Documents/testdb.fdb' USER 'cloudspinx' PASSWORD 'StrongPassword';
Commit current transaction (y/n)?y
Committing.
Database: '/home/cloudspinx/Documents/testdb.fdb', User: CLOUDSPINX
Create Table

Let’s now create the table “EMPLOYEES” in the database above:

CREATE TABLE EMPLOYEES (ID INT NOT NULL PRIMARY KEY, NAME VARCHAR(20));

Execute the command below to check the table created:

SQL> show tables;
       EMPLOYEES

Inserting values to Employees table:

INSERT INTO EMPLOYEES VALUES (1, 'Michael');

Retrieving data from the table;

SQL>  select * from EMPLOYEES;

          ID NAME                 
============ ==================== 
           1 Michael
Alter Table

We can alter EPLOYEES table by adding “AGE” column.

SQL> ALTER TABLE EMPLOYEES
  ADD AGE VARCHAR(5);
Drop Table

Use the following syntax to drop table in Firebird database;

Syntax;

DROP TABLE tablename;

Run the following command to drop the table “EMPLOYEES“.

DROP TABLE EMPLOYEES;
Exit Database

To exit Firebase Database we use the following command:

SQL> quit;

Conclusion

The method of installing the Firebird database on Debian 12 | 11 has been discussed in this post. This concludes this article; we hope you found it useful. Keep an eye out for more of the same in the future.

Cool guides in the site:

Your IT Journey Starts Here!

Ready to level up your IT skills? Our new eLearning platform is coming soon to help you master the latest technologies.

Be the first to know when we launch! Join our waitlist now.

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

One of the most effective control panels for web hosting that is used to host websites and administer web servers […]

Beekeeper Studio is an open-source completely free cross-platform SQL editor and database manager. It is available for Mac, Linux, and […]

OpenResty® is a full-featured web platform that uses our improved Nginx core to scale online applications and services. Its purpose […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.