在IBM上查到:
DB2 v8.1由于java虚拟机版本不被支持,所以安装使用db2setup无法安装。翻译并记录下来
Red Hat Enterprise Linux好像支持jvm 在1.4.1以上,因此需要替换v8.1安装介质中的jvm.建议:IBM version of the Java SDK 1.4.1(我使用的是Sun SDK 1.4.2_04分为两个步骤:1. java SDK 安装。2. DB2安装)
java SDK
- 下载SDK (sun,ibm都有,具体网址忘了,以后再补吧)
- 安装SDK rpm -ivh j2sdk-1_4_2_04-linux-i586-rpm (我下的是:j2sdk-1_4_2_04-linux-i586-rpm.bin 在linux下拷贝到本机,运行:./j2sdk-1_4_2_04-linux-i586-rpm.bin。然后rpm安装即可)
- 修改/etc/profile文件,配置java路径(包括JAVA_HOME、CLASSPATH、path)注意大小写。
DB2
- copy 介质到硬盘上,主要目的是可以修改自带的jvm (如: cp -R /media/cdrom/* <temporary_directory>)
- 删除 db2/linux/java 的目录 (如: rm -Rf <temporary_directory>/db2/linux/java)
- 创建“java”link指到Java1.4.1的目录 (如.: ln -s /opt/IBMJava2-141 /<temporary_directory>/db2/linux/java)
- 安装了... (e.g.: <temporary_directory>/db2setup)
IBM原文:(http://www-306.ibm.com/software/data/db2/linux/validate/rhel3faq.html)
Yes, there is a workaround. However it is not officially supported by IBM and is therefore provided for informational purposes only. You could use IBM's version of the Java 1.4.1 environment instead of 1.3.1 that is shipped with the DB2 install image. Note that IBM does not support either 1.3.1 or 1.4.1 (SR1) on RHEL 3 yet. To use this unsupported workaround, you first need to install the IBM version of the Java SDK 1.4.1. Depending on which version of the DB2 install image/CD you have, perform the following steps.
If you have a DB2 UDB V8.1 GA (or level prior to 8.1.4) install image/CD:
- Copy its contents to the hard disk (e.g.: cp -R /media/cdrom/* <temporary_directory>) where the <temporary_directory> is large enough to hold the install image.
- Delete the db2/linux/java sub-directory.
(e.g.: rm -Rf <temporary_directory>/db2/linux/java)
- Create a symbolic link called java to point to the Java 1.4.1 directory.
(e.g.: ln -s /opt/IBMJava2-141 /<temporary_directory>/db2/linux/java)
- Ensure the DISPLAY is exported properly and launch the installer.
(e.g.: <temporary_directory>/db2setup)
If you have DB2 install image / CD refreshed at Version 8.1.4 or later:
- Set the following environment variables: export DB2USELOCALJRE=TRUE
export JAVA_HOME=<path to 1.4.1 JVM>
(e.g.: export JAVA_HOME=/opt/IBMJava2-141)
- Launch db2setup from the same shell