Linux DB2 Database Installation tutorial

Source: Internet
Author: User
Tags db2 connect db2 connect to root access

This tutorial explains the installation steps of the DB2 database under Inux because of the need to learn the DB2 database recently.

Before installing, please review the DB2 version and license instructions to learn more, first understand what version to install, here I use the latest express-c version, this version is provided for the individual learning version.

The management client is no longer with the control center after the v9.7 version, but instead uses the Data Studio client.

Linux version:

The Linux version of the DB2 database uses the official free version of the operating system with the CentOS6.2.

Installation process:

1. Download: db2_v101_linuxia32_expc.tar.gz

2, decompression, after the completion of the decompression will be in the current directory has a./expc folder

tar -zxvf db2_v101_linuxia32_expc. tar. gz

Post Address: http://www.cnblogs.com/zxlovenet/p/3972766.html

3. Enter this directory

[Email protected] opt]# CD expc/

4. Perform the installation

[Email protected] expc]#./db2_install

5. Add groups and Users:

Group (user name)
DB2IADM1 (Db2inst1)
DB2FADM1 (DB2FENC1)

2001-m-g db2iadm1-d/home/-m-g db2fadm1-d/home/passwd   passwd db2fenc1

6, install license (product license) PS: If it is EXPRESSC version do not have to do

pwd/opt/ibm/db2/v10. 1/chmod775 *[[email protected] adm]$. /db2licm-a/tmp/seagull/db2v10/license/db2ese_c.lic

7. Creating Instances and Sample Databases

[Email protected] instance]#pwd/opt/ibm/db2/v10.1/Instance[[email protected] instance]#chmod-R775*[email protected] instance]#./db2icrt-p50000-u db2fenc1 db2inst1[[email protected] instance]#su-Db2inst1[[email protected]~]$ db2samplcreating Database"SAMPLE"... Connecting to Database"SAMPLE"... Creating Tables and DatainchSchema"Db2inst1"... Creating tables with XML columns and XML datainchSchema"Db2inst1"...'Db2sampl'processing complete. [[Email protected]~]$ db2startsql1026n The database manager is already active. [[Email protected]~]$ DB2 Connect to sampledatabase Connection informationdatabase server= Db2/linux10.1.2SQL Authorization ID=db2inst1local Database alias=Sample[[email protected]~]$ DB2"SELECT * from staff"

Post Address: http://www.cnblogs.com/zxlovenet/p/3972766.html

8. Create a DAS Management Server

In order for the remote client to be able to control the database server with the control center, it is necessary to install DAS on the database server, of course, if it is only remote connection rather than remote management, you can not install, here I installed a bit.

[Email protected] expc]# groupadd-g2002Db2asgrp[[email protected] expc]# useradd-m-g db2asgrp-d/home/db2as db2as[[email protected] expc]#passwdDb2as[[email protected]~]$su-db2as # test new user here [[email protected]~]$su# Enter root access [email protected]~]# cd/opt/ibm/db2/v10.1/instance/[email protected] instance]#./DASCRT-u db2asdbi1070i program DASCRT completed successfully. [Email protected] instance]#su-Db2as[[email protected]~]$ db2admin startsql4409w The DB2 administration Server is already active.

9. Set the port number

Vim/etc/services

In the last add Line # Ps:vim shortcut key, enter "G" in command mode the last line of the jump knife.

Db2inst1 50000/tcp

10, DB2 configuration, to switch to the user Db2inst1
Su-db2inst1
Db2set Db2_extended_optimization=on
Db2set Db2_disable_flush_log=on
Db2set Autostart=yes
Db2set Db2_striped_containers=on
Db2set db2_hash_join=y
Db2set Db2comm=tcpip
Db2set db2_parallel_io=*
Db2set db2codepage=819 # PS: This place is more important.
# DB2 Update Database Manager configuration using Svcename Db2inst1

11. Set Svcename to the port number or service name in/etc/services?

[[Email protected] ~]$ DB2 get dbm Cfg| grep svcenametcp/IP Service name (SVCENAME) =

Post Address: http://www.cnblogs.com/zxlovenet/p/3972766.html

Locate Svcename If the current value is not the server-side port number or service name, make the update settings.

[[Email protected] ~~]$ DB2 get dbm Cfg| grep svcenametcp 50000

# PS:svcename needs to be used when connecting to the client

12. You need to shut down the firewall before starting DB2, otherwise you will not be able to connect at all (this place has been a long time), under the root User: service iptables stop

13. Open DB2, execute: Db2start, if the state is turned on, then stop, execute: db2stop.

PS: Refer to the link below

http://www.db2china.net/home/space.php?uid=92501&do=blog&id=25771

http://blog.csdn.net/xiaolang85/article/details/3887459

Settings view:

PS: After restarting the machine encountered a problem, is to shut down the firewall unresponsive, open the shutdown database unresponsive, remote cannot connect to the database, the solution is to restart the server, and then in order to shut down the firewall, and then restarted the DB2 database.

Linux DB2 Database Installation tutorial

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.