| 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 6.10 “Edgy Eft”.
The version of Firebird packaged with Ubuntu “Edgy Eft” is 1.5.3.4870-10 but is labelled "firebirdsql2". Since its inception, Ubuntu has followed a strict six-month release cycle so this may change with the “Feisty Fawn” release in April 2007.
With administrator privileges on the target machine, issue the following command:
# apt-get install firebird2-super-server
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-common firebird2-server-common libfbclient1 Recommended packages: firebird2-server The following NEW packages will be installed firebird2-common firebird2-server-common firebird2-super-server libfbclient1 Need to get 2342kB of archives. After unpacking 5976kB of additional disk space will be used. Do you want to continue [Y/n]?
Ignore the “firebird2-server” virtual package which will just ask you to select either the “Classic” or “Super” server.
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:
Plase enter new password for SYSDBA user:
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-super-server /. /usr /usr/lib /usr/lib/firebird2 /usr/lib/firebird2/bin /usr/lib/firebird2/bin/fb_lock_print /usr/lib/firebird2/bin/fbserver /usr/lib/firebird2/bin/fbguard /usr/lib/firebird2/bin/fbmgr.bin /usr/lib/firebird2/UDF /usr/lib/firebird2/UDF/fbudf.so /usr/bin /usr/bin/gsec /usr/bin/fbmgr /usr/share /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/firebird2-super-server /usr/share/doc /usr/share/doc/firebird2-super-server /usr/share/doc/firebird2-super-server/README.Debian /usr/share/doc/firebird2-super-server/TODO.Debian /usr/share/doc/firebird2-super-server/copyright /usr/share/doc/firebird2-super-server/NEWS.Debian.gz /usr/share/doc/firebird2-super-server/changelog.gz /usr/share/doc/firebird2-super-server/changelog.Debian.gz /usr/share/man /usr/share/man/man1 /usr/share/man/man1/fbmgr.1.gz /usr/share/man/man1/gsec.1.gz /etc /etc/init.d /etc/init.d/firebird2 /usr/lib/firebird2/bin/fbmgr /usr/lib/firebird2/bin/gsec
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.
If you try to stop the server from running with the init.d command an error message will
appear.
# /etc/init.d/firebird2 stop /etc/init.d/firebird2: 28: source: not found Stopping Firebird server: Your user name and password are not defined. Ask your database administrator to set up a Firebird login. can not attach to server
The same will happen if you try and start the server. This needs further investigation and discussion with the Debian and Ubuntu Firebird packagers to iron out, but for now to stop the server:
# su -c "fbmgr -shut -passwordSYSDBApassword" firebird Password: server shutdown completed
Where SYSDBApassword is the password you
entered immediately after installation and the second password is the
firebird user password. To start the server again:
# su -c "fbmgr -start" firebird
With the installation complete, you can now begin using Firebird on Ubuntu Linux. The base package does not include any example databases, so if you like, install some with:
# apt-get install firebird2-examples
These will be installed in /usr/share/doc/firebird2-examples/. While
you're at it, install the utilities package:
# sudo apt-get install firebird2-utils-super
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 |