From e370a939890b5519aa9f2cdf36f2254e7f52e5a2 Mon Sep 17 00:00:00 2001 From: dbs <> Date: Sat, 12 Nov 2005 02:24:01 +0000 Subject: [PATCH] Better tagging throughout, use a more refined install method for Ubuntu. --- LDP/howto/docbook/DB2-HOWTO.xml | 159 +++++++++++++++++++++----------- 1 file changed, 104 insertions(+), 55 deletions(-) diff --git a/LDP/howto/docbook/DB2-HOWTO.xml b/LDP/howto/docbook/DB2-HOWTO.xml index 6480d128..469ba51b 100644 --- a/LDP/howto/docbook/DB2-HOWTO.xml +++ b/LDP/howto/docbook/DB2-HOWTO.xml @@ -1344,7 +1344,7 @@ $JAVA_PATH/$JAVA_INTERPRETER $JAVA_OPTIONS \ The solution here is to run export LD_ASSUME_KERNEL="2.4.19" from the -terminal where you launched the db2setup utility, then run db2setup +terminal where you launched the db2setup utility, then run db2setup again. This change will only affect the Java installer, not the kernel performance. Post-installation notes @@ -1393,9 +1393,10 @@ directory tree than the JDK from IBM that DB2 UDB installs. Therefore, there are 3 options you can choose to deal with this issue: Uninstall the Java2-1.3.1 package before installing, -using either the YaST tool, or with the command line rpm -e -IBMJava2-SDK-1.3.1 command. After installation, this will leave the -IBMJava2–SDK–1.4.1 package as the only Java installation +using either the YaST tool, or with the command line: +rpm -e IBMJava2-SDK-1.3.1 +After installation, this will leave the +IBMJava2-SDK-1.4.1 package as the only Java installation on the system. Leave both Java packages installed. By default, DB2 UDB will use the 1.4.1 JRE that it installs. The fact that SuSE Linux's Java @@ -1429,7 +1430,7 @@ to install the pdksh package found on CD 4. Installation notes SuSE Linux Professional installs its own 1.4.2 Java JRE by default -(the "java2–jre-1.4.2" package). During the DB2 UDB installation, +(the "java2-jre-1.4.2" package). During the DB2 UDB installation, this will cause a warning to be generated: Command to be run: "/bin/rpm -ivh \ '/mnt/cdrom/db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0'.i386.rpm" @@ -1439,9 +1440,9 @@ supplied by SuSE Linux, it will have been installed into a different directory tree than the JDK from IBM that DB2 UDB installs. Therefore, there are 3 options you can choose to deal with this issue: -Uninstall the java2–jre–1.4.2 package -before installing, using either the YaST tool, or with command line rpm -erase command. This will leave the IBMJava2–SDK package as the +Uninstall the java2-jre-1.4.2 package +before installing, using either the YaST tool, or with command line rpm +erase command. This will leave the IBMJava2-SDK package as the only Java installation on the system. Leave both Java packages installed. By default, DB2 UDB will use the 1.4.1 JRE that it installs. The fact that SuSE Linux's Java @@ -1472,17 +1473,21 @@ environment. Pre-installation notes The pdksh package is not installed by default. If you want to install a multiple-partition environment on SuSE Linux Personal, you -will have to install. +will have to install pdksh. The installer may complain about being unable to use the SMTP -server even though postfix is installed and sendmail is available in the -path. Make sure that postfix has been started before +server even though postfix is installed and sendmail is available in the +path. Make sure that postfix has been started before installation. Installation notes The usual trick of adding an xhost entry for localhost and then exporting the DISPLAY=localhost:0 when installing (so that the graphical utilities are displayed on a non-root user's desktop) didn't seem to -work here. Instead, try executing ssh -X root@localhost and launch the -utilities from there. +work here. Instead, execute the following command to log in as root +and forward the X server: +ssh -X root@localhost + + + Installing DB2 Version 8.2 on Fedora Core 2 Before proceeding, please ensure that you have read @@ -1527,9 +1532,9 @@ Could not create the Java virtual machine. The workaround for this error is to install Sun's Java 2 Platform Standard Edition 5.0 RC (Fedora Core 2 doesn't install a Java package by default). The rpm file is available -from http://java.sun.com/j2se/1.5.0/download.jsp. After installing Java, +from http://java.sun.com/j2se/1.5.0/download.jsp. After installing Java, set the environment variables in the terminal where you execute the -db2setup utility: +db2setup utility: export DB2USELOCALJRE=TRUE export JAVA_HOME=/usr/java/jre1.5.0/ /usr/java/jre1.5.0/ is the location @@ -1541,7 +1546,7 @@ so that db2setup works properly with the directory: mkdir jre cd jre ln -s ../bin bin -After making these changes, the db2setup GUI installer works +After making these changes, the db2setup GUI installer works properly. Alternatively, you can avoid the Java-based problems by installing on Fedora Core 2 using @@ -1571,7 +1576,7 @@ db2 UPDATE ADMIN CFG USING JDK_PATH /usr/java/jre1.5.0/ With that update, the DB2 UDB Java-based tools will work properly. -Installing DB2 Version 8.2 on Mandrake Linux 10.1 (Community) +Installing DB2 Version 8.2 on Mandriva Linux 10.1 (Community) Before proceeding, please ensure that you have read and . @@ -1585,8 +1590,8 @@ installing to a single-partition environment. Pre-installation notes The pdksh package is not installed by default. If you want to -install a multiple-partition environment on Mandrake Linux, you will -have to install it using drakconf (it's on CD3). Also, no Java package +install a multiple-partition environment on Mandriva Linux, you will +have to install it using drakconf (it's on CD3). Also, no Java package is installed by default, so we don't have to worry about any conflicts arising from that. Installation @@ -1596,12 +1601,14 @@ problems or issues. If you do experience a hang with the Java installer, try the Sun Java workaround described in the Fedora Core 2 section.</para></sect2> <sect2><title>Post-installation notes -Be careful of the Mandrake Linux security "msec" utility – -it can mess up DB2 UDB functionality by changing world readable -directories (like /home/db2inst1/sqllib/) that are necessary to run DB2 -UDB to non-world readable. If you find that DB2 UDB is not working +Be careful of the Mandriva Linux security msec utility – +it can prevent DB2 from functioning correctly by changing the permissions on +directories like /home/db2inst1/sqllib/ that must be +world-readable for DB2 UDB to non-world readable. If you find that DB2 UDB is not working properly, investigate your -security settings. +security settings. + + Installing DB2 Version 8.2 on Gentoo (2005-01-17) Before proceeding, please ensure that you have read @@ -1649,7 +1656,7 @@ your home directory, issue the following command: cp -r /mnt/cdrom/* ~/cdrom -Open the ~/cdrom/db2/linux/db2_install script in your text editor and modify the following lines +Open the ~/cdrom/db2/linux/db2_install script in your text editor and modify the following lines From: output_df="`df -k ${dirname2?} | tail -1`" @@ -1670,7 +1677,7 @@ To: -Change to the ~/cdrom directory and issue the following command as root: +Change to the ~/cdrom directory and issue the following command as root: ./db2_install @@ -1746,7 +1753,7 @@ useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1 Before you can create the DB2 Administration Server and database instance, you have to modify the db2iutil library to update calls to the tail -command to the current GNU syntax. As root, open the /opt/IBM/db2/V8.1/instance/db2iutil +command to the current GNU syntax. As root, open the /opt/IBM/db2/V8.1/instance/db2iutil file in an editor and make the following changes (or apply the changes to the file using the patch utility): @@ -1803,12 +1810,10 @@ the patch utility): Create the DB2 Administration Server: -/opt/IBM/db2/V8.1/instance/dascrt -u dasusr1 - +/opt/IBM/db2/V8.1/instance/dascrt -u dasusr1 Create the DB2 database instance: -/opt/IBM/db2/V8.1/instance/db2icrt -a server -u db2fenc1 db2inst1 - +/opt/IBM/db2/V8.1/instance/db2icrt -a server -u db2fenc1 db2inst1 @@ -1821,7 +1826,7 @@ DB2 server from remote clients, perform the following steps: Set the port on which DB2 should communicate. Ensure that you select a port that -is not blocked by a firewall or used by another service defined in the /etc/services file. +is not blocked by a firewall or used by another service defined in the /etc/services file. To set the communications port, update the DB2 database manager configuration variable SVCENAME. For example, to set the communications port to 50055, issue the following command as the instance user ("db2inst1", if you've been using the defaults): @@ -1853,7 +1858,7 @@ Running the DB2 Control Center and other DB2 GUI tools To run the DB2 Control Center or other DB2 GUI tools, you must install the IBM Software Developers' Kit for Java. This RPM is included in the DB2 install CD-ROM in -the /db2/linux/Java-1.4/ directory. To install the IBM Software Developers' Kit for +the /db2/linux/Java-1.4/ directory. To install the IBM Software Developers' Kit for Java, change to the root directory of the CD-ROM and issue the following command as root: rpm --force --nodeps -ivh db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0.i386.rpm @@ -1869,20 +1874,66 @@ Log in as the db2inst1 and invoke the DB2 Control Center: and . These notes are based on a single-partition installation on - Ubuntu 5.04. As Ubuntu uses .deb packages, we use the alien + Ubuntu 5.04. As Ubuntu uses .deb packages, we use the alien package conversion utility to convert and install the DB2 RPM packages directly. Pre-installation notes Ensure that you have installed alien: sudo apt-get install alien -If you want to run a multiple-partition environment, you will need to install either the pdksh or ksh package. +If you want to run a multiple-partition environment, you will need to install the pdksh package. Installation notes - To install the product into the /opt/IBM/db2/V8.1/ directory, change - to the db2/linux/ directory of the CD or the extracted tarball - and issue the following command: -sudo alien -dic *.rpm +The RPM packages supplied with the DB2 install CD contain dependency listings that cannot +be satisfied inside a Ubuntu environment, because Ubuntu does not use RPM as a native +packaging method. To overcome these dependencies, you need to modify the db2_install +script to ignore dependencies and force the installation of DB2 onto your system using alien. + +Perform the following steps to modify the db2_install script +and install the product: + + +Open the ~/db2/linux/db2_install script in your text editor and modify the following lines + +From: +( rpm -ivh ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1; \ + echo $? > ${TMPRC?} ) | tee -a ${DB2INSTLOG?} + + +To: +( alien -dic ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1; \ + echo $? > ${TMPRC?} ) | tee -a ${DB2INSTLOG?} + + + +Issue the following command to begin installing DB2: +sudo ./db2_install + + + +The DB2 installer prompts you to enter the keyword of the product you want to install. +for example, issuing the db2_inst command for the DB2 UDB Express +Edition for Linux install displays the following screen: + +Specify one or more of the following keywords, +separated by spaces, to install DB2 products. + + Keyword Product Description + DB2.EXP DB2 UDB Express Edition for LINUX + +Enter "help" to redisplay product names. + +Enter "quit" to exit. + +*********************************************************** +DB2.EXP + + + + + +The DB2 installer will now install many RPM packages into the +/opt/IBM/db2/V8.1/ directory. Post-installation notes @@ -1911,12 +1962,10 @@ sudo useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1 Create the DB2 Administration Server: -sudo /opt/IBM/db2/V8.1/instance/dascrt -u dasusr1 - +sudo /opt/IBM/db2/V8.1/instance/dascrt -u dasusr1 Create the DB2 database instance: -sudo /opt/IBM/db2/V8.1/instance/db2icrt -a server -u db2fenc1 db2inst1 - +sudo /opt/IBM/db2/V8.1/instance/db2icrt -a server -u db2fenc1 db2inst1 @@ -1929,7 +1978,7 @@ DB2 server from remote clients, perform the following steps: Set the port on which DB2 should communicate. Ensure that you select a port that -is not blocked by a firewall or used by another service defined in the /etc/services file. +is not blocked by a firewall or used by another service defined in the /etc/services file. To set the communications port, update the DB2 database manager configuration variable SVCENAME. For example, to set the communications port to 50055, issue the following command as the instance user ("db2inst1", if you've been using the defaults): @@ -1961,13 +2010,13 @@ Running the DB2 Control Center and other DB2 GUI tools To run the DB2 Control Center or other DB2 GUI tools, you must install the IBM Software Developers' Kit for Java. This RPM is included in the DB2 install CD-ROM in -the /db2/linux/Java-1.4/ directory. To install the IBM Software Developers' Kit for +the /db2/linux/Java-1.4/ directory. To install the IBM Software Developers' Kit for Java, change to the root directory of the CD-ROM and issue the following command: -sudo alien -d -i -c db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0.i386.rpm +sudo alien -dic db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0.i386.rpm -Log in as the db2inst1 and invoke the DB2 Control Center: +Log in as the db2inst1 user and invoke the DB2 Control Center: db2cc @@ -1989,7 +2038,7 @@ Center has it's own Java based installer, any Java issues that you experienced above while installing DB2 UDB will likely recur here. However, the fixes we've provided for the DB2 UDB install should work for the DB2 UDB Information Center install too. -After mounting, run the "db2setup" utility from the base +After mounting, run the db2setup utility from the base directory. This will launch the Java-based setup wizard. You can also use the other setup methods we've talked about, but since the GUI installation sets up and configures everything for you, that's the @@ -2008,7 +2057,7 @@ settings), check the empty box, otherwise click "Next". Add any additional languages that you want to have installed. English is installed by default and cannot be deselected. -Each additional language will add anywhere from 5–50 MB to the +Each additional language will add anywhere from 5 MB to 50 MB to the installation size. Click "Next". The next panel is where things get a little interesting. Here you can specify the service name that the Information Center will @@ -2021,7 +2070,7 @@ serve up the documentation. By default, this is port 51000. The check box on this page will change the configuration for all DB2 UDB products installed on the local system, so -that their help system will use the parameters you define here.Click +that their help system will use the parameters you define here. Click "Next". Read the summary of what will be done, then click "Finish" to start the file @@ -2056,11 +2105,11 @@ daemon). The Information Center daemon The Information Center daemon is set up during installation and is used to launch the background process that runs the Information Center. -The daemon script, named db2icd is installed to the /etc/init.d/ +The daemon script, named db2icd is installed to the /etc/init.d/ directory, and start up symbolic links are added to the /etc/init.d/rc.X/ run-level folders. By default, the daemon is turned on for run-levels 2, 3 and 5. You can modify these run-levels with any -system init utility (chkconfig, ntsysv, or any of the X-based +system init utility (chkconfig, ntsysv, or any of the X-based variants). There are 5 commands you can pass to the daemon: @@ -2420,9 +2469,9 @@ updates and kernel information. The Fedora Project is a Red-Hat-sponsored and community-supported open source project. It is not a supported product of Red Hat, Inc. -Mandrake Linux -http://www.mandrakesoft.com/ -Home to the Mandrake Linux distribution. +Mandriva Linux +http://www.mandriva.com/ +Home to the Mandriva Linux distribution. Their current slogan is "A Linux for everyone". GNU Free Documentation LicenseVersion 1.2, November 2002