个人工具

UbuntuHelp:Firebird2 1

来自Ubuntu中文

跳转至: 导航, 搜索

The Firebird2.1 package for ubuntu gutsy 7.10 and hardy 8.04 is located into this repository (ppa) until it will be included into the main The repository must be added into sources.list

sudo gedit /etc/apt/sources.list

and you should add these lines

deb http://ppa.launchpad.net/mapopa/ubuntu hardy main
deb-src http://ppa.launchpad.net/mapopa/ubuntu hardy main

Then you need to update the cache repository

sudo apt-get update

Here is how you can inspect the firebird2.1 related packages

apt-cache search firebird2.1-*

install the super server package (you will be asked about the SYSDBA password and what service to enable :Super Server or Classic )

sudo apt-get install firebird2.1-super

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

You need to configure the package after is installed

sudo dpkg-reconfigure firebird2.1-super

Install the examples and dev files

$sudo 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

sudo apt-get install flamerobin

Then use it from the menu Applications->Programming-> FlameRobin

Other Firebird Related Guides

You can start with the main Firebird documentation