Centos7 under Installation DB2

Source: Internet
Author: User

Environment: CENTOS7 Virtual Machine

DB2 Version: 11.1


Recent projects to use the DB2 database, also did not get DB2, download dokcer, some access is restricted, so had to manually set up a.

Fortunately, there is a ready-made version of the DB2 installation on the web for 11.1.

Reference article for this installation: http://www.qingpingshan.com/pc/fwq/235168.html


Download the version of 11.1 on the official website.

V11.1_linuxx64_expc.tar.gz

My software is stored under/home/setup


First, decompression:

[Email protected] setup]# tar-zxvf v11.1_linuxx64_expc.tar.gz-c /home/software

After decompression, it is a directory file called expc.

[[email protected] expc]# ls

DB2 db2ckupgrade Db2_deinstall db2_install db2ls db2prereqcheck db2setup


Second, check the installation prerequisites

[Email protected] expc]#./db2prereqcheck

Suddenly came out a lot of things. My pages are all over the page. This is a good time to start a log to see what the missing dependencies are.

Lack of dependency, some things or yum can not solve. I can't do anything about that. It's only so empty.

Some have already indicated, lacks what what will be missing what function, this big not to want.

Finally, a package file is installed.

So, it is really not on the, do not tangle, directly installed.


Three, then directly installed.

[Email protected] expc]#./db2_install

At first, you need to enter two Yes, agree to the agreement, and agree to the installation path .

After that, it's all automatic.

To #29 start time will pause, harm I nervous a bit, fortunately it went through.

Create user groups, as for why this is the name, may be the official request it?

[Email protected] expc]# groupadd-g DB2IADM1

[Email protected] expc]# GROUPADD-G 2001 DB2FADM1

[Email protected] expc]# useradd-m-G db2iadm1-d/home/db2inst1 Db2inst1

[Email protected] expc]# useradd-m-G db2fadm1-d/home/db2fenc1 db2fenc1

[Email protected] expc]# passwd db2inst1

This password is very cumbersome to set up. You have to take this down.


Four, the time to change to another directory. This directory is automatically generated. It seems to be the installation directory ...

This is to register a protocol for the instance user ...

[Email protected] expc]# cd/opt/ibm/db2/v11.1/adm/

[[email protected] adm]# Chmod-r 775 *

Here is your own software installation directory.

[Email protected] adm]#/db2licm-a /home/software/expc/db2/license/db2expc_uw.lic

Lic1402i License added successfully.

Lic1426i This product was 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/v11.1/license/zh_cn.utf8 "


Five, continue to skip directory

The port number is bound here ...

[Email protected] adm]# cd/opt/ibm/db2/v11.1/instance/

[[email protected] instance]# Chmod-r 775 *

[Email protected] instance]#/db2icrt-p 50000-u db2fenc1 db2inst1

dbi1446i the DB2ICRT command is running.

DB2 installation is being initialized.

Total number of the 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 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 logs at "/tmp/db2icrt.log.5871".

Dbi1070i program DB2ICRT completed successfully.


Six, finished.

To switch to the instance user, you can log in to the DB2 database

[Email protected] instance]# Su-db2inst1

Last Login: 512 months 1 15:36:55 CST 2017PTS/2

Create a sample database

[Email protected] ~]$ Db2sampl

Starting the DB2 instance ...

Creating database "SAMPLE" ...

Connecting to Database "SAMPLE" ...

Creating tables and data in schema "Db2inst1" ...

Creating tables with XML columns and XML data in Schema "Db2inst1" ...

Stopping the DB2 instance ...

' Db2sampl ' processing complete.

[Email protected] ~]$ Db2start

SQL1063N Db2start processing was successful.

[[Email protected] ~]$ DB2 connect to sample

Database Connection Information

Database Server = db2/linuxx8664 11.1.2.2

SQL Authorization ID = Db2inst1

Local Database alias = SAMPLE

[[Email protected] ~]$ DB2 "SELECT * from Staff"

Bring data, 666.

[Email protected] ~]$ db2licm-l

Product Name: "DB2 express-c"

License type: "Unwarranted"

Expiry date: "Permanent"

Product identifier: "DB2EXPC"

Version information: "11.1"

Max Number of CPUs: "2"

Max amount of memory (GB): "16"

Max Number of cores: "2"

Enforcement policy: "Soft Stop"


Centos7 under Installation DB2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.