DB2 Connect Quick Beginnings for UNIX**

Manually Installing DB2 Connect for Linux

We recommend that you use the db2setup utility to install DB2 Connect for Linux. If you prefer not to use this utility, you can install DB2 Connect manually using the db2_install or rpm commands.

Your DB2 Connect product is made up of different functions and components that are referred to as packages in the Linux environment. When you install your DB2 Connect product using the rpm command, you must select to install each package that you require and each associated package for the optional functions that you want to use. For example, if you want to install the Control Center on your Linux workstation, you would need to install the db2wcc71-7.1.0-0.i386.rpm package by entering the following command:

   rpm -ivh db2wcc71-7.1.0-0.i386.rpm

Some packages are required and some are optional. For information on the packages that are required to install a DB2 Connect product, see Products and Selectable Components. For a detailed list of all the package names, see Contents of the DB2 Products for UNIX platforms.

Using the rpm command to install a DB2 product is prone to errors because you could easily skip over a required package. We recommend that you use the db2_install script to install a DB2 product if you do not want to use the db2setup utility. The db2_install script will install both the required and optional packages for a DB2 product using the rpm command.

To install DB2 Connect using the db2_install script:

  1. Log in as a user with root authority.
  2. Ensure that your Linux workstation has been enabled for DB2 Connect, for more information, see Enabling Your Linux Workstation for a DB2 Connect Installation.
  3. Insert and mount the appropriate CD-ROM. For more information on mounting a CD-ROM, see Mounting CD-ROMs on UNIX Operating Systems.
  4. Enter the ./db2_install command. The script will return a list of the products that are available for installation from your CD-ROM, for example:
       Specify one or more of the following keywords,
       separated by spaces, to install DB2 products.
     
       DB2.WGRP - DB2 Workgroup Edition
       DB2.SDK  - DB2 Application Development Client
       DB2.CAE  - DB2 Administration Client
    Enter "help" to redisplay the product names, enter "quit" to exit.
    ******************************************************************
    
  5. Enter the name of the DB2 product that you want to install and press Enter. For example, to install DB2 Workgroup Edition, respond to the db2_install script's prompt by entering DB2.WGRP. The db2_install script will begin installing all the rpms associated with the product that you selected for installation.

When installation is complete your DB2 Connect software will be installed in the /usr/IBMdb2/V7.1 directory.

DB2 Connect Post-Installation Tasks

After manually installing your product, you should create a group and user IDs for the instance owner, Administration Server, and fenced user defined functions (UDFs) and stored procedures. Once you set up these IDs you can create an instance, create the Administration Server, install the license key, and create links for your DB2 files.

You do not have to perform these tasks if you used the db2setup utility to install DB2.

Creating Group and User IDs for the Instance Owner, Administration Server, and UDFs

You should create group and user IDs for the instance owner, Administration Server, and UDFs and stored procedures. If you want to use existing user or group IDs, you can skip this section and proceed to creating an instance.

In addition to the rules imposed by the operating system for user names and groups, you must also adhere to the rules described in Appendix D, Naming Rules.

To create a group and user ID for the instance owner:

  1. Log in as a user with root authority.
  2. Enter the following command to make a new group:
       mkgroup -g 999 dbadmin1
    

    where 999 represents the group ID and dbadmin1 represents the group name. This new group is the SYSADM group for the instance.

  3. Enter the following command to make a new user:
       mkuser -u 1004 -g db2admin1 -G dbadmin1 -m -d /home/db2inst1
          db2inst1 -p db2inst1
    

    where 1004 represents the user ID, dbadmin1 represents the group you created in the previous step, /home/db2inst1 represents the user's home directory, and db2inst1 represents the username and instance name.

You should use a unique user ID for each instance you create. This allows for easier error recovery if a system error occurs.

To create group and user IDs for the Administration Server follow the same steps you used to create IDs for the instance owner. You must use different user IDs for the Administration Server and instance owner. For security reasons, we recommend you use a different group ID for the Administration Server and instance owner.

To create group and user IDs for UDFs and stored procedures, follow the same steps you used to create IDs for the instance owner. For security reasons, we recommend that you use different user IDs for UDFs and the instance owner. You will be asked to supply a UDF user ID when you create a DB2 instance.

Creating an Instance

A DB2 instance is an environment in which you store data and run applications. Use the db2icrt command to create an instance. You must have root authority to enter this command. For more information about database instances, refer to the Administration Guide.

The db2icrt command is run with the following parameters:

   DB2DIR/instance/db2icrt -a AuthType -u FencedID InstName

where:

Creating the Administration Server

The Administration Server provides services to support tools that automate the configuration of connections to DB2 databases. The Administration Server also supports tools that administer DB2 from your server system or a remote client using the Control Center. For more information on the Administration Server, refer to the Administration Guide.

To create the Administration Server use the DB2DIR/instance/dasicrt ASName command

where DB2DIR = /usr/lpp/db2_07_01 on AIX


= /opt/IBMdb2/V7.1 HP-UX, PTX, SGI IRIX, or Solaris


= /usr/IBMdb2/V7.1 on Linux

and ASName represents the name of the Administration Server you want to create.

Updating the License Key

Your Proof of Entitlement and the License Information booklet identify the products for which you are licensed.

To update your DB2 product license key:

  1. Log in as a user with root authority.
  2. Update your DB2 product license with the following command:
       /usr/IBMdb2/V7.1/adm/db2licm -a filename
    

    where filename is the full pathname and filename for the license file that corresponds to the product you have purchased. The names of the license files for these products are:

    db2conee.lic
    DB2 Connect Enterprise Edition

    For example, if the CD-ROM is mounted on /cdrom and the name of the license file is db2udbee.lic, the command should be as follows:

       /usr/IBMdb2/V7.1/adm/db2licm -a /cdrom/db2/license/db2udbee.lic
    

Creating Links for DB2 Files

You can create links for the DB2 files to the /usr/lib directory, and for the include files to the /usr/include directory for a particular version and release level of the product.

You may want to create these links if you are developing or running applications and want to avoid having to specify the full path to the product libraries and include files.

To create links for DB2 files, log in as a user with root authority and run the /usr/IBMdb2/V7.1/cfg/db2ln command.

If there are existing links to the /usr/lib and /usr/include directories from previous versions of DB2, they will automatically be removed by entering the db2ln command to create links for this version of DB2. If you want to re-establish the links to the libraries of previous versions, then you must execute the db2rmln command from your previous version of DB2 before you execute the db2ln command from the previous versions of DB2. Links can be established for only one version of DB2 on a given system.


[ Top of Page | Previous Page | Next Page ]