IBM DB2 on Debian
From MyWiki
(New page: '''IBM DB2 on Debian''' Packages to install: * rpm (create <tt>/var/lib/rpm</tt> and run <tt>rpm --initdb</tt>) * pdksh * libstdc++2.10-glibc2.2 * libg++2.8.1.3-glibc2.2 ln -s /usr/lib/...) |
m (Protected "IBM DB2 on Debian" [edit=sysop:move=sysop]) |
Current revision as of 15:29, 22 October 2008
IBM DB2 on Debian
Packages to install:
- rpm (create /var/lib/rpm and run rpm --initdb)
- pdksh
- libstdc++2.10-glibc2.2
- libg++2.8.1.3-glibc2.2
ln -s /usr/lib/libc.so /usr/lib/libc.so.6
copy DB2 distrib to you hard drive:
cp -r /cdrom/DB2ESE.V82 /tmp/
add --nodeps to rpm -ivh command in /tmp/DB2ESE.V82/db2/linux/db2_install line 1034
You need the following rpm's
- IBM_db2adsg81-8.1.0-64.i386.rpm
- IBM_db2adt81-8.1.0-64.i386.rpm
- IBM_db2cliv81-8.1.0-64.i386.rpm
- IBM_db2conv81-8.1.0-64.i386.rpm
- IBM_db2msen81-8.1.0-64.i386.rpm
- IBM_db2sp81-8.1.0-64.i386.rpm
Modify the kernel parameters by adding the following entries to the default system control configuration file, /etc/sysctl.conf:
kernel.msgmni = 1024 kernel.sem = 250 256000 32 1024
Run sysctl -p to re-read /etc/sysctl.conf
The following taken from "Setting up DB2 servers after manual installation"
To create groups on Linux, enter the following commands:
groupadd -g 999 db2iadm1 groupadd -g 998 db2fadm1 groupadd -g 997 dasadm1
Create users for each group:
useradd -u 1004 -g db2iadm1 -m -d /home/db2inst1 db2inst1 useradd -u 1003 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1 useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1
Create DAS:
/opt/IBM/db2/V8.1/instance/dascrt -u dasusr1
Create Instance:
/opt/IBM/db2/V8.1/instance/db2icrt -a SERVER -u db2fenc1 db2inst1
TCP/IP communication configuration (I called the service vegadb2, you can call it whatever name you like):
- add to /etc/services:
vegadb2 3700/tcp
- su - db2inst1
- db2set DB2COMM=tcpip
- db2 update db manager cfg using svcename vegadb2
- check that SVCENAME is set using:
db2 get db manager cfg
- db2stop && db2start
GUI
As a user run:
xhost +local:db2inst1
to allow db2inst1 user to run X apps
then:
su - db2inst1 export DISPLAY=:0.0 db2cc
Firewall
If you want the database to be accessible from outside of the firewall you'll need to enable access to the ports that DB2 is serving from (50000 is the default on DB2 UDB for Windows, 60000 on UNIX). If you want the administration server to be accessible, you'll also need to enable access to port 523.
If the DB2 server is behind a firewall doing network address translation, you'll need to forward these ports.
If your DB2 server is on Windows and running some kind of application firewall like ZoneAlarm you'll need to enable the server privilege for various DB2 processes (db2syscs and db2bp spring to mind) if you want DB2 to be accessible.
CHECK OUT! db2osconf utility for OS parameters configuration.