Environment Note: Hadoop version: 1.0.3. Jdk:1.6.0_27 Ubuntu12.04
Setup passphraseless SSH--ensures that the user can ssh to the local host without entering a password to log in Now check this can ssh to the localhost without a passphrase:
$ ssh localhost--tests whether to log in or not, if successful, without typing the password
If you cannot ssh to localhost without a passphrase, execute the following commands:--if the above is unsuccessful, create a new SSH key based on the empty password to enable password-free login
$ ssh-keygen-t Dsa-p "-F ~/.SSH/ID_DSA
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys execution
Format a new distributed-filesystem:--formatted HDFs file system
$ bin/hadoop Namenode-format
Start the Hadoop daemons:--open the Hadoop daemon
$ bin/start-all.sh
The Hadoop daemon log output is written to the ${hadoop_log_dir} directory (defaults to ${hadoop_home}/logs).
Browse the Web interface for the NameNode and the Jobtracker; By default they is available at:namenode-http://localhost:50070/jobtracker-http://localhost:50030/
Copy the input files into the distributed filesystem:--start testing, enter the content to be analyzed first, and now the Conf directory under the Hadoop directory as the input source
$ bin/hadoop fs-put conf input
Run Some of the examples provided:--start executing the following command
$ bin/hadoop jar hadoop-examples-*.jar grep input Output ' dfs[a-z. +'
Examine the output files:
Copy the output files from the distributed filesystem to the local filesytem and examine them:
$ bin/hadoop fs-get Output output
$ cat output/*
Or
View the output files on the distributed filesystem:--see the results of the operation through the following way
$ bin/hadoop Fs-cat output/*
When you're done, stop the daemons with:--shutdown daemon
$ bin/stop-all.sh