Hadoop—学习总结
配置文件hadoop-env.sh:
export JAVA_HOME=/home/software/jdk1.8.0_172
配置文件core-site.xml:
<configuration>
<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://localhost:9000</value>
</property>
</configuration>
配置hdfs-site.xml:
<property>
<name>dfs.data.dir</name>
<value>/hadoop/data</value>
</property>
配置mapred-site.xml:
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>
环境变量 vim etc/profile:
#java invironment,hadoop invironment
export JAVA_HOME=/home/software/jdk1.8.0_172
export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin
export HADOOP_HOME=/cloud/hadoop/
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JRE_HOME=$JAVA_HOME/jre
source /etc/profile
格式化:
[root@localhost bin]# hadoop namenode -format
启动:
[root@localhost bin]# start -all.sh