Distro: Ubuntu 7.04, aplicável à outras distros derivadas do Debian também.
De preferência faça tudo como root ou vá de "sudo" mesmo.
1º passo: Digite esse comando, ele instalará o SGBD firebird super server em sua máquina.
QUANDO PEDIR A SENHA DIGITE: masterkey (deixe a padrão mesmo, porque senão teremos que mudar muita coisa)
$ sudo apt-get install firebird2-super-server
2º passo: Devemos agora iniciar o servidor de banco de dados. Digite:
$ sudo gedit /etc/init.d/firebird2
Coloque isso dentro do arquivo que você criou:
#!/bin/sh
# chkconfig: 345 20 80
# description: Start/Stop firebird database server
#
# This file belongs in /etc/init.d where it will be run
# on system startup and shutdown to start the background
# Firebird/interbase database server daemon
# This init script contains functions specific for debian
# init scripts.
# Source function library.
#. /etc/init.d/functions
FIREBIRD=/usr/lib/firebird2
# these are defaults
ISC_USER=SYSDBA
ISC_PASSWORD=masterkey
DBAPasswordFile=/etc/firebird2/SYSDBA.password
# read actual password from SYSDBA.password if it exists
[ -e "$DBAPasswordFile" ] && . "$DBAPasswordFile"
FBRunUser=firebird
FB_OPTS="-start -forever"
# WARNING: in a real-world installation, you should not put the
# SYSDBA password in a publicly-readable file.
# Eventually this file should not need to contain any passwords.
# as root user alone should be sufficient privledge to stop/start
# the server.
export FIREBIRD
export ISC_USER
export ISC_PASSWORD
if [ ! -e /var/run/firebird2 ];then
mkdir /var/run/firebird2
chown firebird:firebird /var/run/firebird2
fi
# Check the file is there and is executable.
MANAGER=$FIREBIRD/bin/fbmgr.bin
[ -x $MANAGER ] || exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting Firebird server: "
start-stop-daemon --start --quiet --oknodo --chuid $FBRunUser --exec $MANAGER -- $FB_OPTS
RETVAL=$?
;;
stop)
echo -n "Stopping Firebird server: "
# start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/firebird.pid
$MANAGER -shut
RETVAL=$?
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
shutdown)
echo -n "Forcibly killing Firebird server..."
killall fbguard
killall fbserver
echo "done."
RETVAL=0
;;
force-reload)
echo -n "Forcibly relad Firebird server..."
$0 shutdown
$0 start
RETVAL=$?
;;
*)
echo "Usage: firebird {start|stop|shutdown|restart|reload|force-reload}"
exit 1
esac
exit $RETVAL
Agora digite esse comando para torná-lo executável:
$ sudo chmod 700 /etc/init.d/firebird2
Inicie o servidor com o seguinte comando:
$ sudo /etc/init.d/firebird2 start
Pronto, agora ele já está funcionando.
Vamos instalar um cliente gráfico de gerenciamento de bancos de dados:
$ sudo apt-get install flamerobin
Execute o flamerobim com o seguinte comando:
$ flamerobim
ATENÇÃO: Na hora de criar o banco de dados salve ele na pasta /var/lib/firebird2/system/nome_do_bd.fdb.