Prepare SSH
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
Configuration
vim /home/action/software/hadoop-1.2.1/conf/hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
bin/hadoop namenode -format
bin/hadoop fs -mkdir input
bin/hadoop fs -put conf input
bin/hadoop fs -cp conf/*.xml input
bin/start-all.sh
bin/hadoop jar hadoop-examples-1.2.1.jar grep input output 'dfs[a-z.]+'
bin/hadoop fs -rmr output
bin/hadoop jar hadoop-examples-1.2.1.jar wordcount input output
bin/hadoop fs -rmr output
bin/stop-all.sh
core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/action/tmp</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>
"hadoop.tmp.dir" must be set, otherwise it will throw error
admin interface
http://localhost:50030/ - Hadoop 管理介面
http://localhost:50060/ - Hadoop Task Tracker 状态
http://localhost:50070/ - Hadoop DFS 状态
#Reference# angelosun.iteye.com
shaurong.blogspot.hk
blog.csdn.net