Saturday, March 31, 2012

IBM Connections 3.0.1 on RHEL - how to install - 4. Database Server DB2

Now we will prepare our DB2 server for IBM Connections.


You will need:
installation packages

  • CZ19NEN  IBM DB2 Enterprise Server Edition V9.7 for Linux x86-64​
  • CZ381ML   DB2_ESE_Restricted_QS_Activation_97.zip
  • v9.7fp2_linuxx64_universal_fixpack.tar.gz

and already installed RHEL 5.4 server with graphic environment.

FQDN: icdb.ys.cz

DB2 Installation pre-requisites 

  1.  After standart installation disable SELinux and Firewall
  2. Change hostname 
    1. run command:  [root@icdb ~]# system-config-network 
    2. and change hostname to icdb.ys.cz
  3. Create installation directory
    1. [root@ icdb   ~]# mkdir -p /opt/install/DB2
    2. [root@ic ~]# chmod 777 -R /opt/install/
  4. OPTIONAL - If you run in vmware infrastructure install vmware tools
    1. Mount vmware tools image and install it
    2. [root@icdb media]# mkdir -p /media/cdrom
    3. [root@icdb media]# mount /dev/hdc /media/cdrom
    4. [root@icdb install]# cd /opt/install/
    5. [root@icdb install]# tar xvzf  /media/cdrom VMwareTools-8.3.7-341836.tar.gz
    6. [root@icdb install]# cd vmware-tools-distrib/
    7. [root@icdb vmware-tools-distrib]# ./vmware-install.pl
    8. Leave all options in default during installation wizard and run  [root@ic vmware-tools-distrib]# reboot
  5. Check installed libs and rpms   http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.qb.server.doc/doc/r0008865.html Try to find all listed files like libpam.so.0 in /lib  or /usr/lib/ direcotry

Install DB2 Server

  1. After download from, save tar in to /opt/install/DB2
  2. extract tar.gz file 
    1. [root@icdb media]# cd /opt/install/DB2
    2. [root@icdb media]# tar xvfz DB2_ESE_Restricted_QS_Activation_97.zip
  3.  Run install wizard (you must be in X or your putty must have in "Categorry> Connection> SSH> X11> checked Enable X11 forwarding" and you must running Xming server on your local Windows workstation)
    1. [root@icdb ese]# ./db2setup
    2. Go trough wizard as follow:
      1. Introduction > NEXT
      2. Software License Agreement > Accept > NEXT
      3. Installation type > Typical > NEXT
      4. Installation action > NEXT
      5. Installation directory > we used /opt/IBM/db2/V9.7  > NEXT
      6. SA MP > Check Do not instal SA MP > NEXT
      7. DAS user> 
        1. Username: dasusr1
        2. Group name: dasadm1
        3. Password: Pass4conn > NEXT
      8. Instance setup > Choose Create a DB2 instance > NEXT
      9. Partitioning option > Single partition instance > NEXT
      10. Instance owning user > 
        1. User name: db2inst1
        2. Group name: db2iadm1
        3. Password:  Pass4conn  > NEXT
      11. Fenced user >
        1. User name: db2fenc1
        2. Group name: db2fadm1
        3. Password:  Pass4conn > NEXT
      12. Tools catalog > Choose Prepare the DB2 tools catalog > NEXY
      13. Notification setup > Do not set up your DB2 server to send notifications at this time > NEXT
      14. Summary > Make sure, that all is ok > FINISH
    3. Setup path to root as db2inst1 has in .bashrc - to be able to run db commands as root
      1. [root@icdb ~]# less /home/db2inst1/.bashrc
      2. Copy following lines
      3. # The following three lines have been added by UDB DB2.
        if [ -f /home/db2inst1/sqllib/db2profile ]; then
            . /home/db2inst1/sqllib/db2profile
        fi
      4. and paste it in to a /root/.bashrc
      5. [root@icdb ~]# vim /root/.bashrc
    4. Reconfigure DB2 installation
    5. Then configure TCPIP communications:
    6. Edit /etc/services (as root), add to bottom of file:
    7. db2inst1 50000/tcp
      DB2_d2binst1_2 60002/tcp
      DB2_db2inst1 60003/tcp
      DB2_db2inst1_1 60004/tcp
      DB2_db2inst1_2 60005/tcp
      DB2_db2inst1_END 60006/tcp
    8. Setup DB2 communications (as db2inst1)
      1. [root@icdb ~]# su - db2inst1
      2. [db2inst1@icdb ~]# cd ~/sqllib
      3. [db2inst1@icdb ~]# . ./db2profile
      4. [db2inst1@icdb ~]# db2 update database manager configuration using svcename db2inst1
      5. [db2inst1@icdb ~]# db2stop;db2start
      6. [db2inst1@icdb ~]# db2 get database manager configuration
      7. [db2inst1@icdb ~]# db2 db2set DB2COMM=tcpip
      8. [db2inst1@icdb ~]# db2stop;db2star
      9. [db2inst1@icdb ~]# telnet localhost 50000
      10. [db2inst1@icdb ~]# exit
    9. Also need to configure DB2 to start automatically, e.g.:
      1. Edit /etc/rc.local as root, add the following:
        #START DB2 for LOTUS CONNECTIONS
        DB2LOG=/tmp/startDB2.out.`date +"%y%m%d"`
        su db2inst1 -c /home/db2inst1/sqllib/adm/db2start >> $DB2LOG 2>&1

