分类

链接

2022 年 5 月
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > 大数据 > 正文
共享办公室出租
deepin单节点启动hadoop
大数据 暂无评论 阅读(116)

下载HADOOP
在这里插入图片描述

2、Core-site.xml文件配置
注意:以下所有文件均在对应文件夹下面 可以命令行编辑 也可在vscode 编辑

<span class="token punctuation">&lt;</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
  <span class="token punctuation">&lt;</span><span class="token variable">name</span><span class="token punctuation">&gt;</span><span class="token variable">fs</span><span class="token punctuation">.</span><span class="token variable">default</span><span class="token punctuation">.</span><span class="token variable">name</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">name</span><span class="token punctuation">&gt;</span>
    <span class="token punctuation">&lt;</span><span class="token variable">value</span><span class="token punctuation">&gt;</span><span class="token variable">hdfs:</span><span class="token punctuation">/</span><span class="token punctuation">/</span><span class="token variable">localhost:</span><span class="token number">9000</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">value</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>

 

在这里插入图片描述
3、Hdfs-site.xml文件配置

<span class="token punctuation">&lt;</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
 <span class="token punctuation">&lt;</span><span class="token variable">name</span><span class="token punctuation">&gt;</span><span class="token variable">dfs</span><span class="token punctuation">.</span><span class="token variable">replication</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">name</span><span class="token punctuation">&gt;</span>
 <span class="token punctuation">&lt;</span><span class="token variable">value</span><span class="token punctuation">&gt;</span><span class="token number">1</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">value</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>

<span class="token punctuation">&lt;</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
  <span class="token punctuation">&lt;</span><span class="token variable">name</span><span class="token punctuation">&gt;</span><span class="token variable">dfs</span><span class="token punctuation">.</span><span class="token variable">name</span><span class="token punctuation">.</span><span class="token variable">dir</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">name</span><span class="token punctuation">&gt;</span>
    <span class="token punctuation">&lt;</span><span class="token variable">value</span><span class="token punctuation">&gt;</span><span class="token variable">file:</span><span class="token punctuation">/</span><span class="token punctuation">/</span><span class="token punctuation">/</span><span class="token variable">home</span><span class="token punctuation">/</span><span class="token variable">hadoop</span><span class="token punctuation">/</span><span class="token variable">hadoopdata</span><span class="token punctuation">/</span><span class="token variable">hdfs</span><span class="token punctuation">/</span><span class="token variable">namenode</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">value</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>

<span class="token punctuation">&lt;</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
  <span class="token punctuation">&lt;</span><span class="token variable">name</span><span class="token punctuation">&gt;</span><span class="token variable">dfs</span><span class="token punctuation">.</span><span class="token variable">data</span><span class="token punctuation">.</span><span class="token variable">dir</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">name</span><span class="token punctuation">&gt;</span>
    <span class="token punctuation">&lt;</span><span class="token variable">value</span><span class="token punctuation">&gt;</span><span class="token variable">file:</span><span class="token punctuation">/</span><span class="token punctuation">/</span><span class="token punctuation">/</span><span class="token variable">home</span><span class="token punctuation">/</span><span class="token variable">hadoop</span><span class="token punctuation">/</span><span class="token variable">hadoopdata</span><span class="token punctuation">/</span><span class="token variable">hdfs</span><span class="token punctuation">/</span><span class="token variable">datanode</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">value</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>

 

在这里插入图片描述
4、Mapred-site.xml文件配置

<span class="token punctuation">&lt;</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>
 <span class="token punctuation">&lt;</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
  <span class="token punctuation">&lt;</span><span class="token variable">name</span><span class="token punctuation">&gt;</span><span class="token variable">mapreduce</span><span class="token punctuation">.</span><span class="token variable">framework</span><span class="token punctuation">.</span><span class="token variable">name</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">name</span><span class="token punctuation">&gt;</span>
   <span class="token punctuation">&lt;</span><span class="token variable">value</span><span class="token punctuation">&gt;</span><span class="token variable">yarn</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">value</span><span class="token punctuation">&gt;</span>
 <span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>
 

 

在这里插入图片描述

5、Yarn-site.xml文件配置

<span class="token punctuation">&lt;</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>
 <span class="token punctuation">&lt;</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
  <span class="token punctuation">&lt;</span><span class="token variable">name</span><span class="token punctuation">&gt;</span><span class="token variable">yarn</span><span class="token punctuation">.</span><span class="token variable">nodemanager</span><span class="token punctuation">.</span><span class="token variable">aux-services</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">name</span><span class="token punctuation">&gt;</span>
    <span class="token punctuation">&lt;</span><span class="token variable">value</span><span class="token punctuation">&gt;</span><span class="token variable">mapreduce_shuffle</span><span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">value</span><span class="token punctuation">&gt;</span>
 <span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">property</span><span class="token punctuation">&gt;</span>
<span class="token punctuation">&lt;</span><span class="token punctuation">/</span><span class="token variable">configuration</span><span class="token punctuation">&gt;</span>

 

在这里插入图片描述

(九)启动集群
1、重启格式化HDFS

hdfs namenode -format

在这里插入图片描述
2、启动文件系统

start-dfs.sh

在这里插入图片描述
3、启动文件系统报错配置JAVA_HOME

看我上一篇博客配置jdk

在这里插入图片描述

在这里插入图片描述
4、启动文件系统

start-dfs.sh

在这里插入图片描述

5、启动YARN

start-yarn.sh

在这里插入图片描述

6、访问

http://localhost:50070

7、访问50070端口失败手动配置端口
在这里插入图片描述

8、测试HADOOP
在这里插入图片描述
9、关闭服务

<span class="token variable">Stop-all</span><span class="token punctuation">.</span><span class="token variable">sh</span>

 

在这里插入图片描述

10、查看DATANODE信息

<span class="token variable">jps</span>

 

在这里插入图片描述
(十)测试服务
在这里插入图片描述

1、Brower Directort 报错则更改jdk1.8版本就可以了

在这里插入图片描述

2、Hdoop上传文件以及查看状态

可以采取界面操作

h’d’f’s dfs -put 你文件的路径

在这里插入图片描述
在这里插入图片描述
3、测试上传以及下载文件

建议采用界面操作

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

============ 欢迎各位老板打赏~ ===========

【上篇】
【下篇】

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:deepin单节点启动hadoop | Bruce's Blog

发表评论

留言无头像?