Gentoo 支持

IBM DB2 信息中心 并不提供对Gentoo Linux 的额外支持,如果使用Gentoo,在以下几个地方,需要额外的工作。

rpm

DB2 信息中心安装文件内部使用rpm 包,Gentoo 默认没有rpm 引擎,需要先emerge rpm,否则安装无法继续。

# emerge -av rpm 

信息中心自v9.1 版本,使用tar包,不再需求rpm。

服务daemon 不会自动启动

安装脚本使用Redhat Linux 发布的chkconfig 命令来为Linux 环境设置自动启动daemon,Gentoo 不支持,需要手工配置。

# rc-update add db2icd default 
安装中文帮助文档包

命令行安装仅仅安装基本的英文版本,如果需要中文,手工运行:

# rpm -ivh --nodeps db2/linux/IBM_db2decn81-8.1.0-64.i386.rpm 

繁体中文:IBM_db2detw81-8.1.0-64.i386.rpm 

Truableshooting

GUI安装:Installing DB2 file sets:.......Failure

图形安装方式运行:

# ./db2setup

启动了图形安装界面,services name 和端口使用默认值:db2icserver, 51000,最后一步安装失败,/tmp/db2setup.log 如下:

DB2 Setup log file started at: Sat 01 Mar 2008 01:43:06 AM CST CST
============================================================
Operating system information: Linux 2.6.23-gentoo.#7 PREEMPT Tue Nov 6 17:01:35 CST 2007 i686
Product to install:                        IBM DB2 Information Center
Installation type:                         Custom
Previously Installed Components:        
Selected Components:                    
Languages:                              
Target directory:                          /opt/IBM/db2/V8.1
Space required:                            0 MB
DB2 Information Center Server settings: 
Service Name:                          db2icserver
Port number:                           51000
Checking license agreement acceptance:.......Success
Installing DB2 file sets:.......Failure
ERROR:A major error occurred while installing "IBM DB2 Information Center" on 
this computer. The installation can not continue. If the problem persists 
please contact your technical service representative.
DB2 Setup log file finished at: Sat 01 Mar 2008 01:47:33 AM CST CST
============================================================ 

尚不知如何解决。

命令行安装:error: Failed dependencies:       /opt/IBM/db2/V8.1 is needed by IBM_db2deen81-8.1.0-64.i386

执行命令行安装:

# cd ./261_DOCE_LNX_3264_NLV
# ./db2_install -p DB2.DOCE

提示错误:

   IBM_db2deen81...
error: Failed dependencies:
        /opt/IBM/db2/V8.1 is needed by IBM_db2deen81-8.1.0-64.i386
The installation logfile can be found in /tmp/db2_install_log.16033.
db2_install program terminated prematurely.

这是rpm 包的依赖问题,具体原因不清楚。

临时解决方法:

修改安装目录的文件 261_DOCE_LNX_3264_NLV/db2/linux/db2_install ,573行,为rpm 命令增加参数--nodeps。
573              ( rpm -ivh --nodeps ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1; echo $? > ${TMPRC?} ) | tee -a ${DB2INSTLOG?}
服务端口冲突

如果在系统中安装了多个版本的信息中心,比如同时安装了v8 与v9,那么可能需要考虑以下问题。

信息中心v8 版本的命令行安装脚本不能自动配置服务端口,总是使用默认值51000,可能会与其它版本的信息中心引起冲突(比如在安装v8版本之前安装了v9),需要手工修改 /var/db2/v81/db2icd.conf,挑选一个未被占用的端口,这里使用51002。

## TCP/IP port for DB2 Information Center
DB2_ECLIPSEIC_PORT=51002
## Temporary workspace file location for DB2 Information Center
## Default location is DB2 install location (<DB2DIR>/doc/eclipse)
DB2_ECLIPSEIC_DATA=
## Suggested alternate location 
#DB2_ECLIPSEIC_DATA=/tmp/db2icd/workspace
DB2HELP_DIR=/opt/IBM/db2/V8.1/bin/../doc/eclipse

注意,/opt/IBM/db2/V8.1/cfg/db2ic.conf  是个类似的配置文件,但/etc/init.d/db2icd 并没有使用它,使用的是/var/db2/v81/db2icd.conf。

启动服务失败:su: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

启动服务,输出大量的错误信息,100秒超时后,启动失败。

