DB2 DPF 测试环境搭建

克服了无数小问题后,终于搭建起来测试环境了
总的教程:
[url]http://www.ibm.com/developerworks/data/library/techarticle/dm-0504mcarthur/index.html[/url]

[b]1.Server准备
2.文件系统
3.建立实例
4.rsh
5.测试[/b]

环境:
Server:
test64bit00
test64bit01

node:
0 test64bit00 0
1 test64bit00 1
2 test64bit01 0
3 test64bit01 1

User ID:
dpfinst1:x:1004:999::/db2home/dpfinst1:/bin/bash
dpffen1:x:1003:998::/db2home/dpffen1:/bin/bash
dpfdas1:x:1002:997::/home/dpfdas1:/bin/bash

Share home path:
/db2home


[b]1.Server准备[/b]

现在vmware装好DB2,建好用户,然后使用clone功能复制多一台

然后更新各自的IP就好

因为DB2安装路径、版本,用户和组的ID都必须一样,所以这样做既省事又准确


--添加用户
groupadd -g 999 db2iadm1
groupadd -g 998 db2fadm1
groupadd -g 997 dasadm1
useradd -u 1004 -g db2iadm1 -m -d /db2home/dpfinst1 dpfinst1 -p manager1
useradd -u 1003 -g db2fadm1 -m -d /db2home/dpffen1 dpffen1 -p manager1
useradd -u 1002 -g dasadm1 -m -d /home/dpfdas1 dpfdas1 -p manager1
passwd db2inst1
passwd db2fenc1
passwd dasusr1

--补齐包
rpm -ivh rsh-server-0.17-40.el5.x86_64.rpm


--相应的服务
service portmap start
service nfs start
chkconfig rsh on

--更新/etc/hosts
192.168.221.137 test64bit01
192.168.221.136 test64bit00



[b]2.文件系统[/b]
在test64bit00上


mkdir /db2home

--在/etc/fstab里面添加:
/dev/sdc /db2home ext3 defaults 0 0

--在/etc/exports里面添加:
/db2home test64bit00(rw,sync,no_root_squash) test64bit01(rw,sync,no_root_squash)
--允许相应的server进行读写

--应用更改
/usr/sbin/exportfs -a



在test64bit01上

mkdir /db2home

--在/etc/fstab里面添加:
test64bit00:/db2home /db2home nfs rw,timeo=300,retrans=5,hard,intr,bg,nolock,suid

--刷新最新的挂载点
mount -a


现在NFS就弄好了
[code="sql"]
# touch a

# ll a
-rw-r--r-- 1 root root 0 Nov 23 16:58 a
[/code]


[b]3.建立实例[/b]
[code="sql"]
--建立一次就好了
# /opt/ibm/db2/V9.5/instance/db2icrt -u dpffen1 dpfinst1
DBI1070I Program db2icrt completed successfully.

--把db2profile加到bash profile里面
[dpfinst1@test64bit01 ~]$ tail -1 .bash_profile
/db2home/dpfinst1/sqllib/db2profile

--更新相应的连接配置
--在/etc/services里面保证两边相同
# grep -i dpf /etc/services
DB2_dpfinst1 60020/tcp
DB2_dpfinst1_1 60021/tcp
DB2_dpfinst1_2 60022/tcp
DB2_dpfinst1_END 60023/tcp


db2 update dbm cfg using SVCENAME DB2_dpfinst1


db2set DB2COMM=tcpip
[/code]


[b]4.rsh[/b]
更新nodes列表:

[dpfinst1@test64bit00 ~]$ cat sqllib/db2nodes.cfg
0 test64bit00 0
1 test64bit00 1
2 test64bit01 0
3 test64bit01 1


添加rhost

vi /db2home/dpfinst1/.rhosts

test64bit00 dpfinst1
test64bit01 dpfinst1

chmod 600 /db2home/dpfinst1/.rhosts


[b]5.测试[/b]

[dpfinst1@test64bit00 ~]$ db2_all date

Wed Nov 23 17:06:19 CST 2011
test64bit00: date completed ok

Wed Nov 23 17:06:19 CST 2011
test64bit00: date completed ok

Wed Nov 23 17:06:19 CST 2011
test64bit01: date completed ok

Wed Nov 23 17:06:19 CST 2011
test64bit01: date completed ok



[b]PS:途中遇到许多问题,整理了一些:
1.rsh 544 connection refused[/b]

connect to address 192.168.221.137 port 544: Connection refused
Trying krb4 rsh...
connect to address 192.168.221.137 port 544: Connection refused
trying normal rsh (/usr/bin/rsh)
test64bit01: Connection refused


A.首先确保iptables没有打开
B.在/etc/securetty里面添加
rexec
rsh
rlogin
C.去除多余的krb4

cd /usr/kerberos/bin
mv rsh rsh.bak20110602
ln -s /usr/bin/rsh rsh

[url]http://www.manotes.net/?tag=redhat-linux-ssh-port-544-connection-refused[/url]

[b]2.各种NFS的配置[/b]
因为第一次配这个,所以要从头开始
[url]http://www.liusuping.com/ubuntu-linux/Redhat-Linux-NFS-setting.html[/url]
[url]http://server.zdnet.com.cn/server/2007/0831/482007.shtml[/url]

[b]3.SQL5005C,SQL1042C[/b]
在NFS的client端必须要使用nolock的模式mount
不然db2_all反应很慢,报出以下错误:
[code="sql"]
# dmesg -c
lockd: server 192.168.221.136 not responding, timed out
lockd: server 192.168.221.136 not responding, timed out

[dpfinst1@test64bit01 ~]$ db2 list db directory
SQL5005C System Error.

[dpfinst1@test64bit01 ~]$ db2start
SQL1042C An unexpected system error occurred. SQLSTATE=58004
[/code]
[url]http://newyue.blog.51cto.com/174760/562926[/url]
[url]http://linux.die.net/man/5/nfs[/url]
[url]http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0012308.htm[/url]
[url]http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.rn.doc/rn/r0021677.htm[/url]
[url]http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=%2Fcom.ibm.tsiem.doc%2Ftg%2Fkp_sql5005cerrors.html[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值