Install db2 in Linux

Source: Internet
Author: User
Tags db2 port

Linux is becoming more and more popular in today's society. Do you know about Linux systems? Are you an application of Linux? This article describes how to install db2 in detail, which plays a certain role in learning to install db2. After installing db2 today, I have been busy for a while. I have finally installed it online, so I will share my steps with you.

Step 1: Check the package and its version

Compat-libstdc ++-7.3-2.96.118.i386.rpm

Find the linux installation disk and use rpm-I compat-libstdc ++-7.3-2.96.118.i386.rpm to install it.

Step 2: Configure Linux Kernel Parameters

 
 
  1. /Etc/sysctl. conf file to add Kernel Parameters
  2.  Kernel. msgmni=1024 
  3.  Kernel. sem=250256000 32 1024

Activate the change: sysctl-p

Step 3: Install

Sh db2_install

Follow the prompts

Step 4: create a user

 
 
  1. /usr/sbin/groupadd db2iadm1  
  2. /usr/sbin/groupadd db2fadm1  
  3. /usr/sbin/useradd –m -g db2iadm1 –d /home/db2inst1 db2inst1  
  4. /usr/sbin/useradd –m -g db2fadm1 –d /home/db2fenc1 db2fenc1 

Step 5: Create an instance

/Opt/IBM/db2/V8.1/instance/db2icrt-a server-u db2fenc1 db2inst1

Step 6: Product License

/Opt/IBM/db2/V8.1/adm/db2licm-a/mnt/cdrom/db2/license/db2pe. lic

Step 7: Allow multi-page distribution of SMS

/Opt/IBM/db2/V8.1/cfg/db2ln

Step 8: add the DB2 Port

SU-root
Add vi/etc/services to the following line
Db2inst1 50000/tcp

Step 9: DB2 Configuration

 
 
  1. su – db2inst1  
  2. db2set DB2_EXTENDED_OPTIMIZATION=ON  
  3. db2set DB2_DISABLE_FLUSH_LOG=ON 
  4. db2set AUTOSTART=YES 
  5. db2set DB2_STRIPED_CONTAINERS=ON  
  6. db2set DB2_HASH_JOIN=Y 
  7. db2set DB2COMM=tcpip 
  8. db2set DB2_PARALLEL_IO=*  
  9. db2set DB2CODEPAGE=819 
  10. #Update dbm cfg  
  11. db2 update dbm cfg using SVCENAME db2inst1  
  12. db2 update dbm cfg using INDEXREC ACCESS 

Step 10: Run DB2

Db2start

Step 2: Create a database

Db2 "create database test1 ALIAS test1 using codeset ISO8859-1 territory cn"

You can create tables and operate on tables later, for example, db2 "select * from tbl"

  1. Symantec BERS 2010 New Linux Backup Recovery
  2. A fog in front of Linux
  3. Linux Desktop is no longer an ugly duckling
  4. New Users learn Linux OS
  5. Linux terminal command usage Selection

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.