Non-root install DB2 V9.7 on Linux

来源:互联网 发布:淘宝 apple官方旗舰店 编辑:程序博客网 时间:2024/06/06 15:04


Steps on install DB2 V9.7 as non-root user.


Limitation:

1. Only one DB2 instance can be created for non-root user installation.

2. User cannot change installation target, it must be ${HOME}/sqllib

3. Since non-root user cannot create DB2 instance, so the default instance is created during DB2 installation process, there is no explicit step to create a DB2 instance.




$ tar -zxvf DB2_Connect_Svr_97_Linux_x86-64.tar.gz

$ cd consv

$ ./db2_install

DBI1244I  Directory for non-root installation of DB2 - /home/${UID}/sqllib


Specify one of the following keywords to install DB2 products.


  CONSV

  CLIENT

  RTCL


Enter "help" to redisplay product names.


Enter "quit" to exit.


***********************************************************

CONSV


Notice:

1. The directory of non-root installation is ~/sqllib, seems we cannot use '-b' to set user-defined directory. for example: ./db2_install -b /opt/ibm/db2/V9.7, the '-b' value is ignored.

2. CONSV: connect server edition

    CLIENT:

    RTCL: runtime client


$ . $HOME/sqllib/db2profile           # set environment variables

$ db2start    # start DB2 instance

$ db2stop    # stop DB2 instance

$  To create a DB2 database

db2 => create database test             # create test database

DB20000I  The CREATE DATABASE command completed successfully.

db2 => connect to test                     # connect to a database


   Database Connection Information


 Database server        = DB2/LINUXX8664 9.7.0

 SQL authorization ID   = ${UID}

 Local database alias   = TEST


Notice: DB2 related environment

DB2DIR=/home/${UID}/sqllib

DB2INSTANCE=${UID}

DB2BASE=test


Configure Network Connection

$ db2 update dbm cfg using SVCENAME 50000   # default 50000 port

$ db2set DB2COMM=TCPIP

$ db2stop

$ db2start



== install license file ==


0 0
原创粉丝点击