DB2 10.1 安装

[root@DB2 cd1]# ./db2_install
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.1

***********************************************************
Install into default directory (/opt/ibm/db2/V10.1) ? [yes/no] (选择YES)
yes


Specify one of the following keywords to install DB2 products.(选择ESE)

ESE
CLIENT
RTCL

Enter "help" to redisplay product names.

Enter "quit" to exit.

***********************************************************
ese
***********************************************************
Do you want to install the DB2 pureScale Feature? [yes/no] (选择NO)
no
DB2 installation is being initialized.

Total number of tasks to be performed: 46
Total estimated time for all tasks to be performed: 1403 second(s)

Task #1 start
Description: Checking license agreement acceptance
Estimated time 1 second(s)
Task #1 end

Task #2 start
Description: Base Client Support for installation with root privileges
Estimated time 3 second(s)
Task #2 end

Task #3 start
Description: Product Messages - English
Estimated time 13 second(s)
Task #3 end

Task #4 start
Description: Base client support
Estimated time 231 second(s)
Task #4 end

Task #5 start
Description: Java Runtime Support
Estimated time 153 second(s)
Task #5 end

Task #6 start
Description: Java Help (HTML) - English
Estimated time 7 second(s)
Task #6 end

Task #7 start
Description: Base server support for installation with root privileges
Estimated time 7 second(s)
Task #7 end

Task #8 start
Description: Global Secure ToolKit
Estimated time 60 second(s)
Task #8 end

Task #9 start
Description: Java support
Estimated time 12 second(s)
Task #9 end

Task #10 start
Description: SQL procedures
Estimated time 3 second(s)
Task #10 end

Task #11 start
Description: ICU Utilities
Estimated time 59 second(s)
Task #11 end

Task #12 start
Description: Java Common files
Estimated time 18 second(s)
Task #12 end

Task #13 start
Description: Base server support
Estimated time 366 second(s)
Task #13 end

Task #14 start
Description: Control Center Help (HTML) - English
Estimated time 13 second(s)
Task #14 end

Task #15 start
Description: Connect support
Estimated time 3 second(s)
Task #15 end

Task #16 start
Description: Relational wrappers common
Estimated time 3 second(s)
Task #16 end

Task #17 start
Description: DB2 data source support
Estimated time 6 second(s)
Task #17 end

Task #18 start
Description: Spatial Extender server support
Estimated time 16 second(s)
Task #18 end

Task #19 start
Description: IBM Software Development Kit (SDK) for Java(TM)
Estimated time 46 second(s)
Task #19 end

Task #20 start
Description: DB2 LDAP support
Estimated time 4 second(s)
Task #20 end

Task #21 start
Description: DB2 Instance Setup wizard
Estimated time 19 second(s)
Task #21 end

Task #22 start
Description: Integrated Flash Copy Support
Estimated time 3 second(s)
Task #22 end

Task #23 start
Description: Spatial Extender client
Estimated time 3 second(s)
Task #23 end

Task #24 start
Description: Communication support - TCP/IP
Estimated time 3 second(s)
Task #24 end

Task #25 start
Description: Base application development tools
Estimated time 35 second(s)
Task #25 end

Task #26 start
Description: DB2 Update Service
Estimated time 4 second(s)
Task #26 end

Task #27 start
Description: Parallel Extension
Estimated time 3 second(s)
Task #27 end

Task #28 start
Description: EnterpriseDB code
Estimated time 4 second(s)
Task #28 end

Task #29 start
Description: Replication tools
Estimated time 54 second(s)
Task #29 end

Task #30 start
Description: Sample database source
Estimated time 4 second(s)
Task #30 end

Task #31 start
Description: The DB2 required component.
Estimated time 3 second(s)
Task #31 end

Task #32 start
Description: DB2 Text Search
Estimated time 90 second(s)
Task #32 end

Task #33 start
Description: Command Line Processor Plus
Estimated time 6 second(s)
Task #33 end

Task #34 start
Description: Informix data source support
Estimated time 4 second(s)
Task #34 end

Task #35 start
Description: First Steps
Estimated time 3 second(s)
Task #35 end

