2010-01-26 Redhat43上安装DB2v82和FixPak

一、安装DB2 v8.2

1.检查内核版本和软件包

[root@redhat-db ~]# cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
Kernel r on an m

[root@redhat-db ~]# uname -a
Linux redhat-db 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:39:47 EDT 2008 i686 i686 i386 GNU/Linux
[root@redhat-db ~]# rpm -q pdksh rsh-server nfs-utils
pdksh-5.2.14-30.6
package rsh-server is not installed
nfs-utils-1.0.6-87.EL4

pdksh和rsh-server软件包为分区数据库环境所需,不使用分区数据库则不必安装。

[@more@]2.配置内核参数

查看共享内存段、信号数组和消息队列限制:

[root@redhat-db ~]# ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384


在/etc/sysctl.conf文件中添加如下内容:

kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024

执行 sysctl -p 命令,使设置生效:

[root@redhat-db ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024
[root@redhat-db ~]# ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 1024
max semaphores per array = 250
max semaphores system wide = 256000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 1024
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384


安装过程略,完成后查看DB2版本。

[db2inst@redhat-db ~]$ db2level
DB21085I Instance "db2inst" uses "32" bits and DB2 code release "SQL08020"
with level identifier "03010106".
Informational tokens are "DB2 v8.1.0.64", "s040812", "MI00086", and FixPak "7".
Product is installed at "/opt/IBM/db2/V8.1".


二、安装FixPak 13

1.停止所有db2进程

使用db2inst用户(instance owner)执行以下操作:

[db2inst@redhat-db ~]$ db2 force applications all
DB20000I The FORCE APPLICATION command completed successfully.
DB21024I This command is asynchronous and may not be effective immediately.

[db2inst@redhat-db ~]$ db2 terminate
DB20000I The TERMINATE command completed successfully.
[db2inst@redhat-db ~]$ db2stop
SQL1064N DB2STOP processing was successful.
[db2inst@redhat-db ~]$ db2licd -end

注:db2licd -end 命令停止DB2许可证服务; db2 terminate 命令停止所有命令行处理器会话。

使用dasusr1用户(DAS owner)执行以下操作:

[dasusr1@redhat-db ~]$ db2admin stop
SQL4407W The DB2 Administration Server was stopped successfully.

使用root用户执行以下操作:

[root@redhat-db ~]# ps -ef | grep db2fm
root 10810 1 0 Jan09 ? 00:00:04 /opt/IBM/db2/V8.1/bin/db2fmcd
dasusr1 10821 1 0 Jan09 ? 00:00:01 /home/dasusr1/das/bin/db2fmd -i dasusr1 -m /home/dasusr1/das/lib/libdb2dasgcf.so
root 21900 17022 0 00:51 pts/1 00:00:00 grep db2fm
[root@redhat-db ~]# /opt/IBM/db2/V8.1/bin/db2fmcu -d
[root@redhat-db ~]# ps -ef | grep db2fm
dasusr1 10821 1 0 Jan09 ? 00:00:01 /home/dasusr1/das/bin/db2fmd -i dasusr1 -m /home/dasusr1/das/lib/libdb2dasgcf.so
root 21906 17022 0 00:51 pts/1 00:00:00 grep db2fm
[root@redhat-db ~]# export DB2INSTANCE=dasusr1
[root@redhat-db ~]# /opt/IBM/db2/V8.1/bin/db2fm -D
[root@redhat-db ~]# ps -ef | grep db2fm
root 22072 17022 0 00:57 pts/1 00:00:00 grep db2fm

注:db2fmcu -d 命令关闭Fault Monitor Coordinator;db2fm -D 命令停止Fault Monitor Daemon。

使用db2inst用户运行以下命令,确保实例所有的DB2 IPC被清除:

[db2inst@redhat-db ~]$ ipclean
ipclean: Removing DB2 engine and client's IPC resources for db2inst.

2.安装

使用root用户执行如下操作:

[root@redhat-db ~]# cd /opt/db2ins
[root@redhat-db db2ins]# tar -xf /media/cdrom/FP13_MI00162.tar
[root@redhat-db db2ins]# ls
db2 db2_deinstall doc installFixPak
[root@redhat-db db2ins]# ./installFixPak -y
Updating ...

Updating to IBM_db2msen81-8.1.2-120.i386.rpm ...
Preparing... ########################################### [100%]
1:IBM_db2msen81 ########################################### [100%]

Updating to IBM_db2cliv81-8.1.2-120.i386.rpm ...
Preparing... ########################################### [100%]
1:IBM_db2cliv81 ########################################### [100%]

Updating to IBM_db2ldap81-8.1.2-120.i386.rpm ...
Preparing... ########################################### [100%]
1:IBM_db2ldap81 ########################################### [100%]

......

Updating to IBM_db2cc81-8.1.2-120.i386.rpm ...
Preparing... ########################################### [100%]
1:IBM_db2cc81 ########################################### [100%]


需要注意Linux下DB2的FixPak是要区分不同系统内核版本的,本例中应该使用针对2.6内核的FixPak。如果使用针对2.4内核的,会提示如下信息:

[root@redhat-db db2ins]# ./installFixPak -y
There has been an attemp to install a DB2 fixpak
supported for the kernel level 2.4 that does not
match the current kernel level 2.6 on which DB2
is being installed.

User Response:

Install DB2 fixpak using the DB2 fixpak image that corresponds
with the current kernel level 2.6.

Please check the following IBM web site for platforms and
kernel level officially supported by IBM DB2 Universal
Database for Linux:

http://www.ibm.com/software/data/db2/linux/validate/

3.升级数据库实例和das实例

使用root用户执行如下操作:

[root@redhat-db db2ins]# cd /opt/IBM/db2/V8.1/instance
[root@redhat-db instance]# ./db2iupdt db2inst
DBI1070I Program db2iupdt completed successfully.


[root@redhat-db instance]# ./dasupdt dasusr1
SQL4410W The DB2 Administration Server is not active.
SQL4406W The DB2 Administration Server was started successfully.
DBI1070I Program dasupdt completed successfully.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11662464/viewspace-1031234/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11662464/viewspace-1031234/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值