IBM Books

Quick Beginnings for DB2 Universal Database for UNIX


Installing DB2 Version 2 Clients

This section details installing DB2 products on SINIX and SCO OpenServer Clients.

Installing DB2 Version 2 Clients on SINIX

To install the DB2 Client Application Enabler on SINIX, perform the following steps:

  1. Log in as user with root authority.

  2. Insert the DB2 Client Application Enablers CD-ROM into the drive and mount it using either the sysadm or the mount command as follows:
       mkdir /cdrom
       mount -F hs /dev/ios0/sdisk006s0 /cdrom 
    
    where /cdrom is the CD-ROM mount directory.

    The install images for DB2 for SINIX products are available in the /cdrom/db2/sinix/IBMdb2 directory.

  3. Install the DB2 Client Application Enabler. Type the following command:
       pkgadd -d /cdrom/db2/sinix/IBMdb2 db2cliv21 db2msgDe db2conv
    

Some kernel configuration parameters must be changed to use DB2 Client Application Enabler for SINIX. Use the SINIX idtune command to update the values as given in Table 16. After doing so, rebuild the SINIX kernel and reboot the system for the changes to take effect.

Table 16 lists the recommended values for the specified SINIX kernel configuration parameters.

Table 16. SINIX Kernel Configuration Parameters (Recommended Values)
SINIX RM600 Kernel Parameter Recommended Value
msgmax
msgmnb
msgseg
msgssz

65535
65535
8192
16

Note:The kernel configuration parameters msgmnb and msgmax must be changed to 65535.

Installing DB2 Version 2 Clients on SCO OpenServer

To install the DB2 Client Application Enabler on SCO OpenServer, perform the following steps:

  1. Log in as user with root authority.

  2. Insert the DB2 Client Application Enablers CD-ROM into the drive and mount the CD-ROM by entering:
       mkdir /cdrom
       mount /dev/cd0 /cdrom 
    
    where /cdrom is the CD-ROM mount directory.

    The install images for the DB2 products are available in the /cdrom/db2/sco/IBMdb2 directory.

  3. Enter the custom command. The Software Manager window opens.

  4. From the Software Manager window, do the following:

    1. From the Software pulldown menu, select Install New.

    2. If you are doing a remote install, select the host from which you want to install. Otherwise, select Continue.

    3. From the Media Images menu, select Media Images and select Continue.

    4. In the Image Directory field, enter:
            /cdrom/db2/sco/IBMdb2
      

    5. Choose the software you want to install:

      • To install all components, select Full.

      • To install selected components, choose Partial. On the Software Selection window, highlight the products you want to install:

        • DB2 Client Application Enabler for SCO OpenServer

        • DB2 Software Developer's Kit for SCO OpenServer

        • DB2 Product Messages for SCO OpenServer.

    6. Update the kernel configuration parameters.

      Change the values as given in Table 17 by updating the /etc/conf/cf.d/stune file. Then, rebuild the kernel and reboot the system for the changes to take effect.


Table 17. SCO OpenServer Kernel Configuration Parameters (Recommended Values)
Kernel Parameter Recommended Value
msgssz
semmap
semmi
semmns
semmnu

64
100
100
100
100

Create or Assign Groups and Users

If you do not already have a user ID to own the instance and a system administration group ID that is the primary group of the instance owner, create these as follows:

  1. Log in as user with root authority.

  2. Create a system administration group ID using either the sysadm or groupadd command. For example, to create a group named dbadmin1, type:
       groupadd dbadmin1
    

  3. Create a user ID that will be the instance owner using either the sysadm or useradd command. For example, to create a user named inst1 type:
       useradd -g dbadmin1 -G dbadmin1 -d /home/inst1 inst1
       passwd inst1
    


note

  • When choosing a name for a group or user, follow the rules described in Appendix D. Naming Rules.

  • Dedicate the instance-owner user ID to that instance's use only. This allows for easier error recovery if a system error occurs.

Create an Instance of the Product

Use the db2icrt command to create an instance of the product. The db2icrt command is located in the /opt/IBMdb2/V5.0/instance directory.

On SCO OpenServer, go to the /usr/IBMdb2/V2.1/instance directory. On SINIX, go to the /opt/IBMdb2/V2.1/instance directory.

The syntax of the db2icrt command is:
Creating an instance
where:

instance_name
Is the login name of the instance owner.

-a AuthType
Is an optional parameter that specifies the authentication type for the instance. Valid authentication types are SERVER, CLIENT, and DCS. If the -a parameter is not specified, the authentication type defaults to SERVER, if a server product is installed. Otherwise, the AuthType is set to CLIENT.
Note:The authentication type of the instance applies to all databases under the instance.

-u FencedID
Is the user under which the fenced UDFs and stored procedures will execute. This is not required if you install the DB2 Client Application Enabler or the DB2 Software Developer's Kit. For other products, this is an required parameter.
Note:FencedID may not be root or bin.

To create an instance for the DB2 client, you can use the following command:

   db2icrt db2inst1

When an instance is created, its name is also added to the list of instances on the system.

The db2icrt command creates the INSTHOME/sqllib directory, where INSTHOME is the home directory of the instance owner.

Set Up the DB2 Operating Environment

Before starting DB2, you must execute a script to set up the DB2 operating environment and select an instance. The sample script files, db2profile (for Bourne or Korn shell) and db2cshrc (for C shell) are provided to help you set up the operating environment for a DB2 instance.

The instance owner may customize these scripts for all users of an instance. These scripts are available in the INSTHOME/sqllib directory, where INSTHOME is the home directory of the instance.

Determine the most appropriate way to execute the commands in the sample db2profile or db2cshrc script file in your environment and instruct your users to do it. For example you could add the following to the start-up script:

   . INSTHOME/sqllib/db2profile    (for Bourne or Korn shell)
   source INSTHOME/sqllib/db2cshrc (for C shell)

Create Links for DB2 Files

If you are developing or running applications, you may want to create links for DB2 libraries to avoid specifying the full path to the product libraries and the include files. To create these links, use the db2ln command.

On SCO OpenServer systems, type:

   /usr/IBMdb2/V2.1/cfg/db2ln

On SINIX systems, type:

   /opt/IBMdb2/V2.1/cfg/db2ln

This creates links from the DB2 libraries to /usr/lib, and from the DB2 include files to /usr/include.

note

To configure your client to access remote servers, go to Chapter 14. "Configuring Client-to-Server Communications Using the Command Line Processor".


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

[ DB2 List of Books | Search the DB2 Books ]