Task #36 start
Description: Product Signature for DB2 Enterprise Server Edition
Estimated time 6 second(s)
Task #36 end

Task #37 start
Description: Setting DB2 library path
Estimated time 180 second(s)
Task #37 end

Task #38 start
Description: Installing or updating DB2 HA scripts for IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP)
Estimated time 40 second(s)
Task #38 end

Task #39 start
Description: Compiling GPL
Estimated time 30 second(s)
Task #39 end

Task #40 start
Description: Executing control tasks
Estimated time 20 second(s)
Task #40 end

Task #41 start
Description: Updating global registry
Estimated time 20 second(s)
Task #41 end

Task #42 start
Description: Starting DB2 Fault Monitor
Estimated time 10 second(s)
Task #42 end

Task #43 start
Description: Updating the db2ls link
Estimated time 1 second(s)
Task #43 end

Task #44 start
Description: Registering DB2 licenses
Estimated time 5 second(s)
Task #44 end

Task #45 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #45 end

Task #46 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #46 end

Task #47 start
Description: Registering DB2 Update Service
Estimated time 30 second(s)
Task #47 end

Task #48 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #48 end

The execution completed successfully.(完成安装)

For more information see the DB2 installation log at
"/tmp/db2_install.log.30111".
==============================================================================
[root@DB2 cd1]# cd /opt/ibm/db2/V10.1/instance/
[root@DB2 instance]# ./dascrt -u dasusr (指定DB2管理者为dasusr用户)
DBI1070I Program dascrt completed successfully.

==============================================================================
[root@DB2 instance]# ./db2icrt -p 50001 -u db2fenc db2inst
DBI1446I The db2icrt command is running, please wait.


DB2 installation is being initialized.

DB2 pureScale instance creation requires you specify either an instance shared
device path or an instance shared directory. For more information regarding an
instance shared device path or an instance shared directory, see DB2
Information Center.

A major error occurred during the execution that caused this program to
terminate prematurely. If the problem persists, contact your technical service
representative.

For more information see the DB2 installation log at "/tmp/db2icrt.log.19964".
DBI1264E Errors were encountered in running db2icrt. Please
refer to the installation log file /tmp/db2icrt.log.19964 for more
information.

Explanation:

All processed and failed operations have been saved into this log file.

User response:

Do not modify this file in any way. This file is for IBM Technical
Support reference.

Last login: Thu Apr 23 10:32:59 2015 from 192.168.52.56
[root@DB2 ~]# cat /tmp/db2icrt.log.19964

DB2 Setup log file started at: Thu Apr 23 11:06:14 2015 CST
==============================================================================

[root@DB2 instance]# ./db2icrt -p 50001 -u db2fenc db2inst 创建实例指定端口号)
DBI1446I The db2icrt command is running, please wait.


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 #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end

Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end

Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end

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.1635".
DBI1070I Program db2icrt completed successfully. (实例创建成功)
============================================================================

[root@DB2 instance]# su - db2inst (切换到db2inst用户)
[db2inst@DB2 ~]$ db2iauto -on db2inst)
[db2inst@DB2 ~]$ db2start(打开实例
04/23/2015 11:38:11 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
============================================================================

[db2inst@DB2 ~]$ pwd (创建库)
/home/db2inst

[db2inst@DB2 ~]$ db2 create database action using codeset UTF-8 territory cn
(创建action库)
DB20000I The CREATE DATABASE command completed successfully. (成功创建)
[db2inst@DB2 ~]$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 10.1.0

You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd

For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.

To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with ‘db2‘.
To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, refer to the Online Reference Manual.

db2 => connect to action (连接action库)

Database Connection Information

Database server = DB2/LINUXX8664 10.1.0
SQL authorization ID = DB2INST
Local database alias = ACTION

db2 => [db2inst@DB2 ~]$ su - dasusr
Password:
[dasusr@DB2 ~]$ db2admin start
SQL4406W The DB2 Administration Server was started successfully.(启动)
安装完成DB2
DB2相关其他命令
db2 get dbm cfg | grep -i service
db2 update database manager configuration using svcename db2inst
db2set -all
db2set db2comm=tcpip
vi /etc/services
db2inst port/tcp

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。