DB2 FixPack Installation

  1. Download from FixCentral
  2. Untar v9.7fp2_linuxx64_server.tar.gz
  3. [root@icdb install]# tar xvfz v9.7fp2_linuxx64_server.tar.gz
  4. To stop all DB2 processes, perform the following steps:
  5. Determine which instances are associated with the DB2 copy In our case only db2inst1. Issue the command:
    1. [root@icdb ~]# su - db2inst1
    2. [db2inst1@icdb ~]$ . $HOME/sqllib/db2profile
    3. [db2inst1@icdb ~]$ db2 force applications all
    4. [db2inst1@icdb ~]$ db2 terminate
    5. [db2inst1@icdb ~]$ db2stop
    6. [db2inst1@icdb ~]$ db2licd -end
    7. [db2inst1@icdb ~]$ exit
  6. If the DB2 Administration Server (DAS) belongs to the DB2 copy that you are updating, stop the DAS:
    1. [root@icdb ~]# su - dasusr1
    2. [dasusr1@icdb ~]$ . $HOME/das/dasprofile
    3. [dasusr1@icdb ~]$ db2admin stop
    4. [dasusr1@icdb ~]$ exit
    5. [root@icdb server]# su - db2inst1
    6. [ db2inst1@icdb ~]# $HOME/sqllib/bin/ipclean
    7. [ db2inst1@icdb ~]# exit
  7. Run fix pack installation
    1. [root@icdb ~]# cd /opt/install/DB2Fix/universal
    2. [root@icdb  universal]# ./installFixPack -b /opt/ibm/db2/V9.7/
    3. Make sure, that installation finished with success and without any errors
    4. Note: If you will need to install an ealrier fix pack over currently installed (and higher) use -f level parameter to force db level check. So, go to step 5. and 6. again and then run ./installFixPack -f level -b /opt/ibm/db2/V9.7

License your DB2 

  1. Use IBM Passport Advantage web site to get license key or if you install it from a DVD media, you can find it on.
  2. Find package by Part Number CZ381ML.
  3. Download the part and extract the DB2_ESE_Restricted_QS_Activation_97.zip file in to folder  /opt/install/DB2lic/
  4. Log into DB2 using an db2inst1 admin.
  5. Open a command prompt, change to the directory where the license file is stored, and run the following command:
    • [db2inst1@icdb ~]$ db2licm -a /opt/install/DB2lic/ese_o/db2/license/db2ese_o.lic
  6. Verify that the license is registered by running the following command:
    • [db2inst1@icdb ~]$ db2licm -l 
    • If the license is correctly registered, the details of your DB2 installation are displayed.
  7. Restart DB2.

Setup DB2 instance to run after reboot

  • First you need to configure fault monitor to start during system (os) start:
  • [root@icdb ~]# db2fmcu -u -p /opt/IBM/db2/bin/db2fmcd
  • Now you can enable FMC to automatically start the instance when the system is booted. To enable this feature for instance DB2INST1, type the following command:
  • [db2inst1@icdb ~]$ db2iauto -on db2inst1
  • Try to reboot your server and check if db instance is runningYou can use telnet to localhost on port 50000 or ps -ax | grep db2

In the next chapter we will install TDI on this server

No comments:

Post a Comment