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
- After standart installation disable SELinux and Firewall
- Change hostname
- run command: [root@icdb ~]# system-config-network
- and change hostname to icdb.ys.cz
- Create installation directory
- [root@ icdb ~]# mkdir -p /opt/install/DB2
- [root@ic ~]# chmod 777 -R /opt/install/
- OPTIONAL - If you run in vmware infrastructure install vmware tools
- Mount vmware tools image and install it
- [root@icdb media]# mkdir -p /media/cdrom
- [root@icdb media]# mount /dev/hdc /media/cdrom
- [root@icdb install]# cd /opt/install/
- [root@icdb install]# tar xvzf /media/cdrom VMwareTools-8.3.7-341836.tar.gz
- [root@icdb install]# cd vmware-tools-distrib/
- [root@icdb vmware-tools-distrib]# ./vmware-install.pl
- Leave all options in default during installation wizard and run [root@ic vmware-tools-distrib]# reboot
- 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
- After download from, save tar in to /opt/install/DB2
- extract tar.gz file
- [root@icdb media]# cd /opt/install/DB2
- [root@icdb media]# tar xvfz DB2_ESE_Restricted_QS_Activation_97.zip
- 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)
- [root@icdb ese]# ./db2setup
- Go trough wizard as follow:
- Introduction > NEXT
- Software License Agreement > Accept > NEXT
- Installation type > Typical > NEXT
- Installation action > NEXT
- Installation directory > we used /opt/IBM/db2/V9.7 > NEXT
- SA MP > Check Do not instal SA MP > NEXT
- DAS user>
- Username: dasusr1
- Group name: dasadm1
- Password: Pass4conn > NEXT
- Instance setup > Choose Create a DB2 instance > NEXT
- Partitioning option > Single partition instance > NEXT
- Instance owning user >
- User name: db2inst1
- Group name: db2iadm1
- Password: Pass4conn > NEXT
- Fenced user >
- User name: db2fenc1
- Group name: db2fadm1
- Password: Pass4conn > NEXT
- Tools catalog > Choose Prepare the DB2 tools catalog > NEXY
- Notification setup > Do not set up your DB2 server to send notifications at this time > NEXT
- Summary > Make sure, that all is ok > FINISH
- Setup path to root as db2inst1 has in .bashrc - to be able to run db commands as root
- [root@icdb ~]# less /home/db2inst1/.bashrc
- Copy following lines
- # The following three lines have been added by UDB DB2.
if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi - and paste it in to a /root/.bashrc
- [root@icdb ~]# vim /root/.bashrc
- Reconfigure DB2 installation
- Then configure TCPIP communications:
- Edit /etc/services (as root), add to bottom of file:
- 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 - Setup DB2 communications (as db2inst1)
- [root@icdb ~]# su - db2inst1
- [db2inst1@icdb ~]# cd ~/sqllib
- [db2inst1@icdb ~]# . ./db2profile
- [db2inst1@icdb ~]# db2 update database manager configuration using svcename db2inst1
- [db2inst1@icdb ~]# db2stop;db2start
- [db2inst1@icdb ~]# db2 get database manager configuration
- [db2inst1@icdb ~]# db2 db2set DB2COMM=tcpip
- [db2inst1@icdb ~]# db2stop;db2star
- [db2inst1@icdb ~]# telnet localhost 50000
- [db2inst1@icdb ~]# exit
- Also need to configure DB2 to start automatically, e.g.:
- 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
- Download from FixCentral
- Untar v9.7fp2_linuxx64_server.tar.gz
- [root@icdb install]# tar xvfz v9.7fp2_linuxx64_server.tar.gz
- To stop all DB2 processes, perform the following steps:
- Determine which instances are associated with the DB2 copy In our case only db2inst1. Issue the command:
- [root@icdb ~]# su - db2inst1
- [db2inst1@icdb ~]$ . $HOME/sqllib/db2profile
- [db2inst1@icdb ~]$ db2 force applications all
- [db2inst1@icdb ~]$ db2 terminate
- [db2inst1@icdb ~]$ db2stop
- [db2inst1@icdb ~]$ db2licd -end
- [db2inst1@icdb ~]$ exit
- If the DB2 Administration Server (DAS) belongs to the DB2 copy that you are updating, stop the DAS:
- [root@icdb ~]# su - dasusr1
- [dasusr1@icdb ~]$ . $HOME/das/dasprofile
- [dasusr1@icdb ~]$ db2admin stop
- [dasusr1@icdb ~]$ exit
- [root@icdb server]# su - db2inst1
- [ db2inst1@icdb ~]# $HOME/sqllib/bin/ipclean
- [ db2inst1@icdb ~]# exit
- Run fix pack installation
- [root@icdb ~]# cd /opt/install/DB2Fix/universal
- [root@icdb universal]# ./installFixPack -b /opt/ibm/db2/V9.7/
- Make sure, that installation finished with success and without any errors
- 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
- Use IBM Passport Advantage web site to get license key or if you install it from a DVD media, you can find it on.
- Find package by Part Number CZ381ML.
- Download the part and extract the DB2_ESE_Restricted_QS_Activation_97.zip file in to folder /opt/install/DB2lic/
- Log into DB2 using an db2inst1 admin.
- 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
- 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.
- 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 running. You 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