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=$path:$java_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.
db2 安装盘上有个db2setup程序,它会指导您完成一切。。。
以root登陆,然后执行这个程序。ok
新闻热点
疑难解答