
In the official repositories of Ubuntu, you can find Firebird packages are not the very first freshness. For example, for my current LTS release 10.04.4 Lucid Lynx (yes, I'm a retrograde, I can't digest Unity and Gnome3) it will be Firebird 2.5.0.26074. While the latest official release is
2.5.2.26540 Security Update 1 . If you need the latest release, you need to either collect the bird from the source, or connect a third-party repository. Next is the second option.
Add ppa:
sudo add-apt-repository ppa:mapopa
Update the list of packages
sudo apt-get update
Next, install the server. During the process, you will be asked for a super-user password (SYSDBA):
sudo apt-get install firebird2.5-super
This is a super server architecture. If you prefer to use alternative configurations classic or super-classic, then the package installation commands will be as follows:
sudo apt-get install firebird2.5-classic
or
sudo apt-get install firebird2.5-superclassic
If you do not know which of the three architectures you need, read the
documentation (if in Russian, from the
Quick Start Guide of the old version 1.5 ), or immediately start with the super-server architecture.
')
Run the installed version configurator (correct the package name if you stopped for a classic or a super-classic architecture):
sudo dpkg-reconfigure firebird2.5-super
Install the dev package and examples:
sudo apt-get install firebird2.5-examples firebird2.5-dev
The reference (test) database employee.fdb will be installed as an archive in /usr/share/doc/firebird2.5-examples/examples/empbuild/
Unpack and put somewhere closer:
cd /usr/share/doc/firebird2.5-examples/examples/empbuild/ sudo gunzip employee.fdb.gz sudo chown firebird.firebird employee.fdb sudo mv employee.fdb /var/lib/firebird/2.5/data/
Connect to the test database via the isql console utility:
$ /usr/bin/isql-fb
SQL> connect "localhost:/var/lib/firebird/2.5/data/employee.fdb" user 'SYSDBA' password 'SYSDBApassword';
Replace the password with your own.
Do not forget to end the command with a semicolon.
Always add "localhost:" before the file path to the database. In this case, the lock-files and shared memory segments will be in the possession of the 'firebird' account. Another option is to add yourself to the 'firebird' group.
$ sudo adduser `id -un` firebird
If everything went well, then you will see a message that the connection is established to such and such a database under such a user. Next will be an invitation to enter the command:
Database: "/var/lib/firebird/2.5/data/employee.fdb ", User: SYSDBA
SQL>
You can request the tables available in the database:
SQL> show tables;
COUNTRY CUSTOMER
DEPARTMENT EMPLOYEE
EMPLOYEE_PROJECT JOB
PROJECT PROJ_DEPT_BUDGET
SALARY_HISTORY SALES
or server version:
SQL> show version;
ISQL Version: LI-V2.5.2.26508 Firebird 2.5
Server version:
Firebird/linux AMD64 (access method), version "LI-V2.5.2.26508 Firebird 2.5"
Firebird/linux AMD64 (remote server), version "LI-V2.5.2.26508 Firebird 2.5/tcp (arni-ubuntu)/P12"
Firebird/linux AMD64 (remote interface), version "LI-V2.5.0.26074 Firebird 2.5/tcp (arni-ubuntu)/P12"
on disk structure version 11.2
Create a new database:
SQL> create database "/var/lib/firebird/2.5/data/first_database.fdb" user 'SYSDBA' password 'SYSDBApassword' default character set UTF8;
Commit current transaction (y/n)?y
Committing.
Make sure that we are really connected to a new (empty) database:
SQL> show tables;
There are no tables in this database
Create a table and fill it with a couple of lines:
SQL> create table TEST(ID int not null primary key, NAME varchar(20));
SQL> show tables;
TEST
SQL> insert into TEST values (1, 'Firebird');
SQL> insert into TEST values (2, 'Hallo,Habr');
SQL> select * from TEST;
ID NAME
============ ===================================== ===============================
1 firebird
2 Hallo, Habr
Do not forget to commit your work:
SQL> commit;
Song about commit and rollbackIt's no secret that rollback should be done less often,
It is better to do more often commit!
I will soon hang my program with my server - Let the admin let his head go.
Under the cries of castration,
In obkurennoy prostration,
As a result of mutations
Born at the moment
Rollback segment for small,
For such a small transaction,
For a modest such transaction
Huge such a segment!
It's no secret that rollback is an ulcer and hernia,
Hemorrhoids and a little sinusitis.
If you are a programmer and not a shameless donkey - Better do it more often commit!
Chorus.
It's no secret that friends also need resources
It is necessary memory, processor and disk ...
So make commit, otherwise ... you know,
What rollback is an undue risk for you.
To exit the console tool:
SQL> quit;
either more traditionally: ^ D
Finally, install the GUI tool for administering the Firebird databases:
FlameRobin sudo apt-get install flamerobin
After installation, look for it in the menu: Applications => Programming => FlameRobin.
We register our database:

And we use:

The tool can not be called advanced. From windows (and also, they say, from wine) you can connect and administer the database using
IBExpert . This is already the most powerful IDE, which will give odds to many proprietary products for such commercial DBMS as MsSQL or Oracle. But the most important thing is that it is free for exUSSR:
Ex-USSR licenseIB Expert - The Most Expert for InterBase, Firebird and Yaffil
Copyright © 2000-2012 IBExpert KG
All rights reserved.
Once you read this text, it means that your computer is installed.
code page WIN1251. And this in turn means that you are entitled to
use this product completely free of charge.
In any case, you can always help us with your advice.
to improve the product, bug reports and new ideas.
Successes you in work!
Download
from here .
The material underlying .