一、用root用户,解压安装文件,进入到server目录下检测安装环境
./db2prereqcheck
[root@bogon server]# ./db2prereqcheck
WARNING:
The 32 bit library file libstdc++.so.6 is not found on the system.
32-bit applications may be affected.
二 、配置本地yum源
mkdir /iso //创建yum源文件夹
mount /dev/cdrom /iso //把本地光盘挂载到建好的yum源文件夹上
cd /etc/yum.repos.d/
cp rhel-source.repo iso.repo
//配置yum源的配置文件
cat iso.repo
#yun源的名字,做到全局唯一不重复
[rhel-iso]
#注释信息
name=Red Hat Enterprise Linux $releasever - $basearch - Source
#yum源的路径,支持三种协议:http、ftp、file,其中file表示本地文件,/iso才是真实路径
baseurl=file:///iso
#1表示启用,0表示禁用
enabled=1
#指纹校验,为0表示不校验
gpgcheck=0
#校验参考的文件
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
检查yum源是否配置好了
[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@localhost yum.repos.d]# ll
total 8
-rw-r--r--. 1 root root 173 Jul 23 19:09 iso.repo
-rw-r--r--. 1 root root 529 Apr 28 2011 rhel-source.repo
#可以测试是否配置成功,还可以进入iso查看是否有文件
[root@larrywen yum.repos.d]# yum grouplist|grep Devel
Additional Development
Desktop Platform Development
Development tools
Server Platform Development
[root@bogon server]# ./db2prereqcheck
WARNING:
The 32 bit library file libstdc++.so.6 is not found on the system.
32-bit applications may be affected.
[root@bogon server]# yum install libstdc++.so.6
iso.repo
[bendi]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///iso
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
三、在安装完rmp包之后,安装db2数据库,会遇到的问题。
prereqSAM: OPTIONS = '-l /tmp/prereqSAM.log.15049 --noliccheck --silent
'
prereqSAM: OPT_SILENT = 1
prereqSAM: OPT_NOLICCHECK = 1
prereqSAM: Detected operating system: Linux
prereqSAM: Detected architecture: i386x
prereqSAM: Detected distribution: RH
prereqSAM: Supported operating system versions: RH Linux i386x - 4.6 5.0
prereqSAM: Detected operating system version:
Red Hat Enterprise Linux Server release 6.5 (Santiago)
prereqSAM: Error: None of the supported operating system versions matched the ve
rsion detected for the operating system: RH Linux i386x
prereqSAM: Supported operating system versions: RH Linux i386x - 4.6 5.0
prereqSAM: Detected operating system version:
Red Hat Enterprise Linux Server release 6.5 (Santiago)
prereqSAM: Error: Prerequisite checking for the ITSAMP installation failed: Lin
ux i386x RH
Red Hat Enterprise Linux Server release 6.5 (Santiago)
prereqSAM: Most severe error code returned: 22
prereqSAM: The operating system has a version that is not supported.
官方解释如下:
这个错误消息是有关Tivoli Systems Automation (TSA) 的,对DB2的核心功能一般情况下没有什么影响。
有一种情况会产生影响,就是当做HADR的时候(就是这个 High Availability features ),当其中1台机器失败时,不能自动路由跳转到另外一台机器继续提供DB服务。
这个也是仅仅在HADR使用TSA作为跳转。如果不试用TSA组件,那么这个错误完全可以忽略不计。
如果真的需要使用TSA功能。(或者有些人实在强迫症,看不得报错?)那么可以手动执行installSAM脚本安装这个(SA MP),具体请看
Installing IBM Tivoli System Automation for Multiplatforms (SA MP) Base Component using the installSAM install script
这个链接叫:使用 installSAM 安装脚本来安装 IBM Tivoli System Automation for Multiplatforms (SA MP) Base Component ,这个就不继续往下了,Tivoli以后再说吧。
所以这里可以选择 不安装SAMP
四、创建数据库实例时以下错误
/opt/ibm/db2/V9.7/instance/db2icrt -a SERVER -u db2fenc1 db2inst1
/opt/ibm/db2/V9.7/instance/db2iutil: line 5219: 28676 段错误 (core dumped) ${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}
^C
Session terminated, killing shell... ...killed.
DBI1066E Program db2icrt terminated by request.
Explanation:
This program has been terminated by the user.
User response:
Issue the same command to restart the program.
/opt/ibm/db2/V9.7/instance/db2iutil: line 2526: DB2INSTVER: parameter null or not set
解决方法:
原因是服务器的主机名有问题,主机名的两个文件中主机名不一致,修改主机名,删除实例重新创建
删除实例 /opt/ibm/db2/V9.7/instance/db2idrop -f db2inst1
删除 rm -rf /home/db2inst1/sqllib