Firebird Database Setup on Ubuntu Linux
Posted by admin on May 21st, 2007
Email This Post
The version of Firebird packaged with Ubuntu “Edgy Eft” is 1.5.3.4870-10 but is labelled “firebirdsql2″ and Firebird packaged with Ubuntu “Feisty” is 1.5.3.4870-12.
Install Firebird Database on Ubuntu
sudo apt-get install firebird2-super-server
Apt’s dependency tracking will automatically propose all the packages required for a complete installation.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>
a new user “firebird” is created on the target machine. With administrator access, set a password for this new user:
sudo passwd firebird
Enter new UNIX password:
Retype new UNIX password:
Now you can switch to the firebird user with the su command
If you try to stop the server from running with the init.d command an error message will appear.
sudo /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.To stop the server use the following command
sudo su -c “fbmgr -shut -password SYSDBApassword” 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
sudo 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
sudo 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
That’ it this will complete the firebird database setup in Ubuntu
If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!


September 8th, 2007 at 10:14 am
1 - at the part where you gunzip the template….in shich directory am i supposed to be in? my home directory?
2 - if not where.
3 - can you provide steps by step example how to create databse.
4 - i followed you steps, but i cant make anything, its saying im not allowed to.
5 - do i run the interactive prog with sudo por not?
6 - how do i become the firebord user when using firebird? do i do it within firebord at the conn> prompt? or at the linux prompt.
your guide is not clear and i am having problems getting it to work as expected.