search
HomeDatabaseMysql Tutorialhadoop2 单机搭建
hadoop2 单机搭建Jun 07, 2016 pm 03:08 PM
Standalonebuildenvironmentmatch

Hadoop2.2.0 环境配置说明(多节点配置在最后) 1.关闭防火墙 #chkconfigiptablesoff 2.检查状态 #chkconfig –list|grepiptables 全 off 即可 3.将 hadoop-2.2.0.tar.gz 文件复制到 /usr/local 目录下 4.解压 #tar –zxvfhadoop-2.2.0.tar.gz 5.改名 #mv Ha

Hadoop2.2.0环境配置说明(多节点配置在最后)

 

1. 关闭防火墙# chkconfig iptables off

2. 检查状态#chkconfig –list|grep iptables  off即可

3. 将hadoop-2.2.0.tar.gz文件复制到/usr/local目录下

4. 解压# tar –zxvf hadoop-2.2.0.tar.gz

5. 改名 # mv Hadoop-2.2.0 hadoop2.2

6. 修改环境变量 # vim /etc/profile

7. 添加 export HADOOP_HOME=/usr/local/hadoop2.2

     export HADOOP_MAPRED_HOME=$HADOOP_HOME

     export HADOOP_COMMON_HOME=$HADOOP_HOME

     export HADOOP_HDFS_HOME=$HADOOP_HOME 

     export YARN_HOME=$HADOOP_HOME

     export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop

PATH下添加:$HADOOP_HOME/bin:$HADOOP_HOME/sbin

8. 重载# source /etc/profile

9. 目录切换到 # cd /usr/local/hadoop2.2/etc/Hadoop

10. 在如下文件中添加对应内容

11. hadoop-env.sh  27行修改为

export JAVA_HOME=/usr/local/jdk1.6

12. yarn-env.sh 23行修改为

export JAVA_HOME=/usr/local/jdk1.6

13. 将mapred-site.xml.template 复制为mapred-site.xml

# cp mapred-site.xml.template mapred-site.xml

14. mapred-site.xml中第20(configuration)添加

    mapreduce.framework.name 

    yarn

15. yarn-site.xml18(configuration)添加

yarn.resourcemanager.hostname

    localhost

    hostanem of RM

yarn.resourcemanager.resource-tracker.address

localhost:5274

host is the hostname of the resource manager and

    port is the port on which the NodeManagers contact the Resource Manager.

    yarn.resourcemanager.scheduler.address

    localhost:5273

    host is the hostname of the resourcemanager and port is the port

    on which the Applications in the cluster talk to the Resource Manager.

 

    yarn.resourcemanager.scheduler.class

org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler

    In case you do not want to use the default scheduler

    yarn.resourcemanager.address

    localhost:5271

    the host is the hostname of the ResourceManager and the port is the port on which the clients can talk to the Resource Manager. 

 

    yarn.nodemanager.local-dirs

    

    the local directories used by the nodemanager

   yarn.nodemanager.address

   localhost:5272

   the nodemanagers bind to this port

  

   yarn.nodemanager.resource.memory-mb

   10240

  the amount of memory on the NodeManager in GB

   yarn.nodemanager.remote-app-log-dir

    /app-logs

    directory on hdfs where the application logs are moved to 

 

    yarn.nodemanager.log-dirs

    /usr/log

    the directories used by Nodemanagers as log directories

   yarn.nodemanager.aux-services

    mapreduce_shuffle

    shuffle service that needs to be set for Map Reduce to run 

16. core-site.xml20(configuration)添加

     hadoop.tmp.dir

     /usr/local/hadoop2.2/tmp

 

     fs.defaultFS 

     hdfs://localhost:9000 

     true 

17. hdfs-site.xml20(configuration)添加

dfs.namenode.name.dir

file:///dfs/name

true

 dfs.datanode.data.dir

  file:///dfs/data

 true

 

   dfs.replication

   1

  dfs.permissions.enabled

  false

 

hadoop-env.sh里面# export JAVA_HOME=/usr/local/jdk

 

18. 设置ssh   

# ssh-keygen –t rsa 一路回车默认值

进行查看 (应有id_rsaid_rsa.pub一对密钥文件)

# cd ~/.ssh

# ls 

复制出公钥

# cp id_rsa.pub authorized_keys

查看# ls  应有三个文件了

确认过程

# ssh localhost (输入yes)

# exit

# ssh localhost

19. 格式化 

# hadoop namenode –format

20. 启动 

#start-dfs.sh

#start-yarn.sh

21. 查看 # jps 应有6

22. 用自带浏览器,能打开http://localhost:50070/ 和http://localhost:8088/cluster即可

(多机环境配置)

23. DNS配置(建议修改之后重启虚拟机)

24. 将主机名换为hadoop2

# vim /etc/sysconfig/network

2行,localhost.localdomain改为hadoop2

25. 修改地址映射

# vim /etc/hosts

第三行添加192.168.100.11 hadoop2 (地址不固定)

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
右键单击无法在Word或PowerPoint中工作[修复]右键单击无法在Word或PowerPoint中工作[修复]Feb 27, 2024 pm 02:19 PM

