文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

MacOS下Hadoop3的安装步骤

2023-06-02 16:26

关注

这篇文章主要介绍“MacOS下Hadoop3的安装步骤”,在日常操作中,相信很多人在MacOS下Hadoop3的安装步骤问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”MacOS下Hadoop3的安装步骤”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

1 检查JDK

Matching Java Virtual Machines (1):

    1.8.0_201, x86_64:"Java SE 8"/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home

2 安装Brew

nancylulululudeMacBook-Air:~ nancy$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

3 密钥

ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

nancylulululudeMacBook-Air:.ssh nancy$ ls

authorized_keysid_rsaid_rsa.pubknown_hosts

nancylulululudeMacBook-Air:.ssh nancy$ chmod 0600 ~/.ssh/authorized_keys

4 brew安装hadoop

 brew install hadoop

5 hadoop配置

路径:

/usr/local/Cellar/hadoop/3.1.1/libexec/etc/hadoop

core-site.xml

<configuration>

 <property>

    <name>fs.default.name</name>

    <value>hdfs://localhost:8020</value>

  </property>

 <property>

    <name>hadoop.tmp.dir</name>

    <value>file:/usr/local/Cellar/hadoop/tmp</value>

  </property>

 <property>

    <name>fs.trash.interval</name>

    <value>4320</value>

  </property>

</configuration>

hdfs-site.xml

<configuration>

<property>

   <name>dfs.namenode.name.dir</name>

   <value>file:/usr/local/Cellar/hadoop/tmp/dfs/name</value>

 </property>

 <property>

   <name>dfs.datanode.data.dir</name>

   <value>file:/usr/local/Cellar/hadoop/tmp/dfs/data</value>

 </property>

 <property>

   <name>dfs.replication</name>

   <value>1</value>

 </property>

 <property>

   <name>dfs.webhdfs.enabled</name>

   <value>true</value>

 </property>

 <property>

   <name>dfs.permissions.superusergroup</name>

   <value>admin</value>

 </property>

 <property>

   <name>dfs.permissions.enabled</name>

   <value>false</value>

 </property>

</configuration>

yarn-site.xml

<configuration>

<!-- Site specific YARN configuration properties -->

<property>

   <name>yarn.resourcemanager.hostname</name>

   <value>localhost</value>

</property>

 <property>

   <name>yarn.nodemanager.aux-services</name>

   <value>mapreduce_shuffle</value>

 </property>

 <property>

   <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>

   <value>org.apache.hadoop.mapred.ShuffleHandler</value>

 </property>

 <property>

   <name>yarn.resourcemanager.address</name>

   <value>localhost:18040</value>

 </property>

<property>

   <name>yarn.resourcemanager.scheduler.address</name>

   <value>localhost:18030</value>

 </property>

 <property>

   <name>yarn.resourcemanager.resource-tracker.address</name>

   <value>localhost:18025</value>

 </property>

 <property>

   <name>yarn.resourcemanager.admin.address</name>

   <value>localhost:18141</value>

 </property>

<property>

   <name>yarn.resourcemanager.webapp.address</name>

   <value>localhost:18088</value>

</property>

<property>

   <name>yarn.log-aggregation-enable</name>

   <value>true</value>

</property>

<property>

   <name>yarn.log-aggregation.retain-seconds</name>

   <value>86400</value>

</property>

<property>

   <name>yarn.log-aggregation.retain-check-interval-seconds</name>

   <value>86400</value>

</property>

<property>

   <name>yarn.nodemanager.remote-app-log-dir</name>

   <value>/tmp/logs</value>

</property>

<property>

   <name>yarn.nodemanager.remote-app-log-dir-suffix</name>

   <value>logs</value>

</property>

</configuration>

mapred-site.xml

<configuration>

<property>

  <name>mapreduce.framework.name</name>

  <value>yarn</value>

</property>

<property>

  <name>mapreduce.jobtracker.http.address</name>

  <value>localhost:50030</value>

</property>

<property>

  <name>mapreduce.jobhisotry.address</name>

  <value>localhost:10020</value>

</property>

<property>

  <name>mapreduce.jobhistory.webapp.address</name>

  <value>localhost:19888</value>

</property>

<property>

  <name>mapreduce.jobhistory.done-dir</name>

  <value>/jobhistory/done</value>

</property>

<property>

  <name>mapreduce.intermediate-done-dir</name>

  <value>/jobhisotry/done_intermediate</value>

</property>

<property>

  <name>mapreduce.job.ubertask.enable</name>

  <value>true</value>

</property>

</configuration>

slaves

localhost

6 创建文件夹

nancylulululudeMacBook-Air:hadoop nancy$ mkdir  /usr/local/Cellar/hadoop/tmp

nancylulululudeMacBook-Air:hadoop nancy$ mkdir -p  /usr/local/Cellar/hadoop/tmp/dfs/name

nancylulululudeMacBook-Air:hadoop nancy$ mkdir  /usr/local/Cellar/hadoop/tmp/dfs/data

7 hdfs格式化

 hdfs namenode -format

格式化成功

2019-03-22 16:48:24,632 INFO common.Storage: Storage directory /usr/local/Cellar/hadoop/tmp/dfs/name has been successfully formatted.

Here comes the last step~

startup!

nancylulululudeMacBook-Air:3.1.1 nancy$ cd /usr/local/Cellar/hadoop/3.1.1/sbin

nancylulululudeMacBook-Air:sbin nancy$ ./start-all.sh

WARNING: Attempting to start all Apache Hadoop daemons as nancy in 10 seconds.

WARNING: This is not a recommended production deployment configuration.

WARNING: Use CTRL-C to abort.

Starting namenodes on [localhost]

Starting datanodes

Starting secondary namenodes [nancylulululudeMacBook-Air.local]

nancylulululudeMacBook-Air.local: Warning: Permanently added 'nancylulululudemacbook-air.local,192.168.1.142' (ECDSA) to the list of known hosts.

2019-03-22 17:24:04,021 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

Starting resourcemanager

Starting nodemanagers

nancylulululudeMacBook-Air:sbin nancy$ jps

3266 NodeManager

3171 ResourceManager

2980 SecondaryNameNode

2748 NameNode

2847 DataNode

3327 Jps

登陆地址 http://localhost:9870/    

               http://localhost:8088/

到此,关于“MacOS下Hadoop3的安装步骤”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注编程网网站,小编会继续努力为大家带来更多实用的文章!

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