IBM Books

Installation and Configuration Supplement


Working with the DB2 Universal Database Documentation Files in a Client/Server Environment

To set up the DB2 Universal Database documentation on a central server, you should perform the following steps (some of which are marked as optional):

step  1.

Install a DB2 server, Administration Client, Software Developer's Kit, or DB2 Connect product and select the option to install documentation. The server documentation includes such books as the SQL Reference, Command Reference, SQL Getting Started, Administration Guide, and the Quick Beginnings book for that particular server. On UNIX systems, or with the Application Developer's Kit, the documentation set also includes the programming books such as the Administrative API Reference, Call Level Interface Guide and Reference, or the Application Development Guide.

step  2.

As an option, you can customize the HTML files you have installed. The "master file" for the DB2 documentation library is index.htm in the product's doc\html subdirectory. Depending on the set of products that you install, some of the links in this file might point to non-existent books. You can remove these links if you do not intend to install the books on the central server. You can also add your own links to local resources such as your own operations manual or help desk.
Note:Keep in mind that corrective service releases might include an updated version of index.htm, so be sure to keep a backup copy of any changes you make.

The "master file" for each book is index.htm, located in each book's subdirectory.

The search form used by all the HTML files is nqsrch.htm in the product's doc\html subdirectory. In cases where the search facility is not available or you want to use a different one, you can replace this file with one that notifies users that search is not available or performs the alternative search. For example:

<title>IBM DB2 Universal Database: Search Not Available</title>
</head>
<body>
<h1>Search Not Available</h1>
<p>The search function is not available on this platform.</p>
</body>
</html>

step  3.

As an option, you might want to move or copy the DB2 Universal Database HTML files:

  • To a network drive.

  • To a directory underneath the root directory of a web server.

  • To another machine that acts as a web server.

To copy the files on the same machine, you can use a command that preserves the directory structure, such as xcopy or cp -r. It is important to preserve the original directory structure, because the book files use relative links to return to the list of books, and the list of books uses relative links to each book.

To copy the files to a different machine, you can use an archiving tool such as pkzip or tar. Again, use options that preserve the directory structure in the new location.

If you just wanted to transfer a few books, you might use ftp to transfer the index.htm file and all the files in some of the book subdirectories. The files should be transferred in binary so that the .gif files and any national characters such as accented letters are preserved.

step  4.

As an option on Windows and OS/2 operating systems, you might want to customize the Information Center.

The DB2 Information Center uses a set of mapping files to locate the online information that it displays. By default, it looks for the online HTML information in the doc\html subdirectory tree in the directory where DB2 is installed. If you move the HTML files, such as to a web server or network drive, the Information Center can only find them if the .ndx files are updated. In the sqllib\help directory of DB2, look for files with the .ndx extension. Each one represents a page in the Information Center notebook.

To update the Information Center to find the online information on the x: drive, edit each .ndx file in turn. Be sure to use an editor that handles Unicode. Change all occurrences of the string file:///%DB2PATH%/doc/html to reflect the new location of the HTML files. For example, for a web server you might change the string to http://servername/path/to/db2/docs. For a network drive, you might change the string to file:///x:/path/to/db2/docs. It is important to preserve the directory structure wherever the files are located, because the Information Center expects that the SQL Reference files are in a directory named db2s0, and so on.

Searching the DB2 Books from a Remote Client

DB2 Universal Database Version 6 enables remote clients (machines equipped only with a browser) to view and search DB2 documentation installed on a central server.

Enabling Remote Searching on Windows NT, Windows 9x, and OS/2

To enable remote searching of DB2 documentation on Windows NT, Windows 9x, and OS/2, perform the following steps:

step  1.

Edit the DB2 search form. This file is

   x:\sqllib\doc\html\db2srch.htm

where x: is the drive on which DB2 is installed

step  2.

Change the action= attribute of the <form> tag. Replace localhost:49213 with hostname:49214, where hostname represents the machine where the DB2 documentation files are installed.

