赞
踩
上一篇文章已经为大家介绍了如何在Linux系统上配置java环境,这为hadoop的集群搭建提供了基础条件,因为Hadoop是由Java编写的
如果还没有在虚拟机配置java系统的小伙伴可以先看一下我的第一篇文章:https://blog.csdn.net/beixige/article/details/129112527
接下来是hadoop伪分布搭建的要准备东西:
jdk1.8.0_221
hadoop-2.7.7
我都打包提供给大家了,下载地址:https://share.weiyun.com/dk7WgaVk
密码:553ubk
下面正式开始吧!
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
ssh-copy-id -i /root/.ssh/id_dsa.pub master
ssh master
exit
tar -zvxf /root/ruanjian/hadoop-2.7.7.tar.gz -C /opt
mv hadoop-2.7.7 hadoop
vim /etc/profile
export HADOOP_HOME=/opt/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
source /etc/profile
vi /opt/hadoop/etc/hadoop/hadoop-env.sh
export JAVA_HOME=/opt/java
vi /opt/hadoop/etc/hadoop/core-site.xml
<property>
<name>fs.defaultFS</name>
<value>hdfs://master</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/hadoop/tmp</value>
</property>
vi /opt/hadoop/etc/hadoop/hdfs-site.xml
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
cp /opt/hadoop/etc/hadoop/mapred-site.xml.template /opt/hadoop/etc/hadoop/mapred-site.xml
vi /opt/hadoop/etc/hadoop/mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
vi /opt/hadoop/etc/hadoop/yarn-site.xml
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
vim /opt/hadoop/etc/hadoop/slaves
master
hdfs namenode -format
start-all.sh
jps
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。