一些Office用户报告说,他们的鼠标右键在Word和PowerPoint中无法正常工作。当他们右击文档中的空白处或元素时,他们不会得到任何上下文菜单,其中包含粘贴选项、字体、格式化背景、格式化图片、新建注释等选项。一些用户报告说,当他们按鼠标右键时,上下文菜单会出现1-2秒,然后在他们单击任何选项之前迅速消失。为什么我的右击在MicrosoftOffice中不起作用?如果右键单击在Word、PowerPoint等Office应用程序中不起作用,通常是第三方加载项导致的。如果您的鼠标未处于正确的

Vue框架下,如何快速搭建统计图表系统Vue框架下,如何快速搭建统计图表系统Aug 21, 2023 pm 05:48 PM

Vue框架下,如何快速搭建统计图表系统在现代网页应用中,统计图表是必不可少的组成部分。Vue.js作为一款流行的前端框架,提供了很多便捷的工具和组件,能够帮助我们快速搭建统计图表系统。本文将介绍如何利用Vue框架以及一些插件来搭建一个简单的统计图表系统。首先,我们需要准备一个Vue.js的开发环境,包括安装Vue脚手架以及一些相关的插件。在命令行中执行以下命

雾锁王国能野地搭建筑吗雾锁王国能野地搭建筑吗Mar 07, 2024 pm 08:28 PM

玩家在雾锁王国中进行游戏时可以收集不同的材料用来建造建筑,有很多玩家想知道野地搭建筑吗,雾锁王国能野地是不能搭建筑的,必须要在祭坛的范围内才可以搭建。雾锁王国能野地搭建筑吗答:不能。1、雾锁王国能野地是不能搭建筑的。2、建筑必须要在祭坛的范围内才可以搭建。3、玩家可以自行放置灵火祭坛,但一旦离开了范围,将无法进行建筑搭建。4、我们也可以直接在山上挖个洞当做我们的家,这样不用耗建筑材料。5、玩家自己搭建的建筑中,存在舒适度机制,也就是说,内饰越好,舒适度越高。6、高舒适度将为玩家带来属性加成,例如

php集成环境包有哪些php集成环境包有哪些Jul 24, 2023 am 09:36 AM

php集成环境包有:1、PhpStorm,功能强大的PHP集成环境;2、Eclipse,开放源代码的集成开发环境;3、Visual Studio Code,轻量级的开源代码编辑器;4、Sublime Text,受欢迎的文本编辑器,广泛用于各种编程语言;5、NetBeans,由Apache软件基金会开发的集成开发环境;6、Zend Studio,为PHP开发者设计的集成开发环境。

CentOS 7下搭建web服务器的网络安全加固技巧CentOS 7下搭建web服务器的网络安全加固技巧Aug 05, 2023 pm 01:12 PM

CentOS7下搭建web服务器的网络安全加固技巧web服务器是现代互联网的重要组成部分,因此保护web服务器的安全性非常重要。通过加固网络安全,可以减少风险和避免潜在的攻击。本文将介绍在CentOS7上搭建web服务器时常用的网络安全加固技巧,并提供相应的代码示例。更新系统和软件首先,确保你的系统和软件是最新版本。可以使用以下命令更

账号矩阵怎么搭建?矩阵搭建有哪些作用?账号矩阵怎么搭建?矩阵搭建有哪些作用?Mar 23, 2024 pm 06:46 PM

在当下信息充斥的时代,社交媒体平台已经成为人们获取和分享信息的主要途径。对于个人和企业而言,建立一个有效的账号网络以实现信息的最大传播和提升影响力,已成为亟需解决的挑战。一、账号矩阵怎么搭建?1.明确目标人群在构建账号矩阵之前,关键是明确目标受众,深入了解他们的需求、兴趣和消费习惯,这样才能制定更具针对性的内容策略。2.选择合适的平台根据目标人群的特点,选择适合的社交媒体平台进行布局。目前主流的社交媒体平台有微博、微信、抖音、快手等,每个平台都有其独特的用户群体和传播特点,需要根据实际情况进行选

CentOS搭建web服务器的日志管理与监控技巧CentOS搭建web服务器的日志管理与监控技巧Aug 05, 2023 am 08:33 AM

CentOS搭建web服务器的日志管理与监控技巧Web服务器是现代互联网应用的重要组成部分,而服务器的日志管理与监控是确保服务器稳定运行和故障排查的关键。本文将介绍在CentOS操作系统上如何搭建web服务器,并提供一些日志管理与监控的技巧。一、搭建Web服务器安装ApacheApache是一个流行的开源Web服务器软件。在CentOS上安装Apache很简

在PyCharm中快速安装PyTorch:简易指南在PyCharm中快速安装PyTorch:简易指南Feb 24, 2024 pm 09:54 PM

PyTorch安装指南:在PyCharm中快速搭建开发环境PyTorch是当前深度学习领域中备受欢迎的框架之一,具有易用性和灵活性的特点,深受开发者青睐。本文将为大家介绍如何在PyCharm中快速搭建PyTorch的开发环境,方便大家开始深度学习项目的开发。步骤一:安装PyTorch首先,我们需要安装PyTorch。PyTorch的安装通常需要考虑到系统环境

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)