Manually install the DB2 database in a UNIX operating environment

Source: Internet
Author: User

This article describes how to manually install a DB2 database in a UNIX environment. If you are interested in the actual steps for manually installing a DB2 database in a UNIX environment, you can click to view the following articles. The following is a detailed description of the articles. I hope you can learn from them.

This document describes how to manually install a DB2 database in a UNIX system. For details, see the following:

1. Execute the installation: Run./db2_install

2. Create a user ID:

 
 
  1. groupadd db2grp1  
  2. groupadd db2fgrp1  
  3. groupadd dasadm1  
  4. useradd -g db2grp1 -m -d /home/db2inst1 -p “” db2inst1  
  5. useradd -g db2fgrp1 -m -d /home/db2fenc1 -p ““ db2fenc1  
  6. useradd -g dasadm1 -m -d /home/dasusr1 -p “” dasusr1  

Note: The passwords of the above three users are empty. When you use the su command to switch to the corresponding user, use the passwd command to set the password.

3. Create an instance:

First, use the following command to create and manage server instances:

 
 
  1. /opt/ibm/db2/v8.1/instance/dascrt -u dasusr1  

Run the following command to create the database instance db2inst1:

 
 
  1. /opt/ibm/db2/v8.1/instance/db2icrt -u db2fenc1 db2inst1  

This command has some optional parameters. In particular, the-a option allows us to specify an authentication mechanism different from the default "server.

4. Create a shared library link:

 
 
  1. /opt/ibm/db2/v8.1/cfg/db2ln  

5. Set the db2 instance environment variables:

Use the su command to switch to the user terminal of the db2 instance:

Su db2inst1

Db2set db2autostart = yes (set db2 to automatically start with linux) db2set db2comm = tcpip (set db2 to support tcpip protocol for client access)

6. Set the service port

Enter the db2 Command Line Mode

Update database manager configuration using svcename server1 | 50000

Server1 | 50000 either. server1 | indicates the service name and 50000 indicates the port number.

Get database manager configuration

7. Create a database

 
 
  1. create database dbname  

8. Client Connection

In command line mode, enter the following command:

 
 
  1. db2 catalog tcpip node mynode remote hostname server 50000  
  2. db2 catalog database dbname as dbname at node mynode  

Now, you only need to add an odbc source to test the connection. The above content is an introduction to manual installation of the DB2 database in the UNIX environment.

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.