FirebirdSQL logo

createAliasDB.sh Parameters

To run the createAliasDP.sh script, use a command line similar to the following:

# createAliasDB.sh <new_alias> <database_name>

The script takes two parameters on the command line, both of which are mandatory:

new_alias

The first parameter is the new alias you wish to create.This alias must not already exist in the alias file, or an error will be displayed and no further action taken.

database_filename

The second parameter specifies the full path to the database file.You must not specify a relative path as this could lead to incorrect database filenames being used at connection time.The script will reject any attempt to pass a relative pathname instead of a full pathname.

A brand new empty database will be created provided that the name passed to the script doesn’t already exist.If the database already exists, only the alias will be created and added to the alias file.

Fb_config

The fb_config script is intended to be used from within a makefile to supply various settings and compiler options which are accurate and specific to the installation being used.

Note

This script can be run by any user who has been given execute privileges to it.You do not need to be root to use this script.

fb_config Options

To run the fb_config script, use a command line similar to the following:

fb_config <option> [ <option> [...]]

The script takes one or more options on the command line:

--help

This parameter displays the list of allowed options.It should not be supplied in addition to other options.

--cflags

This option returns the list of directories where Firebird include files are stored.This is required by the C and C++ compilers to allow compiler #include directives to be correctly resolved.On my own system, this option returns ‘-I/opt/firebird/include’.

--libs

This option returns the list of directories where Firebird libraries are located and a list of those libraries that are required to be linked by the linker to create a client server Firebird application.This option returns ‘-L/opt/firebird/lib -lfbclient’ on my system.

--embedlibs

This option returns the list of directories where Firebird libraries are located and a list of those libraries that are required to be linked by the linker to create an embedded Firebird application.This option returns ‘-L/opt/firebird/lib -lfbembed’ on my system.

--bindir

On my system, this option returns ‘/opt/firebird/bin’ as the full path to the Firebird /bin directory.

--version

This option returns a three part version string made up of the concatenation of the Firebird build version, a dash, the package version, a dot and the system architecture.My own laptop Linux system returns ‘1.5.0.4290-0.i686’.

The following is a brief excerpt from a makefile which shows how to define two macros, FBFLAGS and FBLIBS, and initialise them to the correct values using fb_config.Note the use of the back tick character (`) rather than a single quote character (').

...
FBFLAGS = `fb_config --cflags`
FBLIBS = `fb_config --libs`
...

ChangeRunUser

Under Firebird 1.5 there are two versions of the changeRunUser.sh script, the one prefixed 'SS' is for Super Server installations and the one prefixed 'CS' is for Classic Server installations.In Firebird 2 onwards, the script is simply changeRunUser.sh.

Note

The script should be run as root.

The changeRunUser.sh script allows the user and group, under which the Firebird server runs, to be changed.By default, this is now the firebird user and group, however, in previous versions the Firebird server ran as the root user which is undesirable from a system security point of view and allowed databases to be created all over the file system.With the new firebird user, restrictions can be placed on where databases can be created.

The script changes the owing user and group of a number of files in the Firebird installation directory, the logfile and also the startup script /etc/rc.d.init.d/firebird which is used to start and stop the Firebird server.