Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

How to install DB2 10.1 on RHEL 6.4 v1.2

I. Prepare the RHEL6 x64 for the DB2 installation. 

1. unzip the tar file and run prereqcheck with the version number. 
[root@datglv-qbdb201 ese]# ./db2prereqcheck -v 10.1.0.0 

=======================================================================
Checking DB2 prerequisites for DB2 database version 10.1.0.0 on operating system "Linux"

Validating Linux distribution ...
   Required minimum operating system distribution: "RHEL"; Version: "5"; Service pack: "6".
   Actual operating system distribution Version: "6"; Service pack: "4".
   Requirement matched.

Validating kernel level ...
   Required minimum operating system kernel level : "2.6.16".
   Actual operating system kernel level: "2.6.32".
   Requirement matched.

Validating C++ Library version ...
   Required minimum C++ library: libstdc++.so.6
   Standard C++ library is located in the following directory: "/usr/lib64/libstdc++.so.6.0.13".
   Actual C++ library: CXXABI_1.3.1
   Requirement matched.

Validating 32 bit version of libstdc++.so.6 ...
   Found the 64 bit "/usr/lib64/libstdc++.so.6" in the following directory "/usr/lib64".
   DBT3514W  The db2prereqcheck utility failed to find the following 32-bit library file: "libstdc++.so.6".

Validating libaio.so version ...
   Loading the libaio.so.1 succeed.
   Requirement matched.

DBT3533I  The db2prereqcheck utility has confirmed that all installation prerequisites were met for DB2 database server . Version: "10.1.0.0".
2. Found some packages need to be insatlled. and Register the server with rhn and install the following missing packages. 
    yum -y install libstdc++
    yum -y install libstdc++.i686
    yum -y install dapl
    yum -y install sg3_utils
    yum -y install sg_persist
    yum -y install gnome-session 
    yum -y install xterm
    yum -y install xhost
    yum -y install tigervnc-server
    yum -y install ksh
    yum -y install pam-devel.i686 
3. re-run the check again and make sure everything is clean 
./db2prereqcheck -v 10.1.0.0 


DBT3533I  The db2prereqcheck utility has confirmed that all installation prerequisites were met for DB2 database server with DB2 pureCluster feature. Version: "10.1.0.0".
4. create DB2 user and group account : 
groupadd -g 801 db2iadm1
groupadd -g 802 db2fadm1
groupadd -g 803 dasadm1

useradd -u 801 -g db2iadm1 -m -d /opt/ibm/db2inst1 db2inst1 
useradd -u 802 -g db2fadm1 -m -d /opt/ibm/db2fenc1 db2fenc1 
useradd -u 803 -g dasadm1 -m -d /opt/ibm/dasusr1 dasusr1

if there is second instnace, create the following user only. 
useradd -u 804 -g db2iadm1 -m -d /opt/ibm/db2inst2 db2inst2

5. change kernel setting 
the following is the setting for 8G machine. 

reference:  http://publib.boulder.ibm.com/infocenter/db2luw/v10r5/index.jsp
vi /etc/sysctl.conf

kernel.shmmni = 2048
#kernel.shmmax = 8388608
#kernel.shmall = 4294967296

kernel.msgmni = 8192
kernel.msgmax = 65536
kernel.msgmnb = 65536
#This sets SEMMSL, SEMMNS, SEMOPM, SEMMNI
kernel.sem = 250 256000 32 2048 
run the following command to take effective immediate.
 sysctl -p 
 5. start VNC and install the DB2 
bring up VNC with gnome-session
as root, run db2setup 
./db2setup
install a product --> Install New --> Custom --> install DB2 Enterprise Server edition on this computer 
uncheck  "Getting Started".
Directory:  /opt/ibm/db2/V10.1
Select the Lauguage to install:  English
Specify the location of the DB2 information center : On the IBM Web site

set user: 
choose : Existing user 
dasusr1  -- DB2 Administration Server owner

Create a DB2 instance
Single partion instance 

set user : 
db2inst1 -- DB2 instance owner
db2fenc1 -- DB2 fenced user

service name:  db2c_db2inst1    port numer: 50000
tick "Autostart the instance at system startup"
Note: it might not work,


setup SMTP:
abc-nvlv-drsmtp.nena.wdpr.disney.com ( dev/qa) 
AM-NYNY-APVM002.nena.wdpr.disney.com ( prod)
ABC.IS.CEReports@am-nyny-apvm002.nena.wdpr.disney.com

db2inst1@abc-nvlv-oratst1.nena.wdpr.disney.com
7.  Validate the installation by db2val 
passwd db2inst1
su - db2inst1
vi .bash_profile
append the following line into the above profile.
. /opt/ibm/db2inst1/sqllib/db2profile

su - dasusr1

vi .bash_profile
. /opt/ibm/dasusr1/das/dasprofile
or 
echo ". /opt/ibm/dasusr1/das/dasprofile" >> /opt/ibm/dasusr1/.bash_profile 
then run the DB2 validation as db2inst1 user.
[db2inst1@datglv-qbdb201 bin]$ db2val
DBI1379I  The db2val command is running. This can take several minutes.

DBI1335I  Installation file validation for the DB2 copy installed at
      /opt/ibm/db2/V10.1 was successful.

DBI1339I  The instance validation for the instance db2inst1 was
      successful.

DBI1343I  The db2val command completed successfully. For details, see
      the log file /tmp/db2val-131007_113423.log.
8.create user database. 
for BPM 
groupadd -g 904 bpmadmin
useradd -u 904 -g 904 bpmadmin

db2 create database CMNDB;
db2 create database BPMDB;
db2 create database PDWDB;
II. Install the second instance of DB2
das user, fence user do not need to be created for the second instnace. 
we only need to create db2inst2 user as the second DB2 instnace owner. and the service port for the second instnace. 

1. create the second instnace owner. 
useradd -u 804 -g db2iadm1 -m -d /opt/ibm/db2inst2 db2inst2 
2. append the following line into the /etc/services
db2c_db2inst2   51000/tcp

3. create the instance by  Log in with root user 
cd /opt/ibm/db2/V10.1/instance
./db2icrt -u db2fenc1 db2inst2

add the following in the db2inst2 user's .bash_profile
. /opt/ibm/db2inst2/sqllib/db2profile
4. setup the service port for the second instnace. 
passwd db2inst2

su - db2inst2

db2 update database manager configuration using svcename db2c_db2inst2
db2set DB2COMM=tcpip
db2stop
db2start
5. create user account to access the database. 
the user accept should start > 900 
groupadd -g 905 odmadmin
useradd -u 905 -g 905 odmadmin

groupadd -g 904 bpmadmin
useradd -u 904 -g 904 bpmadmin
su - db2inst2

db2 create database ODMEVT;
db2 create database ODMRUL;

db2 activate database ODMEVT;
db2 connect to ODMEVT;
db2 grant dbadm on database to user odmadmin;

db2 activate database ODMRUL;
db2 connect to ODMRUL;
db2 grant dbadm on database to user odmadmin;


Comments

Popular posts from this blog

Oracle DBMS SCHEDULER Examples

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

vacuumlo - removing large objects orphans from a database PostgreSQL