一、前置条件
[root@jediael jediael]$wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-1.2.1/hadoop-1.2.1.tar.gz [root@jediael jediael]$ tar -zxvf hadoop-1.2.1-bin.tar.gz
[root@jediael hadoop-1.2.1]$ vi conf/hadoop-env.sh export JAVA_HOME=/usr/java/jdk1.7.0_51
[root@jediael hadoop-1.2.1]$ bin/hadoop Usage: hadoop [--config confdir] COMMAND where COMMAND is one of: namenode -format format the DFS filesystem secondarynamenode run the DFS secondary namenode namenode run the DFS namenode datanode run a DFS datanode dfsadmin run a DFS admin client mradmin run a Map-Reduce admin client fsck run a DFS filesystem checking utility fs run a generic filesystem user client
<configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> </property> </configuration>
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration>
<configuration> <property> <name>mapred.job.tracker</name> <value>localhost:9001</value> </property> </configuration>
[root@jediael hadoop-1.2.1]$ bin/hadoop namenode -format 14/08/16 23:50:02 INFO namenode.NameNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting NameNode STARTUP_MSG: host = jediael/10.171.29.191 STARTUP_MSG: args = [-format] STARTUP_MSG: version = 1.2.1 STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152; compiled by 'mattf' on Mon Jul 22 15:23:09 PDT 2013 STARTUP_MSG: java = 1.7.0_51 ************************************************************/ 14/08/16 23:50:02 INFO util.GSet: Computing capacity for map BlocksMap 14/08/16 23:50:02 INFO util.GSet: VM type = 64-bit 14/08/16 23:50:02 INFO util.GSet: 2.0% max memory = 1013645312 14/08/16 23:50:02 INFO util.GSet: capacity = 2^21 = 2097152 entries 14/08/16 23:50:02 INFO util.GSet: recommended=2097152, actual=2097152 14/08/16 23:50:02 INFO namenode.FSNamesystem: fsOwner=jediael 14/08/16 23:50:02 INFO namenode.FSNamesystem: supergroup=supergroup 14/08/16 23:50:02 INFO namenode.FSNamesystem: isPermissionEnabled=true 14/08/16 23:50:02 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100 14/08/16 23:50:02 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s) 14/08/16 23:50:02 INFO namenode.FSEditLog: dfs.namenode.edits.toleration.length = 0 14/08/16 23:50:02 INFO namenode.NameNode: Caching file names occuring more than 10 times 14/08/16 23:50:03 INFO common.Storage: Image file /tmp/hadoop-jediael/dfs/name/current/fsimage of size 113 bytes saved in 0 seconds. 14/08/16 23:50:03 INFO namenode.FSEditLog: closing edit log: position=4, editlog=/tmp/hadoop-jediael/dfs/name/current/edits 14/08/16 23:50:03 INFO namenode.FSEditLog: close success: truncate to 4, editlog=/tmp/hadoop-jediael/dfs/name/current/edits 14/08/16 23:50:03 INFO common.Storage: Storage directory /tmp/hadoop-jediael/dfs/name has been successfully formatted. 14/08/16 23:50:03 INFO namenode.NameNode: SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at jediael/10.171.29.191 ************************************************************/
[root@jediael hadoop-1.2.1]# bin/start-all.sh starting namenode, logging to /opt/jediael/hadoop-1.2.1/libexec/../logs/hadoop-root-namenode-jediael.out localhost: starting datanode, logging to /opt/jediael/hadoop-1.2.1/libexec/../logs/hadoop-root-datanode-jediael.out localhost: starting secondarynamenode, logging to /opt/jediael/hadoop-1.2.1/libexec/../logs/hadoop-root-secondarynamenode-jediael.out starting jobtracker, logging to /opt/jediael/hadoop-1.2.1/libexec/../logs/hadoop-root-jobtracker-jediael.out localhost: starting tasktracker, logging to /opt/jediael/hadoop-1.2.1/libexec/../logs/hadoop-root-tasktracker-jediael.out
[root@jediael hadoop-1.2.0]# jps 3148 JobTracker 3280 TaskTracker 3052 SecondaryNameNode 2920 DataNode 2801 NameNode 3442 Jps
Hadoop1.2.1伪分布模式安装指南,布布扣,bubuko.com
原文地址:http://blog.csdn.net/jediael_lu/article/details/38637277