环境:ubuntu+java
目录:/opt/hadoop-1.2.1
配置:在/opt/hadoop-1.2.1/conf/
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
<property>
<name>hadoop.tmp.dir</name>
<value>/hadoop</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/hadoop/name</value>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://ip:9000</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/hadoop/data</value>
</property>
<property>
<name>mapred.job.tracker</name>
<value>ip:9001</value>
</property>
export HADOOP_HOME=/opt/hadoop-1.2.1
export PATH=$HADOOP_HOME/bin:$PATH
source /etc/profile
hadoop namenode -format
start-all.sh
注意问题
- hadoop目录权限
- 配置目录权限
- ip或者域名访问