データベース

DB2 Express-C on Debian(etch)

SIMさんのUbuntuでDB2を見てDB2 Express-CがDebianて動くのかもと思い試してみました。DB2はまだDebianをサポートしていないのでこのエントリーの内容はもちろん無保証ですのであしからず。

まずはライブラリーを2つ入れます。

sudo aptitude install libstdc++5
sudo aptitude install libaio1

インストールは普通はGUIのdb2setupなのですが、X-Windowを入れていないのでdb2_installコマンドを試みます。

$ sudo ./db2_install

Default directory for installation of products – /opt/ibm/db2/V9.5

***********************************************************
Do you want to choose a different directory to install [yes/no] ?
no

Specify one of the following keywords to install DB2 products.

EXP

Enter “help” to redisplay product names.

Enter “quit” to exit.

***********************************************************
EXP
DB2 installation is being initialized.

Total number of tasks to be performed: 38
Total estimated time for all tasks to be performed: 855

Task #1 start
Description: Checking license agreement acceptance
Estimated time 1 second(s)
Task #1 end

Task #2 start
Description: Base Client Support for installation with root privileges
Estimated time 3 second(s)
Task #2 end

Task #3 start
Description: Product Messages – English
Estimated time 10 second(s)
Task #3 end

(中略)

Task #36 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #36 end

Task #37 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #37 end

Task #38 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #38 end

The execution completed successfully.

For more information see the DB2 installation log at
“/tmp/db2_install.log.29222″.

いやー、サクッと入ってしまいました。試しにインスタンスとサンプルDBを作ってみます。

$ sudo useradd -m -k /etc/skel db2inst1
$ sudo /opt/ibm/db2/V9.5/instance/db2icrt -u db2inst1 db2inst1
DBI1070I Program db2icrt completed successfully.
$ su – db2inst1
$ db2start
SQL1063N DB2START processing was successful.
$ db2sampl

Creating database “SAMPLE”…
Connecting to database “SAMPLE”…
Creating tables and data in schema “DB2INST1″…
Creating tables with XML columns and XML data in schema “DB2INST1″…

‘db2sampl’ processing complete.

$ db2 connect to sample

Database Connection Information

Database server = DB2/LINUX 9.5.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE

これも問題なし。

similar posts

comment

よろしければ、コメントをどうぞ。トラックバックはこちら

このエントリーのコメントの購読

次のHTMLタグが使えます。: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

*Required Fields