闲话不多讲,主要为方便想学hadoop但没有多余机器的朋友
(1)core-site.xml配置
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
(2)hdfs.site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/hadoop/hadooptmp</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/home/hadoop/hadoopdata</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/home/hadoop/hadoopname</value>
</property>
</configuration>
(3)mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>
(4)hdfs.env.sh
export JAVA_HOME=/home/hadoop/jdk
以上是伪分布式的配置