HP Serviceguard Toolkits for Database Replication Solutions Node3# /usr/bin/ssh-keygen -t rsa

Page 49

A To configure SSH connection without password for root user between two nodes

This section describes how to configure SSH connection without password for root user between two nodes.

In this example, it is considered that DB2 HADR is configured using the host names of the two nodes (Node2 and Node3) as shown in the following db2 command result:

db2 get db cfg for <db2 database name> grep -i hard

In the following output, Node2 and Node3 are the host names of the nodes that are used to configure DB2 HADR.

Database Configuration for Database hadr5

 

Path to log files

 

=

/mnt/prim_data/hadr5/db2inst5/NODE0000/SQL00001/SQLOGDIR/

 

HADR database role

 

= PRIMARY

HADR local host name

(HADR_LOCAL_HOST)

= Node2

HADR local service name

(HADR_LOCAL_SVC)

= 41065

HADR remote host name

(HADR_REMOTE_HOST)

= Node3

HADR remote service name

(HADR_REMOTE_SVC)

= 41064

HADR instance name of remote server

(HADR_REMOTE_INST)

= db2inst5

HADR timeout value

(HADR_TIMEOUT)

= 120

HADR log write synchronization mode

(HADR_SYNCMODE)

= NEARSYNC

HADR peer window duration (seconds)

(HADR_PEER_WINDOW)

= 0

To configure SSH connection without password between Node2 and Node3, use the following commands. Ensure that .ssh directory exists on both the nodes in the root’s home directory. Otherwise, create this directory using the command: mkdir /.ssh

NOTE: All commands are executed as root user.

On Node Node3

Generate the RSA and DSA keys on Node3.

Node3# /usr/bin/ssh-keygen -t rsa

At the prompts:

1.Accept the default location for the key file.

2.Do not enter any password here when asked for a pass phrase. Leave it empty.

Node3# /usr/bin/ssh-keygen -t dsa

At the prompts:

1.Accept the default location for the key file.

2.Do not enter any password here when asked for a pass phrase. Leave it empty.

On Node Node2

Node2# /usr/bin/ssh-keygen -t rsa

At the prompts:

1.Accept the default location for the key file.

2.Do not enter any password here when asked for a pass phrase. Leave it empty.

Node2# /usr/bin/ssh-keygen -t dsa

At the prompts:

1.Accept the default location for the key file.

2.Do not enter any password here when asked for a pass phrase. Leave it empty.

Generate authorization keys and known hosts:

Node2# touch /.ssh/authorized_keys

Node2# cd /.ssh

NOTE: Provide root user’s password for the following four commands.

Node2# ssh Node2 cat /.ssh/id_rsa.pub >> /.ssh/authorized_keys Node2# ssh Node2 cat /.ssh/id_dsa.pub >> /.ssh/authorized_keys

49

Image 49
Contents HP Part Number Published August Edition Page Contents Glossary Index Introduction Advantages OverviewDependencies Supported configurationSingle-instance Oracle database Cmmakepkg -i pkgasciifile -m modulefilename outputfilename RAC environment RAC environmentServiceguard toolkit for Oracle Data Guard Data Guard replication between RAC primary and RAC standby Continentalclusters environment Continentalclusters environment Metrocluster and extended distance cluster environments Supported configuration Data Guard setup in an EDC environment Three data center configuration Multiple Data Guard instances in each Serviceguard cluster Configuring multiple instances of Oracle Data GuardInstalling and uninstalling Oracle Data Guard toolkit Setting up Oracle Data Guard toolkit# swinstall -s depot path High availability for data guard broker# swlist -l product T2259AA Files for the ADF module Activestandby Package attributes Configuring Oracle Data Guard toolkitFor example, /etc/cmcluster/pkg/dgpkg Single-instance environmentSetting up Oracle Data Guard toolkit #ecmt/oracle/oracle/LISTENERRESTART Servicefailfastenabled no servicehalttimeout For example, /etc/cmluster/pkg/racdgpkg RAC environmentWhere ocmnp is the Smnp package for Oracle CLusterware Maintaining Oracle Data Guard toolkit Adding the package to the Serviceguard clusterSingle-instance environment Cluster verification for Oracle Data Guard toolkitPkg.conf command TroubleshootingLimitations Startstandbyasprimary to yes Prerequisites Supported configuration Using the DB2 Hadr toolkitEvent 1 Standby database or Hadr goes down When primary and standby packages are in the same clusterEvent 2 Primary package fails Primary and Standby Packages in Different Clusters When primary and standby packages are in different clustersTo provide high availability only to primary database Creating packagesGo to the /etc/cmcluster/hadrprimary directory Cmmakepkg -m ecmt/db2/db2 -m tkit/db2hadr/db2hadr pkg.confInstancename Hadrip Running packages Managing packagesMaintaining packages And, $ cmmodpkg -e hadrpkg# cmhaltpkg packagename Halting packagesHost key verification failed. Lost connection Limitations Information to collect before contacting HP How to contact HPHP authorized resellers Warranty informationDocumentation feedback Related information Typographic conventionsTIP Node3# /usr/bin/ssh-keygen -t rsa Db2 get db cfg for db2 database name grep -i hardNode3# /usr/bin/ssh-keygen -t dsa Node2# /usr/bin/ssh-keygen -t rsaPage To add a new key to/home/user/.ssh/knownhosts Page Glossary Index