在Feisty Fawn上面安装DB2 V8.2 UDB ESE

数据库服务和管理,MySQL/PostgreSQL/Oracle/Sybase 等
回复
zouzhile
帖子: 36
注册时间: 2005-11-16 9:40
送出感谢: 0
接收感谢: 0

在Feisty Fawn上面安装DB2 V8.2 UDB ESE

#1

帖子 zouzhile » 2007-09-10 13:45

DB2 Installation:
1 Prepare the IBM JDK 5.0
1)Download Installation Package: ibm-java2-sdk-5.0-5.1-linux-i386.tgz
2)Extract the package to /usr/lib/jvm directory, and the following directory is obtained:
/usr/lib/jvm/ibm-java2-i386-50
3)Set the system JVM to the IBM JDK.
update-alternatives --install /usr/bin/java java /usr/lib/jvm/ibm-java2-i386-50/bin/java 500
Finally run:
update-alternatives --set java /usr/lib/jvm/ibm-java2-i386-50/bin/java
OR
update-alternatives --config java and select IBM JDK
4)Edit the /etc/environment to set the following environment variables:
CLASSPATH=/usr/lib/jvm/ibm-java2-i386-50/lib/tools.jar:/usr/lib/jvm/ibm-java2-i386-50/lib/dt.jar
JAVA_HOME=/usr/lib/jvm/ibm-java2-i386-50
and add the /usr/lib/jvm/ibm-java2-i386-50/bin to the PATH variable
2 Install DB2 to /opt directory
1)Make sure “alien” is installed, if not, it can be installed as follows:
apt-get alien
2)Modify the DB2_PackageDir/db2/linux/db2_install script.
Find
( rpm -ivh ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1; echo $? > ${TMPRC?} ) | tee -a ${DB2INSTLOG?}
Change it to:
( alien -dic ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1; echo $? > ${TMPRC?} ) | tee -a ${DB2INSTLOG?}
3)Go to the DB2_PackageDir/db2/linux/ directory and issue the following command:
alien -d -i -c *.rpm
This will install DB2 to the directory /opt/IBM/db2/V8.1
4)Post Installation configurations
As root, create the required groups:
groupadd -g 999 db2iadm1
groupadd -g 998 db2fadm1
groupadd -g 997 dasadm1
As root, create the required users and assign them the corresponding groups
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 the DB2 Administration Server and DB2 database instance:
/opt/IBM/db2/V8.1/instance/dascrt -u dasadm1
/opt/IBM/db2/V8.1/instance/db2icrt -a server -u db2fenc1 db2usr1
Enabling Remote Connections
gedit /etc/services
Find entries related to DB2, update the port and communication protocol as needed.
3 Update the license
1)Enter the DB2 console
su – db2inst1
2)Suppose the license file is at /opt/db2_license/db2ese.lic, issue the following command:
db2licm -a /opt/db2_license/db2ese.lic
If fails to activate the license, edit the nodelock file to move the new license entry to top:
gedit /var/lum/nodelock
3)Now can start and stop server like this:
su – db2inst1
db2start db2stop
4 Run the DB2 Control Center
1)As root, create password for db2inst1
passwd db2inst1
2)Install openSSH with Synaptic Package Manager
3)Enter the DB2 console using the following command
ssh -X db2inst1@localhost
4)Run the DB2 Control Center with the following command
db2cc
回复

回到 “数据库管理”