DB2 Version 9.7 for Linux, UNIX, and Windows
After you install a DB2 Server product > Post-installation tasks > Partitioned database environment >

Enabling the execution of remote commands (Linux® and UNIX®)

You must update your .rhosts file to execute remote commands using rsh.

In a partitioned database system, each database partition server must have the authority to perform remote commands on all the other database partition servers participating in an instance. This authority can be granted by updating the.rhosts file in the home directory for the instance. Because the home directory for the instance is on the shared DB2® home file system, only one .rhosts file is required.

Prerequisites

This topic describes how to enable execution of remote commands using rsh.

You can also use ssh enable execution of remote commands. To use ssh without being prompted for passwords or pass phrases, refer to:

To update your .rhosts file to execute remote commands using rsh:

  1. Log onto the primary computer as a user with root authority.
  2. Create a .rhosts file in the instance home directory. For example, if your instance home directory is /db2home/db2inst1, you can use a text editor to create the .rhosts file by entering the following command:
         vi /db2home/db2inst1/.rhosts
  3. Add entries to the .rhosts file for each computer including the primary computer. The .rhosts file has the following format:
         hostname   instance_owner_user_name

    Some systems might require a long host name to be specified, for example: ServerA.yourdomain.com. Before you add host name entries to the .rhosts file, make sure the host names in the /etc/hosts and the /etc/resolv.conf files can be resolved.

    The INSTHOME/.rhosts file should contain entries similar to the following:

       ServerA.yourdomain.com db2inst1
       ServerB.yourdomain.com db2inst1
       ServerC.yourdomain.com db2inst1
       ServerD.yourdomain.com db2inst1

    Rather than specifying each host name individually, you can specify the following entry in the .rhosts file, but this action may pose a security risk and should only be done in a test environment.

       + db2inst1

    If you have specified a high speed switch (netname) in the db2nodes.cfg file, you should also add netname entries for each computer to the .rhosts file. The netname values are specified in the fourth column of the db2nodes.cfg file. A .rhosts file with high speed switch (netname) entries may look similar to the following:

       ServerA.yourdomain.com db2inst1
       ServerB.yourdomain.com db2inst1
       ServerC.yourdomain.com db2inst1
       ServerD.yourdomain.com db2inst1
       Switch1.yourdomain.com db2inst1
       Switch2.yourdomain.com db2inst1
       Switch3.yourdomain.com db2inst1
       Switch4.yourdomain.com db2inst1

An alternative to using a .rhosts file is to use /etc/hosts.equiv file. The /etc/hosts.equiv file would contain the exact same entries as the .rhosts file, but must be created on each computer.

For more information about the .rhosts file or the /etc/hosts.equiv file, see your operating system documentation.

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