Just thought of adding a post since DB2 popbuilder don't have a clear cut installation steps for DB2 installation for Linux hosts. I am trying this on a RHEL 5.1 machine. I am just starting on DB2 stuff so you can expect more on DB2 in future posts. Everything is self explanatory as I am just copy pasting the logs console logs from bash.
Don't get confused.. my installation directory is /home/db2.
1. Downloaded the package DB2_ESE_V913_LNXX86.tar from IBM Site. I have downloaded this one since I am running a 32bit RHEL 5.1 on top of VMware ESX.
2. Dependency : libstdc++.so.5
3. Used the whatprovides switch to find the appropriate package from my local yum repository
[root@basil-db1]# yum whatprovides libstdc++.so.5
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up repositories
ClusterStorage 100% |=========================| 1.1 kB 00:00
VT 100% |=========================| 1.1 kB 00:00
Server 100% |=========================| 1.1 kB 00:00
Cluster 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
compat-libstdc++-33.i386 3.2.3-61 Server
Matched from:
libstdc++.so.5
Importing additional filelist information
Exiting on user cancel
[root@basil-db1 db2install]
4. [root@basil-db1]# yum install compat-libstdc++*
-- snipped--
Running Transaction
Installing: compat-libstdc++-296 ######################### [1/2]
Installing: compat-libstdc++-33 ######################### [2/2]
Installed: compat-libstdc++-296.i386 0:2.96-138 compat-libstdc++-33.i386 0:3.2.3-61
Complete!
[root@basil-db1]#
5. Unzipped package folder looks like this.
[root@basil-db1 db2install]# ls
db2 DB2_ESE_V913_LNXX86.tar db2_install db2prereqcheck db2setup doc installFixPack
[root@basil-db1 db2install]#
6. I choose to install db2 on /home/db2 since I dont have enough space on the default location /opt/ibm/db2/V9.1
[root@basil-db1 db2install]# mkdir /home/db2
[root@basil-db1 db2install]# ./db2_install
Default directory for installation of products - /opt/ibm/db2/V9.1
***********************************************************
Do you want to choose a different directory to install [yes/no] ?
yes
Enter full path name for the install directory -
------------------------------------------------
/home/db2
Specify one or more of the following keywords,
separated by spaces, to install DB2 products.
CLIENT
RTCL
ESE
Enter "help" to redisplay product names.
Enter "quit" to exit.
***********************************************************
ESE
DB2 installation is being initialized.
Total number of tasks to be performed: 46
Total estimated time for all tasks to be performed: 808
..... snipped ....
Task #46 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #46 end
The execution completed successfully.
For more information see the DB2 installation log at
"/tmp/db2_install.log.5657".
[root@basil-db1 db2install]#
7. Verify /tmp/db2_install.log.5657 to check for errors
8. Next is creation of groups and users.
[root@basil-db1 db2install]# groupadd -g 999 db2iadm1
[root@basil-db1 db2install]# groupadd -g 998 db2fadm1
[root@basil-db1 db2install]# groupadd -g 997 db2asgr
[root@basil-db1 db2install]# useradd -g db2iadm1 -m db2inst1 -p password
[root@basil-db1 db2install]# useradd -g db2fadm1 -m db2fenc1 -p password
[root@basil-db1 db2install]# useradd -g db2fadm1 -m db2fenc1 -p password
Can use a good password than my conventional cheeky 'password' ;)
9. Create DB2 administration server (DAS)
[root@basil-db1 instance]# pwd
/home/db2/instance
[root@basil-db1 instance]#
[root@basil-db1 instance]# ./dascrt -u db2as
SQL4409W The DB2 Administration Server is already active.
DBI1070I Program dascrt completed successfully.
[root@basil-db1 instance]#
10. Create DB2 instances for the added users
[root@basil-db1 instance]# ./db2icrt -u db2fenc1 db2inst1
DBI1070I Program db2icrt completed successfully.
[root@basil-db1 instance]#
11. Applying license
[root@basil-db1 license]# /home/db2/adm/db2licm -a /home/db2install/db2/license/db2ese.lic
LIC1402I License added successfully.
LIC1426I This product is now licensed for use as specified in the License Agreement and License Information documents pertaining to the licensed copy of this product. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT AND LICENSE INFORMATION DOCUMENTS, LOCATED IN THE FOLLOWING DIRECTORY: "/home/db2/license/en_US.iso88591"
[root@basil-db1 license]#
12. Creating sample Database
[root@basil-db1 adm]# su - db2inst1
[db2inst1@basil-db1 ~]$
[db2inst1@basil-db1 ~]$ cd /home/db2/adm/
[db2inst1@basil-db1 adm]$
[db2inst1@basil-db1 adm]$ db2sampl
Creating database "SAMPLE"...
Connecting to database "SAMPLE"...
Creating tables and data in schema "DB2INST1"...
'db2sampl' processing complete.
[db2inst1@basil-db1 adm]$ db2 list database directory
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/db2inst1
Database release level = b.00
Comment = A sample database
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
[db2inst1@basil-db1 adm]$
13. Connecting to DB2 sample Database:
[db2inst1@basil-db1 adm]$ db2 connect to sample
Database Connection Information
Database server = DB2/LINUX 9.1.3
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
[db2inst1@basil-db1 adm]$
14. Set the profile in the /etc/profile to get proper path to binaries.
Add the below line to /etc/profiles
. /home/db2inst1/sqllib/db2profile
15. You are done with DB2 setup. Make sure that your firewall is not blocking DB2 ports in the host level.
[root@basil-db1 adm]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@basil-db1 adm]#
DB2 9.1 installation on RHEL 5.1 or CentOS 5.1
Wednesday, February 25, 2009 Posted by admin at 4:44 PM | Labels: Database
Subscribe to:
Post Comments (Atom)
2 comments:
Hi Uppayinix,
I'm trying to install DB2 on debian lenny.
Is there anyway this will work?
I am new to Debian lenny.
Thanks,
Grenaldo Pritzero
Sorry for the late reply. You many need to install the same lib packages using apt-get command or dpkg -i command on debian.
Rest of the steps will be same.
Post a Comment