Autostarting InterBase/Firebird on Linux

As you know, Firebird Project devotes a lot of effort to QA and performance testing: we have several test servers to run functional and performance tests every day, with results publicly available at www.firebirdtest.com The official open-source Firebird performance load test, Firebird OLTP-EMUL, is also running as a part of the testing suite, and its results are also available for public. They confirm that Firebird 4 release has no performance problems, and any such problem during the snapshot is addressed and resolved in timely manner.

 

Notes and shell script from Jorge Alvarez

Here's what I do under Linux Mandrake. It should do the trick under Red Hat too.

  1. copy the script below as 'ibserver' to /etc/rc.d/init.d
  2. cd to this directory and chmod 700 ibserver
  3. cd /etc/rc.d/rc3.d
  4. ln -s /etc/rc.d/init.d/ibserver S86ibserver
  5. ln -s /etc/rc.d/init.d/ibserver K40ibserver

InterBase should start next time you reboot your Linux server. Here's the script:
 

#!/bin/sh
# file name ibserver
# ibserver script - Start/stop the InterBase daemon
# Set these environment variables if and only if they are not set.
: ${INTERBASE:=/opt/interbase}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterkey}
# WARNING: in a real-world installation, you should not put the
# SYSDBA password in a publicly-readable file. To protect it:
# chmod 700 ibserver.sh; chown root ibserver.sh
export INTERBASE
export ISC_USER
export ISC_PASSWORD
ibserver_start()
{
# This example assumes the InterBase server is
# being started as UNIX user ¡¯interbase¡¯.
echo '$INTERBASE/bin/ibmgr -start -forever' | su root
}
ibserver_stop()
{
# No need to su, since $ISC_USER and $ISC_PASSWORD validate us.
$INTERBASE/bin/ibmgr -shut -password $ISC_PASSWORD
}
case $1 in
'start') ibserver_start ;;
'start_msg') echo 'InterBase Server starting...\c' ;;
'stop') ibserver_stop ;;
'stop_msg') echo 'InterBase Server stopping...\c' ;;
*) echo 'Usage: $0 { start | stop }' ; exit 1 ;;
esac
exit 0
 

As you know, Firebird Project devotes a lot of effort to QA and performance testing: we have several test servers to run functional and performance tests every day, with results publicly available at www.firebirdtest.com The official open-source Firebird performance load test, Firebird OLTP-EMUL, is also running as a part of the testing suite, and its results are also available for public. They confirm that Firebird 4 release has no performance problems, and any such problem during the snapshot is addressed and resolved in timely manner.

 

Notes and shell script from Jorge Alvarez

Here's what I do under Linux Mandrake. It should do the trick under Red Hat too.

  1. copy the script below as 'ibserver' to /etc/rc.d/init.d
  2. cd to this directory and chmod 700 ibserver
  3. cd /etc/rc.d/rc3.d
  4. ln -s /etc/rc.d/init.d/ibserver S86ibserver
  5. ln -s /etc/rc.d/init.d/ibserver K40ibserver

InterBase should start next time you reboot your Linux server. Here's the script:
 

#!/bin/sh
# file name ibserver
# ibserver script - Start/stop the InterBase daemon
# Set these environment variables if and only if they are not set.
: ${INTERBASE:=/opt/interbase}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterkey}
# WARNING: in a real-world installation, you should not put the
# SYSDBA password in a publicly-readable file. To protect it:
# chmod 700 ibserver.sh; chown root ibserver.sh
export INTERBASE
export ISC_USER
export ISC_PASSWORD
ibserver_start()
{
# This example assumes the InterBase server is
# being started as UNIX user ¡¯interbase¡¯.
echo '$INTERBASE/bin/ibmgr -start -forever' | su root
}
ibserver_stop()
{
# No need to su, since $ISC_USER and $ISC_PASSWORD validate us.
$INTERBASE/bin/ibmgr -shut -password $ISC_PASSWORD
}
case $1 in
'start') ibserver_start ;;
'start_msg') echo 'InterBase Server starting...\c' ;;
'stop') ibserver_stop ;;
'stop_msg') echo 'InterBase Server stopping...\c' ;;
*) echo 'Usage: $0 { start | stop }' ; exit 1 ;;
esac
exit 0