系统相关
首页 > 系统相关> > CentOS7.2配置Hadoop2.6.5

CentOS7.2配置Hadoop2.6.5

作者:互联网

Hadoop配置文件

/etc/profile

配置Java和Hadoop环境

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 
export HADOOP_HOME=/usr/local/hadoop-2.6.5/hadoop-2.6.5
export PATH=$JAVA_HOME/bin:${PATH}:$HADOOP_HOME/bin:$HADOOP_HOME/sbin

core-site.xml

fs.defualtFS:配置主节点namenode地址

hadoop.tmp.dir:在本地文件系统所在的NameNode的存储空间和持续化处理日志

<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://192.168.94.140:9000</value>
</property>

<property>
<name>hadoop.tmp.dir</name>
<value>/usr/local/hadoop-2.6.5/data</value>
</property>
</configuration>

mapred-site.xml.template

mapreduce.framework.name:执行框架设置为 Hadoop YARN

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

yarn-site.xml

yarn.resourcemanager.hostname:namenode的yarn地址

yarn.nodemanager.aux-services:Shuffle service 需要加以设置的Map Reduce的应用程序服务

<property>
<name>yarn.resourcemanager.hostname</name>
<value>CentOS7One</value>
</property>

<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

hadoop-env.sh

JAVA_HOME换成绝对路径

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk

slaves

配置子节点,伪分布式,一台机器,配置子节点为自身

CentOS7One

 

标签:JAVA,lib,配置,hadoop,yarn,export,HOME,CentOS7.2,Hadoop2.6
来源: https://www.cnblogs.com/Java-Starter/p/10341898.html