抓紧下载v9.7_linuxx64_server.tar.gz,扔到~/Downloads/java_soft
进入到该目录执行
tar -xf v9.7_linuxx64_server.tar.gz
会发现在该目录下多出一个server目录
cd server
sudo ./db2_install -b /opt/ibm/db2/v9.7
按照提示输入
ESE
耐心等待约1分钟,成功!
db2ls
哈哈。列出了我已经安装的两个版本!!!
待续。。。
见~/Downloads/books/db2/DB2学习笔记.doc,从百度文档下的。
没法上传附件。就这样, 写得很详细了。。
建das的时候报错:
root@cyper-pc:/opt/ibm/db2/v9.7/instance# useradd -g db2agrp -u 803 -d /home/db2das -m -s /bin/sh db2das
root@cyper-pc:/opt/ibm/db2/v9.7/instance# passwd db2das
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@cyper-pc:/opt/ibm/db2/v9.7/instance# ./dascrt -u db2das
-su: 1: /home/db2das/das/bin/db2admin: Permission denied
DBI1070I Program dascrt completed successfully.
To fix it we must change /opt/ibm/db2/V9.7/instance/dasutil line 221 to
mkpermission "u=rwx,g=rxs,o=rx,+t" ${PATHNAME?}
root@cyper-pc:/opt/ibm/db2/v9.7/instance# ./dascrt -u db2das
SQL4406W The DB2 Administration Server was started successfully.
DBI1070I Program dascrt completed successfully.
又发现了一个问题,切换到db2inst1用户后, terminal极其难用。。
解决办法在这里:http://stackoverflow.com/questions/4545633/terminal-problem-with-new-user-in-linux
Change the users shell to/bin/bash, instead of/bin/sh.
# usermod -s /bin/bash YourDB2User
Since some time now, both Debian and Ubuntu usesdashto provide /bin/sh, which doesn't have all the features like bash, but provides a more accurate interpretation of the bourne shell, from what I understand.
果然就好用了。。。 /bin/bash比/bin/sh好用多了!!!!!
参考:http://wiki.ejbca.org/db2onus
来源:oschina
链接:https://my.oschina.net/u/113421/blog/101378