Make sure that the three machines have the same user name and install the same directory *************
SSH Non-key login simple introduction (before building a local pseudo-distributed, it is generated, now the three machines of the public key private key is the same, so the following is not configured)
Stand-alone operation:
Generate Key: Command ssh-keygen-t RSA then four carriage return
Copy the key to native: command Ssh-copy-id hadoop-senior.zuoyan.com
Start of formal operation
Actions on the host hadoop-senior.zuoyan.com:
Ssh-copy-id hadoop-senior03.zuoyan.com
Ssh-copy-id hadoop-senior02.zuoyan.com
(Test for example I want to log on from node one to node two using the command: SSH hadoop-senior02.zuoyan.com
Replicate the configured Hadoop to node two
Using the command: scp-r./hadoop-2.5.0/[Email protected]:/opt/app/(current directory:/opt/app)
Then go to node two and discover that Hadoop is already in this directory
And then copy Hadoop 2.5 on node one up to node three.
Use command: scp-r./hadoop-2.5.0/[Email protected]:/opt/app/
And then go to the top of the node and look at the effect, and you'll find the file has been copied.
On the second machine.
Go to the. SSH directory to delete the previously generated Id_rsa otherwise the problem is using the command RM-RF./id_rsa*
The above deletion may still cause problems, the best solution is to remove all, and then re-copy the public key from node one
Use the command in the. SSH directory: RM-RF./*
Switch to node one up, re-copy the public key to node two
Then node three should also delete the public and private keys that are generated under. SSH, and then node one re-generates no key to log on to node three up
On node three, enter the. SSH directory and execute the command RM-RF./*
Then execute the down command on node one
Next, configure the remaining two non-key logins on node two
Use command: ssh-keygen-t RSA
Then execute Ssh-copy-id hadoop-senior02.zuoyan.com
And then copy the public key to node one and node three.
Then use SSH login to test it and successfully
So far all the prep environments have been configured and ready to start.
"Hadoop Distributed Deployment Four: Configure the primary node (NN and RM) in Hadoop 2.x to SSH without password logins from the node"