Home Database Mysql Tutorial hadoop2 单机搭建

hadoop2 单机搭建

Jun 07, 2016 pm 03:08 PM
Standalone build environment match

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 of this Website
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

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)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Right click not working in Word or PowerPoint [FIXED] Right click not working in Word or PowerPoint [FIXED] Feb 27, 2024 pm 02:19 PM

Some Office users have reported that their right mouse button does not work properly in Word and PowerPoint. When they right-click on an empty space or element in the document, they don't get any context menu with options for paste options, fonts, format background, format image, create new annotation, and more. Some users have reported that when they press the right mouse button, the context menu appears for 1-2 seconds and then quickly disappears before they click on any option. Why doesn't my right-click work in Microsoft Office? If right-clicking does not work in Office applications such as Word and PowerPoint, it is usually caused by a third-party add-in. If your mouse is not in the correct

Unable to boot into Windows recovery environment Unable to boot into Windows recovery environment Feb 19, 2024 pm 11:12 PM

Windows Recovery Environment (WinRE) is an environment used to repair Windows operating system errors. After entering WinRE, you can perform system restore, factory reset, uninstall updates, etc. If you are unable to boot into WinRE, this article will guide you through fixes to resolve the issue. Unable to boot into the Windows Recovery Environment If you cannot boot into the Windows Recovery Environment, use the fixes provided below: Check the status of the Windows Recovery Environment Use other methods to enter the Windows Recovery Environment Did you accidentally delete the Windows Recovery Partition? Perform an in-place upgrade or clean installation of Windows below, we have explained all these fixes in detail. 1] Check Wi

What are the differences between Python and Anaconda? What are the differences between Python and Anaconda? Sep 06, 2023 pm 08:37 PM

In this article, we will learn about the differences between Python and Anaconda. What is Python? Python is an open source language that places great emphasis on making the code easy to read and understand by indenting lines and providing whitespace. Python's flexibility and ease of use make it ideal for a variety of applications, including but not limited to scientific computing, artificial intelligence, and data science, as well as creating and developing online applications. When Python is tested, it is immediately translated into machine language because it is an interpreted language. Some languages, such as C++, require compilation to be understood. Proficiency in Python is an important advantage because it is very easy to understand, develop, execute and read. This makes Python

What is the best graphics card for i7 3770? What is the best graphics card for i7 3770? Dec 29, 2023 am 09:12 AM

What graphics card is good for Core i73770? RTX3070 is a very powerful graphics card with excellent performance and advanced technology. Whether you're playing games, rendering graphics, or performing machine learning, the RTX3070 can handle it with ease. It uses NVIDIA's Ampere architecture, has 5888 CUDA cores and 8GB of GDDR6 memory, which can provide a smooth gaming experience and high-quality graphics effects. RTX3070 also supports ray tracing technology, which can present realistic light and shadow effects. All in all, the RTX3070 is a powerful and advanced graphics card suitable for those who pursue high performance and high quality. RTX3070 is an NVIDIA series graphics card. Powered by 2nd generation NVID

i73770 with rx5600xt (i73770 with rx5600xt) i73770 with rx5600xt (i73770 with rx5600xt) Jan 04, 2024 am 11:26 AM

i73770 with rx5600xt Because the RX5600XT graphics card is matched with the R53600CPU, we chose the i7-3770. The evaluation results of the RX5600XT graphics card are as follows: The RX5600XT graphics card is an excellent graphics card and performed very well after testing. It adopts AMD's RDNA architecture, has 6GBGDDR6 video memory and 192-bit memory interface, supports PCIe4.0 bus, and has excellent gaming performance. In all tests, the RX5600XT graphics card performed well. At high resolutions, it delivers a smooth gaming experience and maintains frame rates above 60 FPS in most games. In the latest games, it can also provide good

How to quickly build a statistical chart system under the Vue framework How to quickly build a statistical chart system under the Vue framework Aug 21, 2023 pm 05:48 PM

How to quickly build a statistical chart system under the Vue framework. In modern web applications, statistical charts are an essential component. As a popular front-end framework, Vue.js provides many convenient tools and components that can help us quickly build a statistical chart system. This article will introduce how to use the Vue framework and some plug-ins to build a simple statistical chart system. First, we need to prepare a Vue.js development environment, including installing Vue scaffolding and some related plug-ins. Execute the following command in the command line

Can buildings be built in the wild in Mistlock Kingdom? Can buildings be built in the wild in Mistlock Kingdom? Mar 07, 2024 pm 08:28 PM

Players can collect different materials to build buildings when playing in the Mistlock Kingdom. Many players want to know whether to build buildings in the wild. Buildings cannot be built in the wild in the Mistlock Kingdom. They must be within the scope of the altar. . Can buildings be built in the wild in Mistlock Kingdom? Answer: No. 1. Buildings cannot be built in the wild areas of the Mist Lock Kingdom. 2. The building must be built within the scope of the altar. 3. Players can place the Spirit Fire Altar by themselves, but once they leave the range, they will not be able to construct buildings. 4. We can also directly dig a hole in the mountain as our home, so we don’t need to consume building materials. 5. There is a comfort mechanism in the buildings built by players themselves, that is to say, the better the interior, the higher the comfort. 6. High comfort will bring attribute bonuses to players, such as

11 Ways to Set Environment Variables on Windows 3 11 Ways to Set Environment Variables on Windows 3 Sep 15, 2023 pm 12:21 PM

Setting environment variables on Windows 11 can help you customize your system, run scripts, and configure applications. In this guide, we'll discuss three methods along with step-by-step instructions so you can configure your system to your liking. There are three types of environment variables System environment variables – Global variables are the lowest priority and are accessible to all users and applications on Windows and are typically used to define system-wide settings. User Environment Variables – Higher priority, these variables only apply to the current user and process running under that account, and are set by the user or application running under that account. Process environment variables – have the highest priority, they are temporary and apply to the current process and its sub-processes, providing the program

See all articles