Database Reference
In-Depth Information
A key is created automatically as $HOME/.ssh/id_rsa.pub. You now need to copy this key to the data nodes. You
run the following command to do that:
ssh-copy-id hadoop@hc1r1m1
This copies the new SSH key to the data node hc1r1m1 as user hadoop; you change the server name to copy the
key to the other data node servers.
The remote passwordless secure shell access can now be tested with this:
ssh hadoop@hc1r1m1
A secure shell session should now be created on the host hc1r1m1 without need to prompt a password.
As Hadoop has been developed using Java, you must also ensure that you have a suitable version of Java installed
on each machine. I will be using four machines in a mini cluster for this test:
hc1nn - A Linux CentOS 6 server for a name node
hc1r1m1 - A Linux CentOS 6 server for a data node
hc1r1m2 - A Linux CentOS 6 server for a data node
hc1r1m3 - A Linux CentOS 6 server for a data node
Can the name node access all of the data nodes via SSH (secure shell) without being prompted for a password?
And is a suitable Java version installed? I have a user account called hadoop on each of these servers that I use for this
installation. For instance, the following command line shows hadoop@hc1nn, which means that we are logged into the
server hc1nn as the Linux user hadoop:
[hadoop@hc1nn ~]$ java -version
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.1) (rhel-3.1.13.1.el6_5-i386)
OpenJDK Client VM (build 23.25-b01, mixed mode)
This command, java -version, shows that we have OpenJDK java version 1.6.0_30 installed. The following
commands create an SSH session on each of the data nodes and checks the Java version on each:
[hadoop@hc1nn ~]$ ssh hadoop@hc1r1m3
Last login: Thu Mar 13 19:41:12 2014 from hc1nn
[hadoop@hc1r1m3 ~]$
[hadoop@hc1r1m3 ~]$ java -version
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.1) (rhel-3.1.13.1.el6_5-i386)
OpenJDK Server VM (build 23.25-b01, mixed mode)
[hadoop@hc1r1m3 ~]$ exit
logout
Connection to hc1r1m3 closed.
[hadoop@hc1nn ~]$ ssh hadoop@hc1r1m2
Last login: Thu Mar 13 19:40:45 2014 from hc1nn
[hadoop@hc1r1m2 ~]$ java -version
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.1) (rhel-3.1.13.1.el6_5-i386)
OpenJDK Server VM (build 23.25-b01, mixed mode)
 
Search WWH ::




Custom Search