LINUX安装db2V10.5步骤

Stella981
• 阅读 962

db2命令

DB2开启监控

LINUX安装db2V10.5步骤

2017-04-01 10:08:35|  分类: db2 |举报 |字号 订阅

       LINUX安装db2V10.5步骤

LINUX安装db2V10.5步骤

下载LOFTER 我的照片书  |转自:http://blog.csdn.net/hanzheng260561728/article/details/50878666
Install
DB2 10.5 on Redhat Linux 6.5 for x86_64

Byadmin-Last updated:Tuesday, June 10, 2014 -Save
& Share
-Leave a Comment

Install DB2 10.5 on Redhat Linux 6.5 for x86_64

近期发现在互联网上关于DB2 10.5的安装资料还是很少,如是打算发一篇关于DB2 10.5在Redhat Linux 6.5上安装的步骤,其实其安装和DB2以前的安装过程类似,简要的安装步骤如下,供参考。

1.安装配置环境

操作系统版本: Red Hat Enterprise Linux Server release 6.5 (Santiago) 数据库版本: DB2/LINUXX8664 10.5.3

[root@xuhz ~]# uname -a

Linux xuhz 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@xuhz ~]# uname -r

2.6.32-431.el6.x86_64

[root@xuhz ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.5 (Santiago)

2.安装数据库软件

2.1 上传安装软件和license文件到某文件夹

[root@xuhz ~]# cd /software/

[root@xuhz software]# ls -l

total 1359328

drwxrwxrwx. 6 honcho honcho 4096 Jun 9 05:05 aese_c

-rwxrwxrwx. 1 honcho honcho 1391940725 Jun 9 05:05 DB2_Svr_10.5.0.3_Linux_x86-64PVU.tar.gz

2.2 解压缩安装包

[root@xuhz software]# gunzip DB2_Svr_10.5.0.3_Linux_x86-64PVU.tar.gz

[root@xuhz software]# tar -xvf DB2_Svr_10.5.0.3_Linux_x86-64PVU.tar

2.3 安装前预检测

[root@xuhz software]# ls -l

drwxrwxrwx. 6 honcho honcho 4096 Jun 9 05:05 aese_c

-rwxrwxrwx. 1 honcho honcho 1560576000 Jun 9 05:05 DB2_Svr_10.5.0.3_Linux_x86-64PVU.tar

drwxr-xr-x. 5 root root 4096 Feb 7 08:33 server

[root@xuhz software]# cd server/

[root@xuhz server]# ls

db2 db2checkCOL_readme.txt db2checkCOL.tar.gz db2ckupgrade db2_deinstall db2_install db2ls db2prereqcheck db2setup ibm_im installFixPack nlpack

[root@xuhz server]# ./db2prereqcheck -v 10.5.0.3 -s -o /tmp/db_check.log

Requirement not matched for DB2 database "Server" . Version: "10.5.0.3".

Summary of prerequisites that are not met on the current system: DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*".

DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "libstdc++.so.6".

Requirement not matched for DB2 database "Server" with pureScale feature. Version: "10.5.0.3".

Summary of prerequisites that are not met on the current system: DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*".

DBT3588W The db2prereqcheck utility was unable to validate the configuration of the log_mtts_per_seg parameter on the following host machine: "xuhz". Reason code: "1".

DBT3566E The db2prereqcheck utility detected that the service named "rdma" is not enabled on host "xuhz".

DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "libstdc++.so.6".

DBT3563E The db2prereqcheck utility determined that SELinux is enabled, which is not supported with GPFS.

上述报错IBM 给出了如下解释:

DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: library-file-name. Explanation You can verify installation prerequisites for DB2 database using the db2prereqcheck utility. This message is returned when the db2prereqcheck utility cannot find the 32-bit version of a required library file. If the named file is missing, 32-bit database applications might not function properly. User response Respond to this message in one of the following ways: 1> If you do not intend to use 32-bit applications with DB2 database, then no response is required. 2> If you do intend to use 32-bit applications with DB2 database, ensure that the named 32-bit library file exists on the system before installing DB2 database.

目前平台不打算使用32bit applications,故可以忽略以上警告信息。

2.4 采用命令行来安装数据库软件

[root@xuhz server]# ./db2_install

Requirement not matched for DB2 database "Server" . Version: "10.5.0.3".

Summary of prerequisites that are not met on the current system:

DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*".

DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "libstdc++.so.6".

DBI1324W Support of the db2_install command is deprecated. For

more information, see the DB2 Information Center.

Default directory for installation of products - /opt/ibm/db2/V10.5

***********************************************************

Install into default directory (/opt/ibm/db2/V10.5) ? [yes/no] -------------------- 这里选择安装目录,选择推荐目录即可

yes

Specify one of the following keywords to install DB2 products.

SERVER

CONSV

EXP

CLIENT

RTCL

Enter "help" to redisplay product names. --------------- 选择安装产品类型,这里选择SERVER

Enter "quit" to exit.

***********************************************************

SERVER

***********************************************************

Do you want to install the DB2 pureScale Feature? [yes/no] ---------------- 选择是否安装pureScale功能,这里选择不安装

no

Requirement not matched for DB2 database "Server" . Version: "10.5.0.3".

Summary of prerequisites that are not met on the current system:

DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*".

DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "libstdc++.so.6".

DB2 installation is being initialized.

Total number of tasks to be performed: 48

Total estimated time for all tasks to be performed: 1873 second(s)

Task #1 start

Description: Checking license agreement acceptance

Estimated time 1 second(s)

Task #1 end

...................................................................................................................

...................................................................................................................

Task #50 start

Description: Updating global profile registry

Estimated time 3 second(s)

Task #50 end

The execution completed successfully.

For more information see the DB2 installation log at

"/tmp/db2_install.log.2881".

2.5 注册liences

[root@xuhz adm]# /opt/ibm/db2/V10.5/adm/db2licm -l

Product name: "DB2 Enterprise Server Edition"

License type: "License not registered"

Expiry date: "License not registered"

Product identifier: "db2ese"

Version information: "10.5"

[root@xuhz adm]# cd /software/aese_c/db2/license

[root@xuhz license]# ls

db2aese_c.lic sam32.lic UNIX Windows

[root@xuhz license]# /opt/ibm/db2/V10.5/adm/db2licm -a db2aese_c.lic

LIC1402I License added successfully.

LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED IN THE FOLLOWING DIRECTORY: "/opt/ibm/db2/V10.5/license/en_US.iso88591"

[root@xuhz license]# /opt/ibm/db2/V10.5/adm/db2licm -l

Product name: "DB2 Advanced Enterprise Server Edition"

License type: "CPU Option"

Expiry date: "Permanent"

Product identifier: "db2aese"

Version information: "10.5"

Enforcement policy: "Soft Stop"

3.配置DB2 Instance

3.1 创建用户和组

用户用途 用户名 用户组

实例所有者 db2inst1 db2iadm1

受防护的用户 db2fenc1 db2fadm1

DB2 管理服务器用户 dasusr1 dasadm1

注:实例所有者主目录是将在其中创建DB2实例的位置;受防护的用户用于在DB2数据库所使用的地址空间之外运行用户定义的函数(UDF)和存储过程;DB2管理服务器用户的用户标识用于在系统上运行DB2管理服务器。

[root@xuhz ~]# groupadd db2iadm1

[root@xuhz ~]# groupadd db2fadm1

[root@xuhz ~]# groupadd dasadm1

[root@xuhz ~]# useradd -u 600 -g db2iadm1 -m -d /home/db2inst1 db2inst1

[root@xuhz ~]# useradd -u 601 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1

[root@xuhz ~]# useradd -u 602 -g dasadm1 -m -d /home/dasusr1 dasusr1

[root@xuhz ~]# passwd db2inst1

Changing password for user db2inst1.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

[root@xuhz ~]# passwd db2fenc1

Changing password for user db2fenc1.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

[root@xuhz ~]# passwd dasusr1

Changing password for user dasusr1.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

3.2 创建DAS

[root@xuhz ~]# cd /opt/ibm/db2/V10.5/instance/

[root@xuhz instance]# ./dascrt -u dasusr1

DBI1070I Program dascrt completed successfully.

注:版本9.7中已经不推荐使用“DB2 管理服务器(DAS)”,在以后的发行版中可能会将其除去。DAS在DB2 pureScale环境中不受支持。

3.3 创建DB2 Instance

[root@xuhz instance]# ./db2icrt -u db2fenc1 db2inst1

DBI1446I The db2icrt command is running.

DB2 installation is being initialized.

Total number of tasks to be performed: 4

Total estimated time for all tasks to be performed: 309 second(s)

.......................................................................................................

.......................................................................................................

Task #4 start

Description: Updating global profile registry

Estimated time 3 second(s)

Task #4 end

The execution completed successfully.

For more information see the DB2 installation log at "/tmp/db2icrt.log.8120".

Required: Review the following log file also for warnings or errors:

"/tmp/db2icrt_local.log.*"

DBI1070I Program db2icrt completed successfully.

[db2inst1@xuhz ~]$ db2ilist

db2inst1

4.配置DB2服务器的TCP/IP通信

4.1 设置DB2服务器的通信协议

[root@xuhz ~]# su - db2inst1

[db2inst1@xuhz ~]$ db2set -all

[i] DB2AUTOSTART=NO

[g] DB2SYSTEM=xuhz

[g] DB2INSTDEF=db2inst1

[g] DB2ADMINSERVER=dasusr1

[db2inst1@xuhz ~]$ db2set DB2COMM=tcpip

[db2inst1@xuhz ~]$ db2set -all

[i] DB2COMM=TCPIP

[i] DB2AUTOSTART=NO

[g] DB2SYSTEM=xuhz

[g] DB2INSTDEF=db2inst1

[g] DB2ADMINSERVER=dasusr1

4.2 更新服务器上services文件

[db2inst1@xuhz ~]$ cat /etc/services |grep DB2

ibm-db2 523/tcp # IBM-DB2

ibm-db2 523/udp # IBM-DB2

questdb2-lnchr 5677/tcp # Quest Central DB2 Launchr

questdb2-lnchr 5677/udp # Quest Central DB2 Launchr

DB2_db2inst1 60006/tcp # DB2 连接服务端口

DB2_db2inst1_1 60007/tcp

DB2_db2inst1_2 60008/tcp

DB2_db2inst1_3 60009/tcp

DB2_db2inst1_4 60010/tcp

DB2_db2inst1_END 60011/tcp

4.3 更新服务器数据库管理文件

[db2inst1@xuhz ~]$ db2 get dbm cfg |grep SVCENAME

TCP/IP Service name (SVCENAME) =

SSL service name (SSL_SVCENAME) =

[db2inst1@xuhz ~]$ db2 update dbm cfg using SVCENAME 60006

DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed

successfully.

[db2inst1@xuhz ~]$ db2 get dbm cfg |grep SVCENAME

TCP/IP Service name (SVCENAME) = 60006

SSL service name (SSL_SVCENAME) =

4.4 验证通信端口状态

[db2inst1@xuhz ~]$ db2start

06/09/2014 19:38:44 0 0 SQL1063N DB2START processing was successful.

SQL1063N DB2START processing was successful.

[db2inst1@xuhz ~]$ netstat -an |grep 60006

tcp 0 0 0.0.0.0:60006 0.0.0.0:* LISTEN

5. 创建数据库

[db2inst1@xuhz ~]$ db2 create db honcho using codeset UTF-8 territory CN pagesize 8192

DB20000I The CREATE DATABASE command completed successfully.

[db2inst1@xuhz ~]$ db2 connect to honcho

Database Connection Information

Database server = DB2/LINUXX8664 10.5.3

SQL authorization ID = DB2INST1

Local database alias = HONCHO

至此,DB2数据库软件安装和数据库实例及数据库创建完成,相比Oracle的安装而言DB2的安装步骤更加简单。

阅读(355)| 评论(0)

点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
待兔 待兔
4个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Wesley13 Wesley13
3年前
P2P技术揭秘.P2P网络技术原理与典型系统开发
Modular.Java(2009.06)\.Craig.Walls.文字版.pdf:http://www.t00y.com/file/59501950(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fwww.t00y.com%2Ffile%2F59501950)\More.E
Wesley13 Wesley13
3年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
3年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
3年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
10个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这