Changes between Version 15 and Version 16 of jazz/08-11-04
- Timestamp:
- Nov 4, 2008, 4:38:34 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
jazz/08-11-04
v15 v16 18 18 ~/hadoop-0.18.2$ bin/hadoop namenode -format 19 19 }}} 20 * [注意] 還需要編輯 conf/hadoop-evn.sh (HADOOP_HOME要設定到你的hadoop安裝目錄) 21 {{{ 22 export JAVA_HOME=/usr/lib/jvm/java-6-sun 23 export HADOOP_HOME=/home/jazz/hadoop-0.18.2/ 24 export HADOOP_LOG_DIR=$HADOOP_HOME/logs 25 export HADOOP_SLAVES=$HADOOP_HOME/conf/slaves 26 export HADOOP_CONF_DIR=$HADOOP_HOME/conf 27 }}} 20 28 * 編輯 conf/hadoop-site.xml 在 configuration 那一段加入以下設定 21 29 {{{ 22 <configuration>23 30 <property> 24 31 <name>fs.default.name</name> 25 <value>localhost:5000</value> 26 </property> 27 </configuration> 32 <value>hdfs://localhost:9000/</value> 33 <description> 34 The name of the default file system. Either the literal string 35 "local" or a host:port for NDFS. 36 </description> 37 </property> 38 39 <property> 40 <name>mapred.job.tracker</name> 41 <value>localhost:9001</value> 42 <description> 43 The host and port that the MapReduce job tracker runs at. If 44 "local", then jobs are run in-process as a single map and 45 reduce task. 46 </description> 47 </property> 48 28 49 }}} 29 * 用 bin/hadoop namenode 啟動 namenode 50 51 * 執行 bin/start-all.sh 30 52 {{{ 31 ~/hadoop-0.18.2$ bin/hadoop namenode 32 <ctrl-C> and come out 33 }}} 34 * 執行 bin/start-dfs.sh 35 {{{ 36 ~/hadoop-0.18.2$ bin/start-dfs.sh 53 ~/hadoop-0.18.2$ bin/start-all.sh 37 54 starting namenode, logging to /home/jazz/hadoop-0.18.2/bin/../logs/hadoop-jazz-namenode-hadoop.out 38 55 The authenticity of host 'localhost (127.0.0.1)' can't be established. … … 46 63 ~$ cp .ssh/id_rsa.pub .ssh/authorized_keys 47 64 }}} 48 * 65 66 * 完成後可以看到以下三個網頁 67 * http://localhost:50030/ 68 * http://localhost:50060/ 69 * http://localhost:50070/ 70 71 * 可以放的東西上去看看 49 72 {{{ 73 ~$ bin/hadoop dfs -put conf conf 74 ~$ bin/hadoop dfs -ls 75 Found 1 items 76 drwxr-xr-x - jazz supergroup 0 2008-11-04 15:56 /user/jazz/conf 50 77 }}} 51 * 如果遇到 JAVA_HOME 的問題,可以改用手動的方式啟動 DFS 服務52 {{{53 ~/hadoop-0.18.2$ bin/hadoop datanode54 ~/hadoop-0.18.2$ bin/hadoop-daemon.sh start datanode55 }}}56 * http://localhost:50070/