1

I install a Firebird database server (ver. 2.5) according to the instructions on https://www.howtoforge.com/the-perfect-database-server-firebird-2.5-and-freebsd-8.1 and I get this message "Please do not build firebird as 'root' because this may cause conflicts with SysV semaphores of running services".

Trying to compile as normal user failed because I do not have access to write in this directory.

After Firebird installation as root, when I try to create local database I got error:

# isql-fb
Use CONNECT or CREATE DATABASE to specify a database
SQL> CREATE DATABASE '/test/my.fdb';
Bus error (core dumped)

Can someone help me please?

  • 2
    go to Firebird Support mail list - https://www.firebirdsql.org/en/mailing-lists/ – Arioch 'The Jul 24 '18 at 12:49
  • Your question is too broad. Please ask on the firebird-support mailing list, or maybe even on the firebird-devel mailing list. – Mark Rotteveel Jul 24 '18 at 12:55
  • "Trying to compile as normal user failed because I do not have access to write in this directory" - and so??? can you not add those rights to those folders and files to your user if you have the root password ??? alternatively, cannot you make a copy of that folder in your home folder and then run "make" in that copy, not directly in ports ? – Arioch 'The Jul 24 '18 at 13:53

2 Answers2

1

The easiest way would be to install the package as root user, for example:

# pkg install firebird25-server

If you would like to use the ports try this:

# cd /usr/ports/databases/firebird25-server
# make install clean

In either case, the message you get will be something like this (you could ignore it to continue with the installation, just need to wait 5 seconds and then it will proceed):

> pkg install firebird25-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        firebird25-server: 2.5.8_1 [FreeBSD]
        firebird25-client: 2.5.8_1 [FreeBSD]

Number of packages to be installed: 2

The process will require 22 MiB more space.
5 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/2] Fetching firebird25-server-2.5.8_1.txz: 100%    2 MiB   2.4MB/s    00:01
[2/2] Fetching firebird25-client-2.5.8_1.txz: 100%    3 MiB 943.7kB/s    00:03
Checking integrity... done (0 conflicting)
[1/2] Installing firebird25-client-2.5.8_1...
[1/2] Extracting firebird25-client-2.5.8_1: 100%
[2/2] Installing firebird25-server-2.5.8_1...
===> Creating groups.
Creating group 'firebird' with gid '90'.
===> Creating users
Creating user 'firebird' with uid '90'.
###############################################################################

                             ** IMPORTANT **

Keep in mind that if you build firebird server as 'root', this may cause
conflicts with SysV semaphores of running services.

If you want to cancel it, press ctrl-C now if you need check some things
before of build it.

###############################################################################

Here sleeps for 5 seconds and then continues:

[2/2] Extracting firebird25-server-2.5.8_1: 100%
Message from firebird25-server-2.5.8_1:

###############################################################################

Firebird was installed.

1) Support for Super Server has been added

2) Before start the server ensure that the following line exists in /etc/services:

gds_db          3050/tcp  #InterBase Database Remote Protocol

3) If you use inetd (Classic Server) then add the following line to /etc/inetd.conf

gds_db  stream  tcp     nowait  firebird        /usr/local/sbin/fb_inet_server  fb_inet_server

And finally restart inetd.

4) If you want to use SuperClassic Server then you must add the following lines
   to /etc/rc.conf file.

 firebird_enable="YES"
 firebird_mode="superclassic"

5) If you want to use Super Server then you must add the following lines to
   /etc/rc.conf file.

 firebird_enable="YES"
 firebird_mode="superserver"

 Note: Keep in mind that you only can add one of them but never both modes on
       the same time

6) It is STRONGLY recommended that you change the SYSDBA
password with:

 # gsec -user SYSDBA -pass masterkey
 GSEC> modify SYSDBA -pw newpassword
 GSEC> quit

before doing anything serious with Firebird.

7) See documentation in /usr/local/share/doc/firebird/ for more information.

8) Some firebird tools were renamed for avoid conflicts with some other ports

        /usr/local/bin/isql     ->      /usr/local/bin/isql-fb
        /usr/local/bin/gstat    ->      /usr/local/bin/fbstat
        /usr/local/bin/gsplit   ->      /usr/local/bin/fbsplit

9) Enjoy it ;)

To start it just add to /etc/rc.conf as indicated in the message in point 4 or 5, for example:

firebird_enable="YES"
firebird_mode="superserver"

To compile it as non-root an easy way could be to change the owner of the port dir to your user, for example:

# chown -R foo:foo /usr/ports/databases/firebird25-server

Then as your user cd to the port and build by typing only make:

$ cd /usr/ports/databases/firebird25-server
$ make

Then switch back to root to install the port:

# make install
nbari
  • 25,603
  • 10
  • 76
  • 131
0

Here is a procedure I used to get around this issue in the past (based on FreeBSD 10.2). This is for firebird client, but should work similarly for server. This procedure assumes sudo is set up for the user performing the installation.

cd /usr/ports
sudo chown non-root-user-name distfiles   (was root)
cd /usr/ports/databases
sudo chown non-root-user-name firebird25-client   (was root)
cd /usr/ports/databases/firebird25-client
make -DPACKAGE_BUILDING   (Note:  No sudo is used here!  This process can take a long time.)
(Note:  You may be required to supply root password on this step)
make install clean  (Note:  You may be required to supply root password on this step)
cd /usr/ports
sudo chown root distfiles   
cd /usr/ports/databases
sudo chown root firebird25-client

As for FreeBSD 11.x and Firebird...I was seeing the same "Bus error". I have concluded for now (perhaps incorrectly) that Firebird is not yet compatible with FreeBSD 11.x. If you revert to FreeBSD 10.x, you should not see this problem.

Tim D
  • 650
  • 1
  • 12
  • 18