1. First add the Hosts file
vim/etc/hosts10.0.110.56 msjtvl-dsjc-h0110.0.110.57 msjtvl-dsjc-h0310.0.110.58 msjtvl-dsjc-h0510.0.110.60 msjtvl-dsjc-h0210.0.110.61 msjtvl-dsjc-h04
2. Several machines do mutual trust
Setup passphraseless sshnow Check that you can ssh to the localhost without a passphrase: $ ssh localhostif you cannot SSH to localhost without a passphrase, execute the following commands: $ ssh-keygen-t dsa-p '-F ~/.ssh/id_dsa
$ Cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
Copy the key files from several other machines to the msjtvl-dsjc-h01 Authorized_keys file
[email protected]. ssh]$ SCP [email protected]:/hadoop/.ssh/id_dsa.pub./id_dsa.pub2[[email protected]. ssh]$ SCP [ Email protected]:/hadoop/.ssh/id_dsa.pub./id_dsa.pub3[[email protected]. ssh]$ SCP [Email protected]:/hadoop/.ssh/id _dsa.pub./id_dsa.pub4[[email protected]. ssh]$ SCP [email protected]:/hadoop/.ssh/id_dsa.pub./id_dsa.pub5[[email Protected]. ssh]$ Cat ~/.ssh/id_dsa.pub2 >> ~/.ssh/authorized_keys[[email protected]. ssh]$ Cat ~/.ssh/id_ DSA.PUB3 >> ~/.ssh/authorized_keys[[email protected]. ssh]$ Cat ~/.ssh/id_dsa.pub4 >> ~/.ssh/authorized_ Keys[[email protected]. ssh]$ Cat ~/.ssh/id_dsa.pub5 >> ~/.ssh/authorized_keys
The above operation realizes the msjtvl-dsjc-h02,3,4,5 to msjtvl-dsjc-h01 without password login
Copy the Authorized_keys file on the msjtvl-dsjc-h01 to the other machines if all the trust of msjtvl-dsjc-h01-5 is fulfilled.
[Email protected] ~]$ SCP [email Protected]:/hadoop/.ssh/authorized_keys/hadoop/.ssh/authorized_keys
Download the appropriate tar package
wget http://apache.fayea.com/hadoop/common/hadoop-2.6.4/hadoop-2.6.4.tar.gz
The construction of Hadoop ha