Here is the guide on installing Firebird 2.5 from FreeBSD 8.1 Ports and creating your first test database also we show you howto install Flamerobin GUI (administation tool) and the PHP driver for it .

This was tested on fresh freebsd 8.1 on a virtual machine

Download a compressed snapshot of the Ports Collection into /var/db/portsnap.

# portsnap fetch

or update it

If you are running Portsnap for the first time, extract the snapshot into /usr/ports:

# portsnap extract

If you already have a populated /usr/ports and you are just updating, run the following command instead:

# portsnap update

enter firebird server ports directory

# cd /usr/ports/firebird25-server

compile and install firebird server

# make -DPACKAGE_BUILDING # make install

enable it by adding

firebird_enable="YES"

we modify in



/etc/rc.conf

and start it with

#/usr/local/etc/rc.d/firebird start

logs and security2.fdb seems to be in /var/db/firebird

#/usr/local/bin/isql-fb

To create a new database

SQL> create database “tmp/first_database.fdb; SQL> connect “/tmp/first_database.fdb” ; Commit current transaction (y/n)?y Committing. Database: “/tmp/first_database.fdb” SQL>

if you want to create a simple table then insert 1-2 rows and select from it here is one example

SQL> CREATE TABLE TEST (ID INT NOT NULL PRIMARY KEY, NAME VARCHAR(20)); SQL> show tables; TEST SQL> INSERT INTO TEST VALUES (1, ‘John’); SQL> INSERT INTO TEST VALUES (2, ‘Joe’); SQL> select * from test; ID NAME ============ ==================== 1 John 2 Joe

To quit the isql-fb console type quit

SQL> quit CON>;

For a good open source GUI admin tool you might check the flamerobin administration tool included in ports repository can be installed by an simple

cd /usr/ports/databases/flamerobin/ && make install clean

To use firebird with php , you will need the php5 driver

#cd /usr/ports/databases/php5-interbase/ && make install clean

You can choose to compile php with apache support (I have choosen cli, cgi , and apache support)

check it if is enabled with