DB2 setting in linux

Install db2 in linux, you can use a GUI mode or cmd mode.
GUI mode always needs a jre.
CMD mode do not need it.
This article will tell mainly about CMD mode install.

1.Run the install.sh to install.
2.Copy license file
     / /adm/db2licm -a /mnt/cd/db2/license/db2ese.lic
3.Enable SMS
    /opt/IBM/db2/V8.1/cfg/db2ln
4.Add group:
    groupadd db2iadm1
    groupadd db2fadm1
    groupadd db2usrgp
    
    the first one is for instance user, second one is for fence user, third one is for normal user.
5.Add user:
    useradd -g db2iadm1 -d /home/db2inst1 -m db2inst1
    useradd -g db2fadm1 -d /home/db2fenc1 -m db2fenc1

    the first user is for instance, second one is for fence. The option -d -m is to create its home folder.


6.Create instance
     / /instance/db2icrt -a server -u db2fenc1 db2inst1

    that means create a instance using fence user as db2fenc1 instance user as db2inst1
7.Config db2setting
    su db2inst1

    First to switch to instance user to run db2 commands.

    db2set
    For example:
        db2set DB2_EXTENDED_OPTIMIZATION=ON
        db2set DB2_DISABLE_FLUSH_LOG=ON
        db2set AUTOSTART=YES
        db2set DB2_STRIPED_CONTAINERS=ON
        db2set DB2_HASH_JOIN=Y
        db2set DB2COMM=tcpip
        db2set DB2_PARALLEL_IO=*
        db2set DB2CODEPAGE=819
8.Update dbm cfg
    db2 update dbm cfg using SVCENAME db2inst1
    db2 update dbm cfg using INDEXREC ACCESS
    
    Pay attention that the SVCENAME will be the name using in /etc/services
9.Add service port
    echo "db2inst1         50000/tcp">>/etc/services

    You can also edit the /etc/services to add the words.
    Pay attention that the db2inst1 is SVCENAME db2inst1
10.Start db2
    db2start

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值