免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 10181 | 回复: 11
打印 上一主题 下一主题

DB2在linux下如何安装? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2002-02-22 12:08 |只看该作者 |倒序浏览
我想在linux下安装DB2但是好像很麻烦,哪位仁兄可以告诉我安装步骤!不胜感激!!

论坛徽章:
0
2 [报告]
发表于 2002-02-25 22:21 |只看该作者

DB2在linux下如何安装?

DB2 Version 7.1 for Linux HOWTO

3. Preparing your distribution for DB2
3.1. Caldera OpenLinux 2.4
3.1.1. Before installing DB2 on Caldera OpenLinux
This section contains instructions that you must follow before installing DB2.

Preparing for the installation of DB2

Install the pdksh-5.2.14-1.i386.rpm package from the Caldera OpenLinux CD-ROM in the /Packages/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package: bash# rpm -ivh /mnt/cdrom/Packages/RPMS/pdksh-5.2.14-1.i386.rpm



Remove the jdk package, (JDK 1.2.2 from Sun), since it will conflict with the IBM Developer Kit for Java that you will install in the next step. To remove Sun's JDK, issue the following command as root: bash# rpm -e jdk



Install the IBM Developer Kit for Java. A brief set of installation directions is included in Section 11.

Edit the JAVA_HOME and PATH entries in /etc/config.d/shells/bashrc to remove the references to the JDK from Sun and update them to reflect the IBM Developer Kit for Java. The section that I changed started as:     [ -z "$JAVA_HOME" ]&& [ -d /usr/java ] && (
            export JAVA_HOME=/usr/java
            [ -r $JAVA_HOME/lib/classes.zip ] &&
              export CLASSPATH=$JAVA_HOME/lib/classes.zip
)




Replace it with the following section to reflect the default locations for the IBM Developer Kit for Java:     [ -z "$JAVA_HOME" ]&& [ -d /usr/jdk118 ] && (
            export JAVA_HOME=/usr/jdk118
            export PATH=$PATHJAVA_HOME/bin
            [ -r $JAVA_HOME/lib/classes.zip ] &&
              export CLASSPATH=$JAVA_HOME/lib/classes.zip
)




3.1.2. Installing DB2 and creating instances on Caldera
Follow the instructions in Section 4 the generic section on installing DB2, and go ahead and create the instances. It's probably a good idea at this point to read through Section 3.1.3 to keep in mind the steps that you need to take after installing DB2.

3.1.2.1. What does /etc/login.defs not accessible, using defaults mean?
3.1.2.2. Okay, DB2 is installed and I created the instances. Now what do I do?
3.1.2.1. What does /etc/login.defs not accessible, using defaults mean?

It means something went slightly wrong, but it's okay. You may get this message splashed across your installation screen one or more times during the DB2 installation process, but other than not looking pretty, DB2 still installs correctly. Caldera apparently doesn't include a /etc/login.defs configuration file. The file controls the default options for the useradd command for adding new users, including policies like how many days before the new user's password expires and whether a home directory should be created for a new user. For more information on the /etc/login.defs file, refer to the man page for useradd.

3.1.2.2. Okay, DB2 is installed and I created the instances. Now what do I do?

Now that you've installed DB2, you have to perform some steps to configure your instances correctly. Keep reading.

3.1.3. After installing DB2 on Caldera
This section contains instructions that you must follow after installing DB2.

3.1.3.1. Adding instance user IDs to their groups
The most important step is to manually add the instance user ID to the corresponding instance group you defined during the instance creation step. DB2 and Caldera OpenLinux don't get this part of the DB2 instance creation process right, so you have to do it yourself. You can add an instance user ID to an instance group in two ways:


Edit /etc/group to add the appropriate instance user ID to the last field for each group.

Use the COAS utility to manage your groups by selecting KDE menu, Settings, COAS, System, Accounts, then selecting the Groups submenu and the Manage Groups menu item.


3.1.3.2. Changing the default home page in Netscape
The DB2 Control Center and the DB2 Information Center use the Netscape browser to display help and documentation. This works for the first document you display in the browser, but if you try to switch to a different DB2 document (for example, from one book to another), you may instead be redirected to the default home page set by the Caldera OpenLinux installation process. I found that this problem went away as soon as I changed the default home page in the Edit menu, Preferences menu item.

3.1.3.3. Removing the Caldera login greeting
Add a file called .hushlogin to the home directory of each of your instance user IDs. This should prevent the Welcome to your OpenLinux system! messages while running DB2 commands.

