首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于FreeBSD 11.2的FireBird2.5数据库服务器

基于FreeBSD 11.2的FireBird2.5数据库服务器
EN

Stack Overflow用户
提问于 2018-07-24 11:37:38
回答 2查看 1.3K关注 0票数 1

我安装了一个Firebird数据库服务器(ver )。2.5)根据https://www.howtoforge.com/the-perfect-database-server-firebird-2.5-and-freebsd-8.1上的说明和我收到的消息,“请不要将firebird构建为'root‘,因为这可能会导致与运行服务的SysV信号量的冲突”

试图作为普通用户编译失败,因为我没有在此目录中写入的权限。

在Firebird作为root安装之后,当我尝试创建本地数据库时,我得到了错误:

代码语言:javascript
复制
# isql-fb
Use CONNECT or CREATE DATABASE to specify a database
SQL> CREATE DATABASE '/test/my.fdb';
Bus error (core dumped)

有人能帮帮我吗?

EN

回答 2

Stack Overflow用户

发布于 2018-07-24 17:55:29

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

代码语言:javascript
复制
# pkg install firebird25-server

如果您想使用这些端口,请尝试如下:

代码语言:javascript
复制
# cd /usr/ports/databases/firebird25-server
# make install clean

在这两种情况下,您得到的消息都是这样的(您可以忽略它来继续安装,只需要需要等待5秒,然后它将继续执行):

代码语言:javascript
复制
> 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.

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

在这里,睡5次秒,然后继续:

代码语言:javascript
复制
[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 ;)

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

代码语言:javascript
复制
firebird_enable="YES"
firebird_mode="superserver"

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

代码语言:javascript
复制
# chown -R foo:foo /usr/ports/databases/firebird25-server

然后作为您的用户cd到端口并通过键入make进行编译。

代码语言:javascript
复制
$ cd /usr/ports/databases/firebird25-server
$ make

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

代码语言:javascript
复制
# make install
票数 1
EN

Stack Overflow用户

发布于 2018-07-26 15:35:00

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

代码语言:javascript
复制
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,您就不会看到这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51497619

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档