A. Configuring the Replica Set
1. Setting up the environment Add /etc/host to nodeA nodeB
[root@teguhth01 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.21 teguhth01 NodeA
10.10.10.22 teguhth02 NodeB
[root@teguhth01 ~]#
[root@teguhth02 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.21 teguhth01 NodeA
10.10.10.22 teguhth02 NodeB
[root@teguhth02 ~]#