DB2 + HADR + TSA high availability test-TSA environment Configuration
- Configure all node names and Hosts files
[Root @ db2-node01 ~] # More/etc/sysconfig/network
NETWORKING = yes
NETWORKING_IPV6 = yes
HOSTNAME = db2-node01
[Root @ db2-node01 ~] #
[Root @ db2-node01 ~] # Echo $ HOSTNAME
Db2-node01
[Root @ db2-node02 ~] # More/etc/sysconfig/network
NETWORKING = yes
NETWORKING_IPV6 = yes
HOSTNAME = db2-node02
[Root @ db2-node02 ~] # Echo $ HOSTNAME
Db2-node02
[Root @ db2-node02 ~] #
[Root @ db2-node01 ~] # Vi/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1localhost.localdomain localhost
#: 1localhost6. localdomain6 localhost6
108.88.3.106 db2-node01
108.88.3.221 db2-node02
[Root @ db2-node02 ~] # More/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1localhost.localdomain localhost
#: 1localhost6. localdomain6 localhost6
108.88.3.106 db2-node01
108.88.3.221 db2-node02
[Root @ db2-node02 ~] #
- Check host name and Hosts Configuration
[Root @ db2-node01 ~] # Ping db2-node01
PING db2-node01 (108.88.3.106) 56 (84) bytes of data.
64 bytes from db2-node01 (108.88.3.106): icmp_seq = 1 ttl = 64 time = 0.010 MS
64 bytes from db2-node01 (108.88.3.106): icmp_seq = 2 ttl = 64 time = 0.046 MS
^ C64 bytes from db2-node01 (108.88.3.106): icmp_seq = 3 ttl = 64 time = 0.106 MS
--- Db2-node01 ping statistics ---
3 packets transmitted, 3 bytes ed, 0% packet loss, time 2001 ms
Rtt min/avg/max/mdev = 0.010/0.054/0.106/0.039 MS
[Root @ db2-node01 ~] # Ping db2-node02
PING db2-node02 (108.88.3.221) 56 (84) bytes of data.
64 bytes from db2-node02 (108.88.3.221): icmp_seq = 1 ttl = 64 time = 1.07 MS
64 bytes from db2-node02 (108.88.3.221): icmp_seq = 2 ttl = 64 time = 0.280 MS
--- Db2-node02 ping statistics ---
2 packets transmitted, 2 bytes ed, 0% packet loss, time 1000 ms
Rtt min/avg/max/mdev = 0.280/0.676/1.073/0.397 MS
[Root @ db2-node01 ~] #
[Root @ db2-node02 ~] # Ping db2-node01
PING db2-node01 (108.88.3.106) 56 (84) bytes of data.
64 bytes from db2-node01 (108.88.3.106): icmp_seq = 1 ttl = 64 time = 1.64 MS
64 bytes from db2-node01 (108.88.3.106): icmp_seq = 2 ttl = 64 time = 0.328 MS
--- Db2-node01 ping statistics ---
2 packets transmitted, 2 bytes ed, 0% packet loss, time 1001 ms
Rtt min/avg/max/mdev = 0.328/0.985/1.643/0.658 MS
[Root @ db2-node02 ~] # Ping db2-node02
PING db2-node02 (108.88.3.221) 56 (84) bytes of data.
64 bytes from db2-node02 (108.88.3.221): icmp_seq = 1 ttl = 64 time = 0.000 MS
64 bytes from db2-node02 (108.88.3.221): icmp_seq = 2 ttl = 64 time = 0.127 MS
--- Db2-node02 ping statistics ---
2 packets transmitted, 2 bytes ed, 0% packet loss, time 999 ms
Rtt min/avg/max/mdev = 0.000/0.063/0.127/0.064 MS
[Root @ db2-node02 ~] #
- Add CT_MANAGEMENT_SCOPE on all nodes
[Root @ db2-node01 ~] # Vi/etc/profile
Export CT_MANAGEMENT_SCOPE = 2
[Root @ db2-node02 ~] # Vi/etc/profile
Export CT_MANAGEMENT_SCOPE = 2
- Install the RSH service on all nodes
1.1 install RSH on node01
[Root @ db2-node01 ~] # Rpm-qa | grep-I rsh-server
[Root @ db2-node01 ~] # Yum install rsh-server
[Root @ db2-node01 ~] # Chkconfig xinetd on
[Root @ db2-node01 ~] # Chkconfig rsh on
[Root @ db2-node01 ~] # Chkconfig rlogin on
[Root @ db2-node01 ~] #/Etc/init. d/xinetd restart
1.2 set remote access to RSH
[Root @ db2-node01 ~] # Vi/root/. rhosts
Db2-node01 root
Db2-node02 root
1.3 modify rsh in kerberos
[Root @ db2-node01 ~] # Cd/usr/kerberos/bin
[Root @ db2-node01 ~] # Mv rsh. sav
[Root @ db2-node01 ~] # Ln-s/usr/bin/rsh
[Root @ db2-node01 ~] #/Etc/init. d/xinetd restart
[Root @ db2-node01 ~] # Ls-al/usr/bin/rsh
1.4 add rsh to the/etc/securetty File
[Root @ db2-node01 ~] # Echo rsh>/etc/securetty
1.5 Add a DB2 instance user RSH
[Root @ db2-node01 ~] # Vi/home/db2inst2/. rhosts
Db2-node01 root
Db2-node02 root
1.6 Test
[Root @ db2-node01 ~] # Rsh db2-node01 ls
[Root @ db2-node01 ~] # Rsh db2-node02 ls
2.1 install RSH on node02
[Root @ db2-node02 ~] # Rpm-qa | grep-I rsh-server
[Root @ db2-node02 ~] # Yum install rsh-server
[Root @ db2-node02 ~] # Chkconfig xinetd on
[Root @ db2-node02 ~] # Chkconfig rsh on
[Root @ db2-node02 ~] # Chkconfig rlogin on
[Root @ db2-node02 ~] #/Etc/init. d/xinetd restart
2.2 set remote access to RSH
[Root @ db2-node02 ~] # Vi/root/. rhosts
Db2-node01 root
Db2-node02 root
2.3 modify rsh in kerberos
[Root @ db2-node01 ~] # Cd/usr/kerberos/bin
[Root @ db2-node01 ~] # Mv rsh. sav
[Root @ db2-node01 ~] # Ln-s/usr/bin/rsh
[Root @ db2-node01 ~] #/Etc/init. d/xinetd restart
[Root @ db2-node01 ~] # Ls-al/usr/bin/rsh
2.4 Add rsh to the/etc/securetty File
[Root @ db2-node01 ~] # Echo rsh>/etc/securetty
2.5 Add a DB2 instance user RSH
[Root @ db2-node01 ~] # Vi/home/db2inst2/. rhosts
Db2-node01 root
Db2-node02 root
2.6 Test
[Root @ db2-node01 ~] # Rsh db2-node01 ls
[Root @ db2-node01 ~] # Rsh db2-node02 ls
Initialize RSCT cluster nodes
The following actions are performed by the root user on the db2-node01 and db2-node01
[Root @ db2-node01 ~] # Preprpnode db2-node01 db2-node02
[Root @ db2-node02 ~] # Preprpnode db2-node01 db2-node02
- Disable all node firewalls and selinux
[Root @ db2-node01 ~] #/Etc/init. d/iptables stop
[Root @ db2-node02 ~] #/Etc/init. d/iptables stop