- download hadoop-0.18.2
$ wget http://ftp.twaren.net/Unix/Web/apache/hadoop/core/hadoop-0.18.2/hadoop-0.18.2.tar.gz
$ tar zxvf hadoop-0.18.2.tar.gz
- [注意] 需要 JAVA_HOME 環境變數才能執行 hadoop namenode
$ export JAVA_HOME=/usr/lib/jvm/java-6-sun
$ cd hadoop-0.18.2
~/hadoop-0.18.2$ bin/hadoop namenode -format
- 編輯 conf/hadoop-site.xml 在 configuration 那一段加入以下設定
<configuration>
<property>
<name>fs.default.name</name>
<value>localhost:5000</value>
</property>
</configuration>
- 用 bin/hadoop namenode 啟動 namenode
~/hadoop-0.18.2$ bin/hadoop namenode
<ctrl-C> and come out
$ bin/start-dfs.sh
- http://localhost:50070/