In the last blog post we have introduced the use of single-machine pseudo-distributed mode for Hadoop, so now we are going to look at the multi-computer fully distributed mode.
1. Multi-Host Configuration 1.1 host name settings for multiple machines
Use the following command with the root account:
vim /etc/hostname
The three machines were set to: Host1, Host2, Host3
1.2 Configuring Host Mappings
Use the following command with the root account:
vim /etc/hosts
Three machines are configured separately:
Host1:
Host2:
HOST3:
2. Configure ssh2.1 to generate the key
Use the following command:
ssh-keygen-t rsa
The other settings use the default values and do not set the password as follows:
2.2 Copying Keys
Use the following command:
cp .ssh/id_rsa.pub .ssh/authorized_keys
2.3 Verification
Enter the following command:
ssh localhost
As follows:
Enter the following command:
ssh host1
As follows:
3. Assign a public key to another host for no password login
Use the following command:
ssh-copy-id -i .ssh/id_rsa.pub [email protected]ssh-copy-id -i .ssh/id_rsa.pub [email protected]
As follows:
[Nutch] Hadoop multi-machine fully distributed mode host configuration