# /etc/init.d/db2icd start
Initializing startup.
su: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
ps: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
ps: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
sleep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
expr: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
./db2icd: line 204: [: : integer expression expected
... 

此问题由daemon脚本使用的Java 虚拟机版本和内核环境参数引起。

/etc/init.d/db2icd 使用安装程序自带的Java虚拟机,版本为1.3.1。

# /opt/IBM/db2/V8.1/doc/eclipse/jre/bin/java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1)
Classic VM (build 1.3.1, J2RE 1.3.1 IBM build cxia32131-20031021 (JIT enabled: jitc))

/etc/init.d/db2icd 为Linux 环境设置了内核环境参数。

LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL 

完成下面2个步骤可以解决问题:

  1. 修改daemon脚本,更换为系统的Java虚拟机
  2. 修改daemon脚本,取消内核环境参数 LD_ASSUME_KERNEL

我的系统中安装两个版本的Java 环境,经测试,任何一个都可以,关于如何切换Java 环境版本,可参考 Gentoo Linux on T43 (12) Java 环境

# java-config -L
The following VMs are available for generation-2:
*)      IBM JDK 1.4.2.9 [ibm-jdk-bin-1.4]
2)      IBM JDK 1.5.0.5a [ibm-jdk-bin-1.5] 

我的内核版本是2.6.23-gentoo:

# uname -svr
Linux 2.6.23-gentoo #7 PREEMPT Tue Nov 6 17:01:35 CST 2007

两处代码更改如下: 

# diff /etc/init.d/db2icd /etc/init.d/db2icd.bak
76,77c76
< #     DB2HELP_JRE="$DB2HELP_DIR/jre/bin/java"
<       DB2HELP_JRE="java"
---
>       DB2HELP_JRE="$DB2HELP_DIR/jre/bin/java"
195,196c194,195
<              #LD_ASSUME_KERNEL=2.4.19
<              #export LD_ASSUME_KERNEL
---
>              LD_ASSUME_KERNEL=2.4.19
>              export LD_ASSUME_KERNEL 

通过http://localhost:51002 访问DB2 Information Center v8.2 成功。

安装路径与卸载问题 

DB2 数据库v8 版本安装不允许修改安装路径/opt/IBM/db2/V8.1/(Solaris 平台除外),同样,信息中心v8 也是如此,虽然其安装脚本db2_install 具有-d 参数,但指定安装目录无效,无论如何都安装在默认目录/opt/IBM/db2/V8.1,会与DB2 数据库v8 混在一起,如果执行Information Center 的卸载程序db2_deinstall,也会将DB2 数据库v8 一并卸载掉,这点需要特别注意。

如果意外卸载了DB2 数据库 v8,用原有的选项重新安装即可,无须重新创建或者修改实例。

Post a comment

mail.png


相似文章|Related Entries

最近更新|Recent Entries

不定期更新|Handy Entries

相似标签|Related Tags

db2
gentoo (18)
linux (20)
SQL0969N (1)
SQLEUCCM (1)
gentoo
3d (1)
chinese (2)
conf (1)
db2 (2)
driver (2)
emerge (0)
environment (1)
fingerprint reader (1)
Fn (1)
fonts (1)
hdaps (1)
java (1)
jdk (1)
kernel configuration (1)
linux (20)
locale (1)
picasa (1)
portage (0)
ramdisk (2)
rebuildpkgdb (1)
soundcard (0)
subversion (2)
svn (1)
t43 (12)
thinkpad (12)
tmpfs (1)
wine (1)
wireless (1)
x300 (1)
中文 (1)
指纹 (1)
软件 (1)
linux
3d (1)
chinese (2)
conf (1)
db2 (2)
driver (2)
emerge (0)
environment (1)
fingerprint reader (1)
Fn (1)
font (1)
fonts (1)
gentoo (18)
Gentoo (1)
hdaps (1)
java (1)
jdk (1)
kernel configuration (1)
locale (1)
picasa (1)
portage (0)
ramdisk (2)
rebuildpkgdb (1)
soundcard (0)
subversion (2)
svn (1)
t43 (12)
thinkpad (12)
tmpfs (1)
wine (1)
winxp (4)
wireless (1)
x300 (1)
中文 (1)
指纹 (1)
软件 (1)

分类栏目|Categories

按月归档|By Month

2008
07
05
04
03
02
01
2007
12
10
07
06
05
04
03
02
01
2006
12
11
10
09
08
07
06
05
04
03
02
01
2005
11
10
09
08
07
04
03
2004
12
11
10
09
08
07
06
05
04
03
02
01
2003
12
10
09
08
06
2002
09
08
04
03
02
2001
12
09
07
06
05

站内链接|Site Links

Powered by
Movable Type 3.34