Install DB2 database on suselinux

Source: Internet
Author: User
Tags db2 connect db2 connect to
For production purposes, install the DB2 database on an IBMX3850 server. The following describes the specific process. Hardware and Software System Configuration: Operating System: susew.ise10linux (64bit) sp3 hardware configuration: 32 GB memory database software:

For production purposes, install the DB2 database on an IBMX3850 server. The following describes the specific process. Hardware and Software System Configuration: Operating System: susew.ise10linux (64bit) sp3 hardware configuration: 32 GB memory database software:

Because of production needs, the website space is installed on an IBM X3850 server DB2 database, Hong Kong Space. The following describes the specific process.

Software and Hardware System Configuration:

Operating System: suse enterprise 10 linux (64bit) sp3

Hardware configuration: 32 GB memory

Database software: DB2 V9.7 (64bit)

I. Check the required environment and software packages

Before installing DB2 databases on suse Linux, ensure that the system meets the required operating system, hardware, software, and communication requirements.

DB2 database products have several different versions. Some DB2 database products and functional components are only available on a specific operating system. See the IBM official website to obtain available DB2 database products on each operating system.
Use rpm-qa to find the required software package. packages that do not exist can be installed using yast2-I.

Linux-uu1q: # rpm-qa | grep libaio

Libaio-0.3.104-14.2

Libaio-devel-0.3.104-14.2

Linux-uu1q: # rpm-qa | grep libstdc

Libstdc +-devel-4.1.2_20070115-0.29.6

Libstdc ++-4.1.2 _ 20070115-0.29.6

Linux-uu1q: # rpm-qa | grep nfs-utils

Nfs-utils-1.0.7-36.36.47

Linux-uu1q:/home/server # rpm-qa | grep compat-libstdc

Compat-libstdc ++-33-3.2.3-61

(Check whether libstdc ++. so.5 exists
Linux-uu1q:/usr/lib64 # ls-l libstdc ++. so .*

Lrwxrwxrwx 1 root 18 Feb 22 libstdc ++. so.5-> libstdc ++. so.5.0.7

-Rwxr-xr-x 1 root 825400 Apr 9 2007 libstdc ++. so.5.0.7

Lrwxrwxrwx 1 root 18 Feb 21 21:57 libstdc ++. so.6-> libstdc ++. so.6.0.8

-Rwxr-xr-x 1 root 969048 Sep 5 2009 libstdc ++. so.6.0.8)

Note that the compat-libstdc ++-33-3.2.3-61.x86_64.rpm package does not exist on the suse linux 10 cd. You need to download and install the package yourself. Otherwise, when installing DB2, the system reports that libstdc ++ cannot be found. so.5 alarm. (For DB2 database servers and clients, website space, libstdc ++. so.5 is required. If you use g ++ 4.1 On RHEL 5 or SLES 10 to compile the C ++ application, the following warning is generated: libstdc ++ required by libdb2.so. so.5 may be different from libstdc ++. so.6 conflict)

Modify system core parameters
Vi/etc/sysctl. conf
Kernel. msgmni= 16384
Kernel. sem = 250 256000 32 4096
# Sysctl-p

# Vi/etc/security/limits. conf
* Soft nofile 10240

Ii. Start installation and configuration

# Tar-xvf DB2v9.7_linux64_server.tar

# Cd server

#./Db2setup (or you can also use db2_install)

Install it in the default path/opt/ibm/db2/V9.7. Select ESE as the installation type.

The last step is to install it until it is complete.


3. Add users and groups

# Groupadd-g 995 db2grp

# Useradd-u 1000-d/home/db2inst1-g db2grp-m db2inst1

# Groupadd-g 996 db2fgrp

# Useradd-u 1001-d/home/db2fenc1-g db2fgrp-m db2fenc1
)
-M dasusr1

# Passwd db2inst1

# Passwd db2fenc1

# Passwd dasusr1

4. Find the license file db2ese. lic in the installation directory.
Check license content
$ Db2licm-l

Execute the following installation authorization

#/Opt/ibm/db2/V9.7/adm/db2licm-a/mnt/cdrom/db2/license/db2ese. lic

# Cd/opt/ibm/db2/v9.7

# Ls-l

# Cd instance

#./Db2icrt-s ese-u db2fenc1 db2inst1 (Create a database instance)

#./Dascrt-u dasusr1 (create a das)

# Cd/opt/ibm/db2/V9.7/cfg

#./Db2ln ()

6. Set the service port and configure database instance Communication

Use root User

Vi/etc/services

Add the following lines

DB2_db2inst1 60000/tcp

DB2_db2inst1_1 60001/tcp

DB2_db2inst1_2 60002/tcp

Db2_db2instanceend 60003/tcp

Db2c_db2instance 1 60005/tcp

Save and exit

7. Start an instance

# Su-db2inst1

$ Db2set DB2RSHCMD =/usr/bin/ssh

Set the DB2RSHCMD variable first, and then set variables such as DB2COMM.

)
)
$ Db2set DB2AUTOSTART = YES (Set automatic database startup)

$ Db2start

02/22/2013 01:40:54 0 0 SQL1063N DB2START processing was successful.

SQL1063N DB2START processing was successful.

(Before creating a database, you must specify the database storage directory and configure the corresponding permissions.

# Mkdir-p/db2data/database

# Chown-R db2inst1: db2grp/db2data/database)

Create a database

$ Db2 "create database testdb on/db2data/database using codeset gbk territory cn"


$ Db2 connect to testdb

Note: If the following error is reported during database connection

SQL0332N Character conversion from the source code page "1386" to the target

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.