FreeBSD 11.2上的Firebird 2.5数据库服务器

时间:2018-07-24 11:37:38

标签: firebird freebsd firebird2.5 sysv

我按照https://www.howtoforge.com/the-perfect-database-server-firebird-2.5-and-freebsd-8.1上的说明安装了Firebird数据库服务器(版本2.5),并收到此消息”“请不要将Firebird构建为'root',因为这可能导致与SysV信号灯冲突。正在运行的服务”

尝试以普通用户身份编译失败,因为我无权在此目录中进行写入。

以根用户身份安装Firebird之后,当我尝试创建本地数据库时出现错误:

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

有人可以帮我吗?

2 个答案:

答案 0 :(得分:0)

最简单的方法是以 root 用户身份安装软件包,例如:

# pkg install firebird25-server

如果您想使用端口,请尝试以下操作:

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

在任何一种情况下,您收到的消息都是这样的(您可以忽略它以继续安装,只需need to wait 5 seconds,然后它将继续进行):

> 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.

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

sleeps for 5秒后继续:

[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 ;)

要启动它,只需按照第4点或第5点消息中的指示将其添加到/etc/rc.conf中,例如:

firebird_enable="YES"
firebird_mode="superserver"

要将其编译为非root用户,一种简单的方法可能是将端口目录的所有者更改为您的用户,例如:

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

然后以您的用户cd的身份访问端口并通过仅键入make进行构建:

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

然后切换回root以安装端口:

# make install

答案 1 :(得分:0)

这是我过去用来解决此问题的过程(基于FreeBSD 10.2)。这是针对Firebird客户端的,但对于服务器也应类似地工作。此过程假定为执行安装的用户设置了sudo。

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

对于FreeBSD 11.x和Firebird ...我看到的是相同的“总线错误”。我现在已经得出结论(也许是错误的),Firebird尚未与FreeBSD 11.x兼容。如果恢复为FreeBSD 10.x,则应该不会看到此问题。