虚拟机上的ubuntu上装db2的经历

ubuntu 版本   8.04

db2      版本   db2exc_971_LNX_x86.tar.gz

首先申明一点,我linux新手,对linux的了解仅限于一些常用的基本命令。

首先安装 VMware    ,我安装了很多版本,什么绿色版,官方版,都安装不过,不知道是什么原因,都有或多或少的问题,最后是到官方去下载的 6.0.2的版本,才安装成功了。

ubuntu 的安装,首先是我同事传我一个64位的ubuntu server版 ,当时我不知道32位的pc机上不能安装64位的系统,老是报错,后来到 http://download.chinaunix.net/下了一个32为的server 版ubuntu,安好过后,始终没得图形界面出来,我也不晓得是我没装成功还是设置的问题,后来才上网查才晓得是没有图形界面包。

最后就是装数据库了,数据库的iso 是到bm 的官方下载的免费版。安装的时候, su -  root 切换到root 用户是不能启动安装程序的 十分迷惑,不晓得是为撒子 ,如果用sudo 。。。。。。直接以管理员的身份就可以,su - root 方法的错误提示如下

root@ubuntu:/home/ubuntu/expc# . db2setup

basename: invalid option -- s

Try `basename --help' for more information.

dirname: invalid option -- s

Try `dirname --help' for more information.

DBI1189E There has been an attempt to use db2setup 

on an image for a platform that does not match the current platform 

'Linux/x86-32' on which it is being run.

Explanation:

Possible causes include:

- This DB2 install image is not valid for the current 

platform.

- The current platform is not supported by  DB2.

User Response:

Install DB2 using the DB2 install image that corresponds 

with the current platform 'Linux/x86-32'.  


因为我确定我的linux 系统是x86 32位的系统,所以,我就把错误范围缩小了,想来想去 换成sudo 执行就行了。

然后点击下一步。。。。。很多个下一步,db2就转好了。哈哈

现在问题又出来了,我运用db2start ,系统提示 commond not find,我差点就崩溃了,他妈的好不容易装好了,结果找不到命令,想死的心都有了,不过又迅速的消失了。这个问题是因为 db2inst1 /sqllib/db2profile 这个文件需要执行以下,具体的方法是输入命令:  . /home/ubuntu/db2inst1 /sqllib/db2profile  ,ok 问题解决。。
 

db2start 成功,toad也连接上了。。

猜你喜欢

转载自crackajackk.iteye.com/blog/767789
db2