step  3.

Edit your IBM Internect Connection Server (ICS) Lite configuration file.

On a Windows NT, Windows 95, or OS/2 operating system, this file is httpd.cnf in the directory imnnq_nt, imnnq95, or netqos2, respectively. On Windows 98, the directory is imnnq_95.

  1. Copy the original ICS Lite configuration file to another file name in the same directory as the original. In this example we'll call this copy db2httpd.cnf.
    Note:By creating a copy of this configuration file, you can avoid affecting other products installed on your system that rely on the search server.

  2. Replace the value of the Hostname line in db2httpd.cnf (or whatever you named the copy of the ICS Lite configuration file) with the same hostname:49214 as you did in the DB2 search form.

  3. Add the following directives to db2httpd.cnf:
       MaxActiveThreads 40
       Allow <network_ip> <network_mask>
    

    where:

    • <network_ip> is the network IP address of the machine that will be connecting to your machine, in a.b.c.d form. A value of 0.0.0.0 is not allowed.

    • <network_mask> is the network mask of the machine that will be connecting to your machine, either in a.b.c.d or x form, where x is the number of valid bits. For example, a value of 24 for x would be 255.255.255.0 in a.b.c.d form. The only valid network masks are those consisting of a consecutive sequence of 1 bits followed by an optional consecutive sequence of 0 bits.
      Note:You can have more than one Allow directive, one for each machine that will be connecting to your machine.

    The MaxActiveThreads directive will increase ICS Lite's performance when multiple requests are arriving over the network. You can set the value of MaxActiveThreads to greater than 40, but as this value increases more memory is consumed.

  4. Change the following directive in your db2httpd.cnf file from
       PASS /*  X:\IMNNQ_NT\*
    

    to

       PASS /*  X:\SQLLIB\*
    

    where x: is drive on which NetQuestion and DB2 are installed (in this example we assume they are both on the same drive) and IMNNQ_NT is your NetQuestion installation directory. The NetQuestion directory name will vary for Win 9x and OS/2 operating systems.

  5. Edit your Start HTML Search Server icon's properties so that it calls the new db2httpd.cnf file.

    Editing the Start HTML Search Server icon on Windows systems

    1. Click Start -> Programs -> Windows Explorer.

    2. In Windows Explorer, click Windows -> Profiles -> <Username> -> Start Menu -> Programs -> Startup or DB2 for Windows, where <Username> represents the username under which DB2 was installed.
      Note:Start HTML Search Server icons will be located in the Startup and DB2 for Windows folders provided they were not removed after install.

    3. Right-click the Start HTML Search Server icon, select Properties, and click the Shortcut tab.

    4. In the Target field, add
         db2httpd.cnf
      

      as the last argument. If you put the new configuration file in a directory that is different than the original, you must specify the full path name.

    5. Click OK to close.

    Editing the Start HTML Search Server icon on OS/2 systems

    1. Right-click on the Start HTML Search Server icon in your DB2 for OS/2 folder.

    2. Select Settings and click on the Program tab.

    3. In the Optional Parameters field, add
         config db2httpd.cnf
      

      to the end of the string of parameters. If you put the new configuration file in a directory that is different than the original, you must specify the full path name.

    4. Click OK to close.

    5. Edit your db2init.cmd file. This file is located in x:\sqllib\bin\, where x: is the drive on which you installed DB2. Find the line in this file containing both "db2ss.exe" and "db2netqd.exe". At the end of this line add
         config "db2httpd.cnf"
      

      Note that you need double quotation marks around the file name. Save and exit.

step  4.

For each index that is installed, run the nqmap command to set the base location for the documentation files. The exact directory to use depends on your server's hostname. For example, if your server is named yourserver, your port number is 49214, and your DB2 documentation is in English, run the following set of commands to set the base location for both of the DB2 indexes:

   nqmap -u DB2SR6EN "http://yourserver:49214/doc/html/" DB2SR6EN
   nqmap -u DB2CC6EN "http://yourserver:49214/doc/html/" DB2CC6EN

If you have documentation installed in other languages, change EN in each of the above index names to the appropriate two-letter language identifier. If you have DBCS documentation installed, substitute tmmap for nqmap.

Enabling Remote Searching on AIX

To enable remote searching of DB2 documentation from an AIX client, perform the following steps:

step  1.

Log on as root.

step  2.

Install a DB2 Administration Client or any server product, plus one or more language versions of the DB2 Product Library, if they are not already installed.

step  3.

Go into the directory /etc/IMNSearch/httpdlite.

step  4.

Copy the file httpdlite.conf to db2httpd.conf.

step  5.

Edit the new file db2httpd.conf:

  1. Uncomment the line with the HostName directive by removing the # character.

  2. Change the hostname to the real machine name, such as server.com.

  3. In the line with the Port directive, change the number from 49213 to 49214.

  4. Add the following line:
       Allow <network_ip> <network_mask>
    

    where:

    • <network_ip> is the network IP address of the machine that will be connecting to your machine, in a.b.c.d form. A value of 0.0.0.0 is not allowed.

    • <network_mask> is the network mask of the machine that will be connecting to your machine, either in a.b.c.d or x form, where x is the number of valid bits. For example, a value of 24 for x would be 255.255.255.0 in a.b.c.d form. The only valid network masks are those consisting of a consecutive sequence of 1 bits followed by an optional consecutive sequence of 0 bits.
      Note:You can have more than one Allow directive, one for each machine that will be connecting to your machine.

  5. Save the file and exit from the editor.

step  6.

Go into the directory /etc.

step  7.

Edit the file inittab:

  1. You will see a line that executes the httpdlite command with a filename argument. Make a copy of this line immediately below the original line.

  2. In the new line:

    1. Change the first field from httpdlite to httpdlite2.

    2. Change the part of the line that reads httpdlite.conf to db2httpd.conf. The result should look like:
      httpdlite:2:once:/usr/IMNSearch/httpdlite/httpdlite -r /etc/IMNSearch/httpdlite/ httpdlite.conf >/dev/console 2>&1
      httpdlite2:2:once:/usr/IMNSearch/httpdlite/httpdlite -r /etc/IMNSearch/httpdlite/ db2httpd.conf >/dev/console 2>&1

  3. Save the file and exit from the editor.

step  8.

Since the new inittab process will not be run until the machine is rebooted, run the command



/usr/IMNSearch/httpdlite/httpdlite -r /etc/IMNSearch/httpdlite/db2httpd.conf >/dev/console 2>&1

from the /etc directory.

step  9.

Go into the directory /usr/lpp/db2_06_01/doc/en_US/html

step 10.

Edit the file db2srch.htm:

  1. Change the string localhost to reflect the name of your host, and change the number 49213 to 49214.

    For example, if the original line is:
    <form action="http://localhost:49213/cgi-bin/db2srsen.exe" method="POST">

    
    

    The modified line might be:
    <form action="http://server.com:49214/cgi-bin/db2srsen.exe" method="POST">

  2. Save the file and exit from the editor.

step 11.

Issue the following commands, substituting your own hostname for server.com:
/usr/IMNSearch/cli/imndomap -u DB2SR6EN "http://server.com/doc/en_US/html/" DB2SR6EN
/usr/IMNSearch/cli/imndomap -u DB2CC6EN "http://server.com/doc/en_US/html/" DB2CC6EN

For documentation in other languages, replace the EN suffix in each of the index names with the appropriate two-letter locale, and replace en_US with the appropriate locale directory. For the Japanese, Korean, Simplified Chinese, and Traditional Chinese locales, use the imqdomap command instead the imndomap command.
Note:The exact URL to enter in the imndomap commands and to use for the search form depends on how you set up your web server to work with the DB2 Product Library. If you make a directory on the web server named db2 or something that points to /usr/lpp/db2_06_01, then you would insert that directory name after the hostname in each case.

step 12.

You should now be able to start a browser on any machine in the local network, load the doc/en_US/html/db2srch.htm file underneath your web server, execute a search, and click on a link in the search results page to go to the documentation file.

Enabling Remote Searching on HP-UX and Solaris

To enable remote searching of DB2 documentation from a HP-UX or Solaris client, you need to perform the following steps:

step  1.

Log on as root.

step  2.

Install a DB2 Administration Client or any server product, plus one or more language versions of the DB2 Product Library, if they are not already installed.

step  3.

Go into the directory /opt/IMNSearch/bin.

step  4.

Edit the file S990IMNSearch:

  1. On line 46, you will see a nohup command that executes the httpdlite command with a filename argument. Make a copy of this line immediately below the original line.

  2. In the new line, change the part of the filename that reads httpdlite.conf to db2httpd.conf.

  3. Save the file and exit from the editor.

step  5.

Go into the directory/etc/IMNSearch/httpdlite.

step  6.

Copy the file httpdlite.conf to db2httpd.conf.

step  7.

Edit the new file db2httpd.conf:

  1. Uncomment the line with the HostName directive by removing the # character.

  2. Change the hostname to the real machine name, such as server.com.

  3. In the line with the Port directive, change the number from 49213 to 49214.

  4. Add the following line:
       Allow <network_ip> <network_mask>
    

    where:

    • <network_ip> is the network IP address of the machine that will be connecting to your machine, in a.b.c.d form. A value of 0.0.0.0 is not allowed.

    • <network_mask> is the network mask of the machine that will be connecting to your machine,, either in a.b.c.d or x form, where x is the number of valid bits. For example, a value of 24 for x would be 255.255.255.0 in a.b.c.d form. The only valid network masks are those consisting of a consecutive sequence of 1 bits followed by an optional consecutive sequence of 0 bits.
      Note:You can have more than one Allow directive, one for each machine that will be connecting to your machine.

  5. Save the file and exit from the editor.

step  8.

Run the command /opt/IMNSearch/bin/S990IMNSearch stop

step  9.

Run the command /opt/IMNSearch/bin/S990IMNSearch start

step 10.

Go into the directory /opt/IBMdb2/V6.1/doc/en_US/html

step 11.

Edit the file db2srch.htm:

  1. Change the string localhost to reflect the name of your host, and change the number 49213 to 49214.

    For example, if the original line is:
    <form action="http://localhost:49213/cgi-bin/db2srsen.exe" method="POST">

    
    

    The modified line might be:
    <form action="http://server.com:49214/cgi-bin/db2srsen.exe" method="POST">

  2. Save the file and exit from the editor.

step 12.

Issue this set of commands, substituting your own hostname for server.com:
/opt/IMNSearch/cli/imndomap -u DB2SR6EN "http://server.com/doc/en_US/html/" DB2SR6EN
/opt/IMNSearch/cli/imndomap -u DB2CC6EN "http://server.com/doc/en_US/html/" DB2CC6EN

For documentation in other languages, replace the EN suffix in each of the index names with the appropriate two-letter locale, and replace en_US with the appropriate locale directory. For the Japanese, Korean, Simplified Chinese, and Traditional Chinese locales, use the imqdomap command instead the imndomap command.
Note:The exact URL to enter in the imndomap commands and to use for the search form depends on how you set up your web server to work with the DB2 Product Library. If you make a directory on the web server named db2 or something that points to /opt/IBMdb2/V6.1, then you would insert that directory name after the hostname in each case.

step 13.

You should now be able to start a browser on any machine in the local network, load the doc/en_US/html/db2srch.htm file underneath your web server, execute a search, and click on a link in the search results page to go to the documentation file.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]