Firebird DB Server インストール

パピーを名犬にするための技、テクニック

モデレータ: 暇人, YoN, nyu

返信する
minon
記事: 167
登録日時: 09/05/11(月) 13:13
お住まい: AICHI
連絡する:

Firebird DB Server インストール

投稿記事 by minon »

PuppyはFirebird DBMSクライアントとして重宝しています。

公式サイト
http://www.firebirdsql.org/

Wine環境から
CSネイティブ/Embedded/ODBC接続ともなんら問題なく使えています。
とはいえ個人サーバとして利用したい場面も結構あります。

簡単インストールなので以下報告します。

1. Firebirdユーザ/グループ作成

install.sh内でユーザ/グループを使うため事前に作成します。
1) firebirdユーザ/グループの作成

コード: 全て選択

# adduser -G root -h /root/firebird firebird
Changing password for firebird
New password:(パスワード)
Retype password:(パスワード)
Password for firebird changed by root
# addgroup firebird
2) passwdの編集
/etc/passwd

コード: 全て選択

firebird:x:0:0:Linux User,,,:/root/firebird:/bin/sh
* /etc/groupのrootにfirebirdユーザを設定しても無効でした。
* passwd変更後、再起動が必要です

2. ダウンロード

軽量&Unicode4.0サポートなV2.0.5 SS(SuperServer:スレッドモデル)

FirebirdSS-2.0.5.13206-0.i686.tar.gz
http://www.firebirdsql.org/index.php?op ... engine_205

3. インストール

PupZipで展開後,install終了でDBAユーザのpasswordを入力します。

# ./install.sh
...
Starting Firebird server:...
Please enter new password for SYSDBA user : (passwordを入力)

4. 動作確認

1)PProcessで以下のプロセスを確認

firebird xxxx S /opt/firebird/bin/fbguard -f
firebird xxxx S /opt/firebird/bin/fbserver

2)TCPポート確認

netstatでポート確認します. gds_dbはポート:3050です。

> netstat -l | grep gds
Active Internet connection
tcp 0 0 *:gds_db

3)データベース接続確認

SQL会話ツールisqlでalias.conf内別名:employeeで接続します。

# cd /opt/firebird/bin/isql

SQL> connect employee user 'SYSDBA' password 'password';
SQL>SHOW DATABASE;
Database: employee
..
..

他ネットワークPCからは 'ip-address:employee'で接続します。

メモ:

- プロセス開始
# /etc/init.d/firebird start

- Firewall
利用する場合はFirebird標準ポート(3050/tcp)を有効にする。
etc/hosts.allowの変更は不要。

- シャットダウン
Ex. 10秒後にシャットダウン
/opt/firebird/bin/gfix -shut -at 10 'Server:DatabaseName'
最後に編集したユーザー minon [ 09/10/03(土) 18:34 ], 累計 1 回
minon / TOP Linux4.2.1
Dell Latitude D830/Core2Duo/1G/Intel 915GML Ex
minon
記事: 167
登録日時: 09/05/11(月) 13:13
お住まい: AICHI
連絡する:

Firebird DB Server(CS版) インストール

投稿記事 by minon »

V4.3よりSMP対応となり、
SMPが有効なCS版(ClassicServer:プロセスモデル)のインストール手順です。
補足:
プロセス・スレッドモデルを統合したFirebird 2.5(SuperClassic)は、
未だBeta版のため、2.1系を対象とします。

1. Firebirdダウンロード

最新版を使います。
FirebirdCS-2.1.3.18185-0.i686.tar.gz
http://www.firebirdsql.org/index.php?op ... engine_213

2. xinetdのインストール

本家のsamba向けxinetdを使います。
Samba File and Print Services for SMB/CIFS clients
http://www.murga-linux.com/puppy/viewto ... 95&t=46670

1) xinetd-2.3.14-i486.pet インストール
2) /etc/xinted.d ディレクトリ作成
* Firebird インストール時、配下にfirebird向けconfが作成される。
3) xinetd.confのSWAT記述削除とincludedirを追加

xinetd.conf

コード: 全て選択

# Simple configuration file for xinetd
# Some defaults, and include /etc/xinetd.d/
defaults
{
	instances	= 10
	only_from	= 192.168.0.0
	log_type	= SYSLOG authpriv
	log_on_success	= HOST PID
	log_on_failure	= HOST
	cps		= 25 7
}
includedir /etc/xinetd.d/
3. firebirdユーザ/グループの作成

* スーパサーバ向け参照

4. Firebird インストール

1) 解凍
2) イントール

コード: 全て選択

# cd FirebirdCS-2.1.3.18185-0.i686
# ./install.sh 
# Press Enter to start installation or ^C to abort
Extracting install data
grep: /etc/xinetd.d/*: No such file or directory
#Please enter new password for SYSDBA user: masterkey
Install completed
5.hostsの設定

ex.192.168.1.0/255のネットワーク
hosts.allow

コード: 全て選択

ALL: 192.168.1.
6. xinetdの自動起動の設定

/etc/rc.r/rc.local

コード: 全て選択

/usr/sbin/xinetd
7.動作確認

1) 再起動
2) データベース接続
3) ps -eaf | grep fb
* fb_lock_mgr/fb_inet_server を確認
minon / TOP Linux4.2.1
Dell Latitude D830/Core2Duo/1G/Intel 915GML Ex
返信する