Correct installation and configuration process for IBM/db2_v9.20.linux

Source: Internet
Author: User
Tags db2 connect db2 connect to odbc connection

This article mainly describes the correct installation and configuration of IBM/db2_v9.20.linux. If you are interested in the correct installation and configuration of IBM/db2_v9.20.linux, you can click to view the following articles. The following describes the specific solution and hope it will be helpful for your future study.

 

IBM, LinuxIBM, Linux

1. install IBM/DB2 V9.1 Linux

Download the Installation File db2exc_912_LNX_x86.tar.gz and decompress it to ext2/3.

# Cd db2exc_912_LNX_x86

#./Db2setup

(1) The java installation interface is displayed. install new instance

(2) Use "Typical Mode" and select the installation directory. The default value is DB2_root =/opt/ibm/db2/V9.1/

# Echo DB2_root =/opt/ibm/db2/V9.1/>/etc/profile

(3) and create db2inst by default? , Db2fenc? , Db2adsusr? These users

The most important thing is the local instance Management User db2inst? It manages database instances

(4) Create an Instance and continue the installation. If the successful result is displayed, the installation is successful.

(5) # ps-e | grep db2 should be able to see three processes with different names

(6) # tail/etc/inittab # The last line is the method for starting db2.

Fmc: 2345: respawn:/opt/ibm/db2/V9.1/bin/db2fmcd # DB2 Fault Monitor Coordinator

I used to find the db2 process in/etc/init. d for a long time. Later I realized that the db2 process was directly released through the init spawn.

2. Configure database development for IBM/DB2 and CLI/ODBC connection

# Su db2inst1

$ Cd $ DB2_ROOT

# Catalog ):

$./Db2 catalog tcpip node remote server

$./Db2 catalog db at node

$./Db2 connect to user using

# Uncatalog ):

$./Db2 uncatalog db

$./Db2 uncatalog node

3. Modify and use the CLI/ODBC of IBM/DB2 for program development.

(1) If you do not want to use a db2 instance, but want to use CLI/ODBC for program development,

You can comment on the phrase "Start db2" in "/etc/inittab" and give up starting the IBM/DB2 database service.

(2) environment variable configuration file:/home/db2inst1/sqllib/db2profile

Check/etc/profile to make sure the following two statements are provided (add or modify ):

 
 
  1. export DB2INSTANCE=db2inst1 
  2. export PATH=$DB2_ROOT/binPATH  
  3. export LD_LIBRARY_PATH=$DB2_ROOT/lib32LD_LIBRARY_PATH  

(3) Relationship between the address of the target machine in the cataloguing and the odbc dsn, see 2

The most important header files (include) and Libraries (lib) in CLI/ODBC)

$ DB2_ROOT/lib32 or its connection/home/db2inst1/sqllib/lib, the most important of which is libdb2.so

4. Modify and uninstall DB2

Perform reverse cataloguing () first, as shown in step 2.

 
 
  1. # su db2inst1  
  2. $ cd $DB2_ROOT/install  
  3. $ ./db2_deinstall -a  

Wait for the end...

Modify the statement for starting db2 in the/etc/inittab to ensure that the IBM/DB2 database service is not started.

Related Article

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.