DB2 advanced Installation

Source: Internet
Author: User
Tags db2 client db2 connect db2 connect to db2 installation

Learn how to start with installation, haha. Here we will record the various methods for installing DB2 on Windows and UNIX/Linux, as well as the specific details. Wizard-based installation in Windows: setup.exe-I cn-u response file name-I cn indicates that the Wizard is displayed in Chinese, -I en: The Installation Log File db2.log generated in English is stored in the DB2LOG directory under the db2 installation path. FAQ: in Windows, the db2admin user is generated. After XP is installed, it will be annoying to change the logon user to this one. The original administrator user is not logged on. the solution is as follows:

Control Panel-> User Account-> select logon and logout options-> uncheck the Welcome Screen

Installation of UNIX/Linux: Check the installation environment in the Early Stage: 1. preliminary work: 1. check the environment/tmp space, at least 2 GB memory, at least 1 GB. (1g only supports concurrent connections between five clients. At least 16 MB of memory will be added for each additional client)
/Etc/sysctl. conf parameter settings
-- First -- modify the system kernel parameters, which is similar to the Oracle installation parameters --/etc/sysctl. conf (mainly change, memory, semaphore, message) kernel. sem = 250 256000 32 1024 # maximum number of signal objects in each signal object set; Maximum number of signal objects in the system range; Maximum number of operations supported by each signal object; the maximum number of signal objects in the system range. Kernel. shmall = 3774873 # total available shared memory. For example, 90% of 16 gb memory (14.4 gb/4 kb) kernel. shmmax = 1073741824 # maximum size of shared memory segments. For a 64-bit system, at least 1 gb. It is recommended that the kernel be equal to the physical memory. msgmni = 1024 # Number of proxy processes that can be started kernel. msgmax = 65535 # affects the size of messages that can be sent in a queue (kernel. msgmnb = 65535 # Make the queue effective after the queue size is modified: sysctl-p
2. Whether the wizard displays Chinese or English
Ksh sh bash LANG = <locale> Export LANG
CSH Setenv LANG <locale>
// If the current env is in English, ask the DB2 Installation Wizard to display the Chinese LANG = zh_CN Export LANG
2. Install DB2
Unix/Linux supports three installation methods:
A. Wizard-based installation:
Db2setup
B. Response file installation:
Db2setup-r Response file name-t process file name
-R Response file name: saves all the specified options during installation.
-T process file name: information about the installation process will be stored in this file.
You can create users and groups in advance or in the Wizard.
It's easy. The content mentioned later can be completed in the Wizard.

C. There is also a db2_install script method:
./Db2_install-B/u01/db2v9-p ESE
./Db2_install-B/opt/ibm/db2/v9.5-p ESE
/*
If no parameter is input by default, the system will prompt
CLIENT: CLIENT
RTCL: runtime Client
ESE: ESE Server
*/
This is used to describe what users are created later, because it is not based on the GUI and is a common installation method.
The generated Installation log File db2setup. log is stored in the/tmp directory.
III. description of User Creation and Group tasks: db2inst1 db2iadm1 DB2 instance user, user group db2fenc1 db2fadm1 protected user, user group. run the custom function and process dasusr1 dasadm1 to create the DB2 Management Server user and user group. linux: groupadd db2iadm1 groupadd db2fadm1 groupadd dasadm1 useradd-g db2iadm1-m-d/home/db2inst1 db2inst1 useradd-g db2fadm1-m-d/home/db2fenc1 db2fenc1 useradd-g dasadm1-m-d /home/db2usr1 dasusr1 passwd db2iadm1 passwd db2fadm1 passwd dasadm1 AIX: groupadd-g 999 db2iadm1 groupadd-g 998 db2fadm1 groupadd-g 997 dasadm1 -- pgrp = primary group primary user group (only one specified user group) -- groups = user group, multiple mkuser id = 1004 pgrp = db2iadm1 groups = db2iadm1 home =/home/db2inst1 db2inst1 mkuser id = 1003 pgrp = db2fadm1 groups = db2fadm1 home =/home/db2fenc1 db2fenc1 mkuser id = 1002 pgrp = dasadm1 groups = dasadm1 home =/home/dasusr1 dasusr1

(Do not want to use mkuser command line, smitty mkuser is also good Oh) passwd db2iadm1 passwd db2fadm1 passwd dasadm1 IV. run the dascrt command as the root user to create the DB2 Management Server-cd/opt/ibm/db2/V9.7/instance/dascrt-u dasusr1 v. run the db2icrt command to create an instance (also in the instance directory) db2icrt-a server-u db2fenc1 db2inst1-a: server Authentication Mode-u: the specified protected user // when the "sqllib" directory already exists in the user directory, the instance creation will fail. 6. configure TCP/IP communication for the created instance. Only the communication protocol is configured can the DB2 client request be accepted. root User, In the AIX TCP/IP service file (/etc/services), specify the listening port -- content: db2c_db2inst1 50000/TCP # DB2 connection service port -- 2. db2inst1 user, configure the parameter SVCENAME for the database. db2 update dbm cfg using SVCENAME db2c_db2inst1 -- 3. db2inst1 user, set the communication proxy. db2set DB2COMM = TCPIP
Run su db2inst1; cd/home/db2inst1/sqllib/adm db2start db2 create db testdb db2 connect to testdb db2 "create table emp (emp_id int, emp_name varchar (8) "db2" insert into emp (emp_id, emp_name) values (1, 'xcl ') "db2" select * from emp "db2 terminate db2stop

Attached to the DB2 common directory: root User: AIX? , HP-UX and Solaris Operating Environment/opt/IBM/db2/V9.1 Linux/opt/ibm/db2/V9.1 db2inst1 users: $ pwd/home/db2inst1/sqllib/adm $ id uid = 110 (db2inst1) gid = 104 (db2grp1) groups = 1 (staff), 101 (dasadm1) $ file Registry Information $. /db2set DB2COMM = tcpip $. /db2set-all [I] DB2COMM = tcpip [g] DB2SYSTEM = AIX_RAC1 [g] DB2INSTDEF = db2inst1 [g] DB2ADMINSERVER = dasusr1
MAIL: xcl_168@aliyun.com Blog: http://blog.csdn.net/xcl168

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.