Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DB2 client
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
huuan
Apprentice
Apprentice


Joined: 19 Feb 2007
Posts: 265
Location: California

PostPosted: Thu Sep 04, 2008 12:08 am    Post subject: DB2 client Reply with quote

As the main database I work with has recently changed from sybase to Ibm DB2 I need to get a DB2 client running on the server.

I downloaded and installed the DB2 v9.5 runtime client which these days is called 'IBM Server Runtime Client' and it appeared to install with no problem.
However it doesn't seem to do anything and DB2 can't be found. So I added the DB2 bin directory to path and now the best I can do is error messages.

There were no straightforward install instructions but from other DB2 installs I've tried before I followed this post-install guide Creating the users. There's no dascrt in the client install so I skipped that step but when I try the next step, creating an instance using db2icrt, I get
Quote:
instance # ./db2icrt db2inst1
/bin/bash: /opt/ibm/db2/V9.5/instance/db2idbm: /bin/sh: bad interpreter: Permission denied
cat: /tmp/db2icrt.tmp1.26532: No such file or directory
DBI1281E The database manager configuration file could not be
initialized.


Which seems like it might be related to the /tmp error here

Rather than edit all the files with references to /tmp I wonder is there a way to temporarily direct references to /tmp to /root/tmp?

Or should I just give up and go use Ubuntu for working with a DB2 client?

Thanks
Back to top
View user's profile Send private message
ibins
n00b
n00b


Joined: 27 Jul 2007
Posts: 27

PostPosted: Thu Sep 04, 2008 7:19 am    Post subject: Re: DB2 client Reply with quote

huuan wrote:

Or should I just give up and go use Ubuntu for working with a DB2 client?

if you want, but there is no need to do this. On my gentoo box, I have several db2 instances for production use ( development ) up and running:

Code:

gms2 ~ # . /home/db2inst1/sqllib/db2profile
gms2 ~ # db2level
DB21085I  Instance "db2inst1" uses "32" bits and DB2 code release "SQL08029"
with level identifier "030A0106".
Informational tokens are "DB2 v8.1.3.144", "s080111", "MI00211", and FixPak
"16".
Product is installed at "/opt/IBM/db2/V8.1".

gms2 ~ # . /home/db2inst2/sqllib/db2profile
gms2 ~ # db2level
DB21085I  Instance "db2inst2" uses "64" bits and DB2 code release "SQL09050"
with level identifier "03010107".
Informational tokens are "DB2 v9.5.0.0", "s071001", "LINUXAMD6495", and Fix
Pack "0".
Product is installed at "/opt/IBM/db2/V9.5".


and here is my quick and dirty mini-howto:
Code:

# prerequisites
emerge sys-libs/libstdc++-v3 dev-libs/libaio app-arch/rpm app-shells/pdksh sys-apps/gawk

# create users and groups
groupadd db2asgrp
groupadd db2iadm1
groupadd db2fadm1

useradd -m -d "/home/dasusr1" -g db2asgrp dasusr1
useradd -m -d "/home/db2inst1" -g db2iadm1 db2inst1
useradd -m -d "/home/db2fenc1" -g db2fadm1 db2fenc1

# untar the db2 archive
mkdir /tmp/db2inst
cd /tmp/db2inst
tar -xf "DB2_ESE_V95_Linux_x86-64.tar"
# test server prerequisites
./db2prereqcheck
# test client prerequisites
./db2prereqcheck -c

# modify the db2_install script
sed -ie 's/rpm -ivh/rpm --force --nodeps -ivh/' "db2/linuxamd64/install/db2_install"

# run install
bash "db2/linuxamd64/install/db2_install" -b "/opt/IBM/db2/V9.5"

# copy the license file
find -name "*.lic" -exec cp -f {} "/home/db2inst1/" \;

# Create the DB2 Administration Server:
/opt/IBM/db2/V9.5/instance/dascrt -u dasusr1

# Create the DB2 database instance:
/opt/IBM/db2/V9.5/instance/db2icrt -a server -u db2fenc1 db2inst1

# set service/port
su - db2inst1 -c ". sqllib/db2profile; db2 update dbm cfg using svcename $DB2_PORT"

# set tcp communication
su - db2inst1 -c ". sqllib/db2profile; db2set DB2COMM=tcpip"

# set sysadmin group
su - db2inst1 -c ". sqllib/db2profile; db2 update dbm cfg using sysadm_group db2iadm1"

# set jdk_path
# su - db2inst1 -c ". sqllib/db2profile; db2 update dbm cfg using JDK_PATH /opt/jdk32"

# add license
su - db2inst1 -c ". sqllib/db2profile; for file in /home/db2inst1/*.lic; do db2licm -a \$file; done"

# db2stop
su - db2inst1 -c ". sqllib/db2profile; db2stop"

# db2start
su - db2inst1 -c ". sqllib/db2profile; db2start"


I hope this will help
Back to top
View user's profile Send private message
huuan
Apprentice
Apprentice


Joined: 19 Feb 2007
Posts: 265
Location: California

PostPosted: Thu Sep 04, 2008 6:42 pm    Post subject: Reply with quote

hmmm that seems to be a full install of 95 whereas I was looking for just the runtime client.

I'll try the full install but for my cpu x86-32 and let you know. Thanks.
Back to top
View user's profile Send private message
huuan
Apprentice
Apprentice


Joined: 19 Feb 2007
Posts: 265
Location: California

PostPosted: Fri Jul 31, 2009 12:32 am    Post subject: Reply with quote

Thought I better follow up at last.
I gave up trying to install on gentoo, it was costing too many hours. Instead found an old 500 Mhz dell box, installed ubuntu server 7.10 and the full DB@ which ubuntu had in their repository. End of story.
Now have a dedicated DB2 client box whose sole purpose in life is to chat with the main DB2 serve, save th eresults in MySql and deliver then to my other box on demand.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum