Setting Up Firebird On Ubuntu Linux
Setting Up Firebird On Ubuntu Linux
http://www.firebirdsql.org/manual/ubusetup.html
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 Not be started by default So you need to make another step to enable it: Selecting previously deselected package firebird2.1-super. (Reading database ... 542436 files and directories currently installed.) Unpacking firebird2.1-super (from .../firebird2.1-super_2.1.3.18185-0.ds1-6build1_i386.deb) ... Processing triggers for ureadahead ... Setting up firebird2.1-super (2.1.3.18185-0.ds1-6build1) ... Created default security.fdb * Firebird 2.1 server manager not running. * Not starting Firebird 2.1 server manager * Use `dpkg-reconfigure firebird2.1-super' to enable.
You will need to configure the Firebird server if you want to start it automatically click Yes button then you will be asked again for SYSDBA password # dpkg-reconfigure firebird2.1-super
If all is Ok Firebird Super server will be started * Firebird 2.1 server manager not running. * Starting Firebird 2.1 server manager... * Firebird 2.1 server manager already running.
[ OK ]
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
1 of 3
10/16/2010 9:08 PM
http://www.firebirdsql.org/manual/ubusetup.html
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
Now you can test your Firebird installation by connecting to an example database. Decompress the example employee.fdb database: 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/ gunzip employee.fdb.gz chown firebird.firebird employee.fdb mv employee.fdb /var/lib/firebird/2.1/data/
Fire up the interactive shell and at the SQL> prompt connect to employee database using the connect statement isql-fb SQL> connect "/var/lib/firebird/2.1/data/employee.fdb " user 'SYSDBA' password 'SYSDBApassword';
When you manage to successfully connect to the database you will see the message: Database: SQL> "/var/lib/firebird/2.1/data/employee.fdb ", User: SYSDBA
Now, from the SQL> prompt, feel free to browse around the employee database: 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; ISQL Version: LI-V2.1.3.18185 Firebird 2.1 Server version: Firebird/linux Intel (access method), version "LI-V2.1.3.18185 Firebird 2.1" Firebird/linux Intel (remote server), version "LI-V2.1.3.18185 Firebird 2.1/tcp (borkstationx32)/P11" Firebird/linux Intel (remote interface), version "LI-V2.1.3.18185 Firebird 2.1/tcp (borkstationx32)/P11" on disk structure version 11.1
2 of 3
10/16/2010 9:08 PM
http://www.firebirdsql.org/manual/ubusetup.html
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
If you get an error message like Statement failed, SQLCODE = -551 no permission for read-write access to database /var/lib/firebird/2.1/data /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: # cd /var/lib/firebird/2.1/data/ # chown firebird:firebird employee.fdb
If you've made it this far your Firebird installation on Ubuntu has been a success. Have a nice day!
3 of 3
10/16/2010 9:08 PM