DB2 generates these messages on Caldera because the DB2 commands run under the root user ID, which in turn becomes the instance owner to invoke commands. Part of this su process calls one or both of /etc/config.d/shells/csh.login and /etc/config.d/shells/profile, which in turn call the /etc/config.d/shells/OL-greeting script that contains the offensive string.

Instead of adding .hushlogin to every user's home directory, you could probably edit /etc/config.d/shells/OL-greeting to remove the message (or change it to something else, if you want). I haven't tried it myself, so let me know what works best.

3.2. Linux-Mandrake 7.2
The DB2 server and command line DB2 client works on Linux-Mandrake 7.2, and I was able to successfully start and use the DB2 Control Center with IBM JDK 1.1.8 (build 20000713).

3.2.1. Before installing DB2 on Linux-Mandrake
Preparing for the installation of DB2

Install the pdksh-5.2.14-8mdk.i586.rpm package from the Linux-Mandrake CD-ROM in the /Mandrake/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package: bash# rpm -ivh /mnt/cdrom/Mandrake/RPMS/pdksh-5.2.14-8mdk.i586.rpm



3.2.2. Installing DB2 and creating instances on Linux-Mandrake
When you run db2setup, you may receive the following error: ksh: /etc/profile.d/tmdir.sh[9]: source: not found This is only a warning message and you can continue installing DB2. If the message interferes with the db2setup menu, press CTRL-L to clear the screen.

Otherwise, follow the instructions in Section 4, the generic section on installing DB2 and creating instances.

3.2.3. After installing DB2 on Linux-Mandrake
With Linux-Mandrake 7.2, there are no special steps to take after installing DB2 Version 7.1. The DB2 server and command line client work out of the box, and the DB2 Control Center worked with IBM JDK 1.1.8 (build 20000713).

3.3. Red Hat Linux 6.2
3.3.1. Before installing DB2 on Red Hat
Preparing for the installation of DB2

Install the pdksh-5.2.14-2.i386.rpm package from the Red Hat CD-ROM in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package: bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/pdksh-5.2.14-2.i386.rpm



3.3.2. Installing DB2 and creating instances on Red Hat
Follow the instructions in Section 4, the generic section on installing DB2 and creating instances.

3.3.3. After installing DB2 on Red Hat
With Red Hat 6.2, you don't need to take any special steps after installing DB2 Version 7.1. It works.

3.4. Red Hat Linux 7.1
3.4.1. Before installing DB2 on Red Hat
Preparing for the installation of DB2

Install the pdksh-5.2.14-12.i386.rpm package from Red Hat CD-ROM (2) in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package: bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/pdksh-5.2.14-12.i386.rpm



For a compatible version of the libstdc++ library, install the compat-egcs-c++-6.2-1.1.2.14.i386.rpm package from Red Hat CD-ROM (2) in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the compat-egcs-c++ package: bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/compat-egcs-c++-6.2-1.1.2.14.i386.rpm



Install the compat-libs-6.2-3.i386.rpm package from Red Hat CD-ROM (2) in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the compat-libs package: bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/compat-libs-6.2-3.i386.rpm



The db2setup command looks for a file called /usr/lib/libncurses.so.4 and will not proceed unless it exists, so create a symbolic link from the ncurses4.0 library in /usr/i386-glibc21-linux/lib/ to your /usr/lib/ directory. bash# ln -sf /usr/i386-glibc21-linux/lib/libncurses.so.4.0 /usr/lib/libncurses.so.4




The default setting for the msgmni kernel parameter only allows a couple of simultaneous connections to DB2. To set this value at at boot time, append the following lines to /etc/sysctl.conf: # Sets maximum number of message queues to 128
# Set this to 1024 or higher on production systems
kernel.msgmni = 128




3.4.2. Installing DB2 and creating instances on Red Hat
Follow the instructions in Section 4, the generic section on installing DB2 and creating instances.

3.4.3. After installing DB2 on Red Hat
Red Hat 7.1 enabled the floating point stack feature of the glibc library. Unfortunately, this causes Java programs using IBM JDK 1.1.8, including the DB2 Control Center, to fail miserably. Fortunately, you can disable the floating point stack by setting the LD_ASSUME_KERNEL environment variable to 2.2.5 before running the DB2 Control Center as follows: bash$ export LD_ASSUME_KERNEL=2.2.5
bash$ db2jstrt 6790
bash$ db2cc 6790




With IBM JDK 1.3 (IBMJava2-SDK-1.3-7.0-i386.rpm), the DB2 Control Center started successfully without any workarounds. For instructions on installing the IBM JDK, see Section 11.

