-
Install SSH client and server:
sudo apt-get install openssh-client sudo apt-get install openssh-server
-
Adding a dedicated Hadoop system user:
$ sudo addgroup hadoop $ sudo adduser --ingroup hadoop hduser
-
Configure SSH:
su - hduser ssh-keygen -t rsa -P "" cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
-
SSH to localhost
ssh localhost
If the SSH connect should fail, these general tips might help:
- Make sure you have SSH Server installed;
- Enable debugging with
ssh -vvv localhost
and investigate the error in detail; - Check the SSH server configuration in
/etc/ssh/sshd_config
, in particular the optionsPubkeyAuthentication
(which should be set to yes) andAllowUsers
(if this option is active, add the hduser user to it). If you made any changes to the SSH server configuration file, you can force a configuration reload with sudo/etc/init.d/ssh
reload.
-
Download Hadoop: http://mirrors.enquira.co.uk/apache/hadoop/core/hadoop-1.1.2/
tar xzf hadoop-1.1.2.tar.gz sudo mv hadoop-1.1.2 hadoop
-
Run
wordcount
example:hadoop jar ~/hadoop/hadoopexamples.jar wordcount
References: