| Firebird Documentation Index → Setting up Firebird on Ubuntu Linux |
![]() |
Table of Contents
This article describes the process of installing and running Firebird on Ubuntu Linux. Like the Debian GNU/Linux distribution it is based on, installing software with Ubuntu (or Kubuntu) is very straightforward and Firebird is no exception. This guide is based on Ubuntu 9.04 “Jaunty Jackalope”.
The version of Firebird packaged with Ubuntu “Jaunty Jackalope” is 2.1.1 but there is an repository with ppa final stable 2.1.2, Also in Ubuntu Karmic v2.1.2 is included by default
With administrator privileges on the target machine, issue the following command:
# apt-get install firebird2.1-super
Apt's dependency tracking will automatically propose all the packages required for a complete installation with the following output:
The following extra packages will be installed: firebird2.1-common firebird2.1-server-common libedit2 libfbclient2 libicu38 Suggested packages: firebird2.1-doc The following NEW packages will be installed: firebird2.1-common firebird2.1-server-common firebird2.1-super libedit2 libfbclient2 libicu38 0 upgraded, 6 newly installed, 0 to remove and 1 not upgraded. Need to get 11.7MB of archives. After unpacking 28.4MB of additional disk space will be used. Do you want to continue [Y/n]? y
The packages will then download and install on the target machine, a
new user “firebird”
will be created to run the server, and the server will be started
immediately:
Setting up firebird2-super-server (1.5.3.4870-10) ... Created default security.fdb Starting Firebird server: server has been successfully started
You will then be asked to enter a new password for the SYSDBA user, spelling mistake included:
# dpkg-reconfigure firebird2.1-super
You will then be returned to a shell prompt with the following output, that's it!
GSEC> GSEC>
If you're a seasoned Unix person, but new to Ubuntu, you might be wondering where all the Firebird files are residing in the directory hierarchy. To see where all the files were installed by Apt, simply do:
# dpkg -L firebird2.1-super /. /etc /etc/init.d /etc/init.d/firebird2.1-super /etc/default /etc/default/firebird2.1-super /usr /usr/share /usr/share/doc /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/firebird2.1-super /usr/bin /usr/bin/nbackup /usr/bin/qli /usr/bin/gbak /usr/bin/gfix /usr/bin/gpre /usr/bin/isql-fb /usr/bin/gsec /usr/bin/fbstat /usr/bin/gdef /usr/lib /usr/lib/firebird /usr/lib/firebird/2.1 /usr/lib/firebird/2.1/bin /usr/lib/firebird/2.1/bin/fbmgr /usr/lib/firebird/2.1/bin/fbmgr.bin /usr/lib/firebird/2.1/bin/fb_lock_print /usr/lib/firebird/2.1/bin/fbguard /usr/lib/firebird/2.1/bin/fbserver /usr/lib/firebird/2.1/UDF /usr/lib/firebird/2.1/UDF/fbudf.so /usr/lib/firebird/2.1/UDF/ib_udf.so /usr/share/doc/firebird2.1-super
As mentioned, a new user “firebird” is created on the target
machine. With administrator access, set a password for this new
user:
# passwd firebird Enter new UNIX password: Retype new UNIX password:
Now you can switch to the firebird user with the su command if required.
Install the examples and dev files
# apt-get install firebird2.1-examples firebird2.1-dev
The employee.fdb archive will be under this dir /usr/share/doc/firebird2.1-examples/examples/empbuild/
# cd /usr/share/doc/firebird2.1-examples/examples/empbuild/ sudo gunzip employee.fdb.gz sudo chown firebird.firebird employee.fdb sudo mv employee.fdb /var/lib/firebird/2.1/data/
connect to db
isql-fb SQL> connect "/var/lib/firebird/2.1/data/employee.fdb " user 'SYSDBA' password 'SYSDBApassword';
Now you can check the server version and the tables
SQL> show tables;
COUNTRY CUSTOMER
DEPARTMENT EMPLOYEE
EMPLOYEE_PROJECT JOB
PROJECT PROJ_DEPT_BUDGET
SALARY_HISTORY SALES
SQL> show version;
SQL> quit
CON>;
For an GUI admin tool you might check the flamerobin administration tool included in ubuntu repository can be installed by an simple
# apt-get install flamerobin
While you're at it, install the utilities package:
This will give you an interactive shell, and backup and reporting
tools among others. Now you can test your Firebird installation by
connecting to an example database. Decompress the example
“employee.fdb” database:
# gunzip # /usr/share/doc/firebird2-examples/examples/employee.fdb.gz
Fire up the interactive shell.
# isql-fb
At the SQL> prompt, connect to the database with:
SQL> connect "employee.fdb" user 'SYSDBA' password 'SYSDBApassword';
If you get an error message like “Statement failed, SQLCODE =
-551 no permission for read-write access to database
/usr/share/doc/firebird2-examples/examples/employee.fdb”, then the
server process doesn't have read or write access to the database file.
Change the ownership of the database to the user firebird with:
# chown firebird:firebird employee.fdb
When you manage to successfully connect to the database you will see the message:
Database: "employee.fdb", User: SYSDBA
Now, from the SQL> prompt, feel free to browse
around the employee database:
SQL> show tables; COUNTRY CUSTOMER DEPARTMENT EMPLOYEE EMPLOYEE_PROJECT JOB PHONE_LIST PROJECT PROJ_DEPT_BUDGET SALARY_HISTORY SALES
If you've made it this far your Firebird installation on Ubuntu has been a success. Have a nice day!
| Firebird Documentation Index → Setting up Firebird on Ubuntu Linux |