3.5. SuSE Linux
3.5.1. Before installing DB2 on SuSE
At some point in its past, SuSE included an old beta version of DB2 in their distribution. When you install SuSE Linux, up to and including version 7.0, the SuSE installer still creates the default DB2 user IDs and sets their home directories in /usr/lib. This can cause some difficulties when you set up the DB2 instances. Before installing DB2, remove the default DB2 user IDs by issuing the following commands as root: bash# userdel -r db2as
bash# userdel -r db2fenc1
bash# userdel -r db2inst1




3.5.2. Installing DB2 and creating instances on SuSE
Follow the instructions in Section 4, the generic section on installing DB2.

3.5.3. After installing DB2 on SuSE
With SuSE 6.2 or above, I have not needed to take any special steps after installing DB2 Version 7.1. It just works—and that's nice.

3.6. TurboLinux 6.0
3.6.1. Before installing DB2 on TurboLinux
TurboLinux 6.0 includes all of the required packages at or above the minimum required levels for DB2 Version 7.1.

3.6.2. Installing DB2 on TurboLinux
Follow the instructions in Section 4, the generic section on installing DB2.

3.6.3. After installing DB2 on TurboLinux
When you run the DB2 Control Center with TurboLinux 6.0, the console window may display a number of map failed messages. These messages do not indicate a serious problem, so do not worry about them.


论坛徽章:
0
3 [报告]
发表于 2002-02-26 14:37 |只看该作者

DB2在linux下如何安装?

DB2 安装盘上有个DB2Setup程序,它会指导您完成一切。。。
以root登陆,然后执行这个程序。OK

论坛徽章:
0
4 [报告]
发表于 2002-03-04 16:53 |只看该作者

DB2在linux下如何安装?

下面引用由slackerqxl2002/02/26 02:37pm 发表的内容:
DB2 安装盘上有个DB2Setup程序,它会指导您完成一切。。。
以root登陆,然后执行这个程序。OK
安装DB好像还需要很多包的支持,在安装前先要检验所需要的包是否齐全,好像还需要很多东西我安装了很长时间都没有搞定,看来是我太笨了~Q~。最近没时间研究了要出差,谢谢各位的帮助!呵呵!!

论坛徽章:
0
5 [报告]
发表于 2002-03-11 16:36 |只看该作者

DB2在linux下如何安装?

不知道你的linux是什么版本的

论坛徽章:
0
6 [报告]
发表于 2003-06-16 15:17 |只看该作者

DB2在linux下如何安装?

很简单的,我的环境是LINUX8。0+DB28。1
执行./db2setup就可以了。

论坛徽章:
0
7 [报告]
发表于 2003-09-24 09:16 |只看该作者

DB2在linux下如何安装?

可能是我笨,安装的时候一切正常,但就是db2start不起来,我用正版的 v6.1试过了也一样,问IBM的DB2工程师,他们也说不出个所以然,现在我已经彻底放弃了,选用了oracle.

论坛徽章:
0
8 [报告]
发表于 2005-01-14 18:04 |只看该作者

DB2在linux下如何安装?

[quote]原帖由 "steelbrick"]可能是我笨,安装的时候一切正常,但就是db2start不起来,我用正版的 v6.1试过了也一样,问IBM的DB2工程师,他们也说不出个所以然,现在我已经彻底放弃了,选用了oracle.[/quote 发表:


我在安装db2 7.1 在RedHat 9的时候也出现了相同的问题,db2start起不了数
据库。可能是因为RedHat linux默认的最大的系统消息队列数太小, 把它改到
128因该就可以了。 修改文件 /etc/sysctl.conf 增加下面的内容
# Set this to 1024 or higher on production systems
kernel.msgmni = 128

The default setting for the msgmni kernel parameter only allows a
couple of simultaneous connections to DB2. To set this value at at boot time, append the following lines to /etc/sysctl.conf: # Sets
maximum number of message queues to 128

# Set this to 1024 or higher on production systems
kernel.msgmni = 128

论坛徽章:
0
9 [报告]
发表于 2005-01-17 13:02 |只看该作者

DB2在linux下如何安装?

原帖由 "dots" 发表:


我在安装db2 7.1 在RedHat 9的时候也出现了相同的问题,db2start起不了数
据库。可能是因为RedHat linux默认的最大的系统消息队列数太小, 把它改到
128因该就可以了。 修改文件 /etc/sysctl.conf 增加下面的内..........


db2 v7使用之前需要手工修改一些内核参数.
db2 v8实例启动的时候会自动修改,方便了很多

论坛徽章:
0
10 [报告]
发表于 2005-01-18 19:05 |只看该作者

DB2在linux下如何安装?

在linux下安装DB2比oracle要容易些
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP