近日突然想搞一下IBM 的 db2 数据库,第一步当然是安装啦,翻了好几篇文档,大致了解一些安装方式,开始以为应该像Oracle一样建一个普通用户,然后一切安装都在这个用户中进行,虽然db2 也可以这样做,但是貌似限制挺多,作为一个初学者没必要打击自信心,还是老老实实使用最简单的方法用 root 用户运行 db2setup 安装吧。
我的系统是CentOS 4.7,内核 2.6.9 ,./db2setup 会报错,不过报错信息也给出了解决方案。
IBM db2 的 fixpack 貌似就是一个完整的安装包,不用安装基础版本,下载了 db2 server v9.7 fp1 之后直接解压就可以开始装了。
以上两个界面还是比较清新的,看着也是比较养眼的,但是接下来的界面就让人大跌眼镜了。
其实整个过程也是非常简单的,填几个密码一路next就可以了,安装完之后,关闭和启动db2都有一行提示:
[db2inst1@test01 ~]$ db2stop db2stop: /lib64/libpam.so.0: no version information available (required by /opt/ibm/db2/V9.7/lib64/libdb2e.so.1) /home/db2inst1/sqllib/adm/db2stop2: /lib64/libpam.so.0: no version information available (required by /opt/ibm/db2/V9.7/lib64/libdb2e.so.1) 08/18/2010 10:55:16 0 0 SQL1064N DB2STOP processing was successful. SQL1064N DB2STOP processing was successful. [db2inst1@test01 ~]$ [db2inst1@test01 ~]$ db2start db2start: /lib64/libpam.so.0: no version information available (required by /opt/ibm/db2/V9.7/lib64/libdb2e.so.1) /home/db2inst1/sqllib/adm/db2star2: /lib64/libpam.so.0: no version information available (required by /opt/ibm/db2/V9.7/lib64/libdb2e.so.1) 08/18/2010 10:56:42 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful. [db2inst1@test01 ~]$
老是出现 /lib64/libpam.so.0 ........ no version information available 。
貌似是由于 libpam 的版本太久所致,rpm 升级,太多依赖i文件,yum 升级无果,于是重新装系统CentOS 5.5 再来一次,问题解决:
[db2inst1@test01 ~]$ db2stop 08/18/2010 15:03:03 0 0 SQL1064N DB2STOP processing was successful. SQL1064N DB2STOP processing was successful. [db2inst1@test01 ~]$ db2start 08/18/2010 15:03:09 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful.
db2的安装过程一模一样,就不再贴图了。