`
chrishyx
  • 浏览: 35338 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Ubuntu下DB2的安装和卸载

阅读更多
安装:
很多人说一定要以root用户,否则不能启动控制中心。我不理解什么意思是sudo su - root,还是直接sudo就可以,反正我两种方法都没有试成功。
那就直接sudo ./db2_setup吧,一步步安装下来。
不要开启Ubuntu的特效,否则无法显示图形界面。

至于打开控制中心,可以这样做:
在一个shell运行xhost+
然后在另一个shell用实例用户登录,再export DISPALY=:0.0,就可以打开db2cc了。

启动的时候需要先以dasusr1用户启动db2admin,db2admin start。
再以db2inst1用户启动db2,db2start。


卸载:
Following are the steps to remove DB2 from Unix/Linux:

1.Remove DB[首先删除数据库]
(1)su - db2inst1
(2)db2 list db directory
(3)db2 drop db <db name>
2.Remove Instance【删除实例】
(1)su - root
(2)cd <db2 dir>/instance
(3)./db2ilist
(4)./db2idrop -f <instance name>
3.Remove das【删除das】
(1)su - root
(2)cd <db2 dir>/instance
(3)./daslist
(4)./dasdrop <das user>
4.Uninstall【卸载】
(1)su - root
(2)cd <db2 dir>/install
(3)./db2_deinstall -a
5.Remove user ( db2inst1,db2fenc1,dasusr1)【删除用户】
userdel -r <username>
please lookinto the file /etc/passwd before and after you deleted users

        STEP1      将/etc/pam.d/common-password文件中下面这行:

                       password success=1 default=ignore pam_unix.so obscure sha512

              替换成:

                      password success=1 default=ignore pam_unix.so obscure md5

        STEP2

                       在SHELL中运行  passwd命令更改密码。

        OK!

   为什么要这样做,_mihai_一语道破天机:

             I am referring to the one the operating system is using to compute the hash for the password.
It is very likely producing a hash that is bigger than what DB2 supports and that is why you are seeing the error.   

              操作系统对密码采取了不同的HASH算法,很可能HASH后的密码串长度超过了DB2支持的最长密码长度。

       所以,_mihai_的建议是:

              You are likely using sha512, change it to sha256 or md5, it should work fine.

               将sha512的HASH算法改为sha256或者md5算法。
分享到:
评论
1 楼 chrishyx 2010-06-29  
        STEP1      将/etc/pam.d/common-password文件中下面这行:

                       password success=1 default=ignore pam_unix.so obscure sha512

              替换成:

                      password success=1 default=ignore pam_unix.so obscure md5

        STEP2

                       在SHELL中运行  passwd命令更改密码。

        OK!

   为什么要这样做,_mihai_一语道破天机:

             I am referring to the one the operating system is using to compute the hash for the password.
It is very likely producing a hash that is bigger than what DB2 supports and that is why you are seeing the error.   

              操作系统对密码采取了不同的HASH算法,很可能HASH后的密码串长度超过了DB2支持的最长密码长度。

       所以,_mihai_的建议是:

              You are likely using sha512, change it to sha256 or md5, it should work fine.

               将sha512的HASH算法改为sha256或者md5算法。

相关推荐

Global site tag (gtag.js) - Google Analytics