CentOS 7 Hadoop installation Configuration

Source: Internet
Author: User

I use two computers for the configuration of the cluster, if it is a single machine, there may be some problems. First, set the hostname root permissions on the two computer to open the/etc/host file

Set Hostname,root permissions again to open/etc/hostname file settings

From the machine set to Slaver.hadoop

1. Install the Java JDK and configure the environment

CentOS comes with a JDK installed, and if we want to install the JDK ourselves and configure the environment, first uninstall the original JDK

In command-line mode, enter command: Yum remove Java (root user, non-root user, please add sudo before the command).

Next install the JDK and configure the environment, download the JDK rpm package online, using the command: RPM-IVH JDK-......;

To configure the JDK environment:

The root user opens the/etc/profile file at the end of the file by adding a JDK path similar to the following configuration, just pay attention to the JDK version

  

The above section is a Java environment variable, followed by a Hadoop variable, and so on.

2. Install Hadoop and configure the environment.

Download the hadoop-2.6.0 version to the Apache website.

Extract files: tar-xvf hadoop-2.6.0.tar.gz (Unzip to the path you need to install, or set the path again)

Go to the extracted directory and find the following configuration files under the hadoop-2.6.0/etc/hadoop/path

  

Core.site.xml:

  

Hdfs-site.xml

  

Mapred-site.xml.template

  

hadoop-env.sh

  

Slaves

192.168.1.126 slave IP

To complete this configuration, start the tutorial on the reference web.

/hadoop-2.6.0/bin/hadoop Namenode-format

/hadoop-2.6.0/sbin/start-all.sh

Complete.

Note: You need to shut down the firewall of two computers before starting: sudo systemctl stop Iptables.service

3. Installing the configuration Hadoop Eclipse plug-in

Download the Hadoop Eclipse plugin and put it in the plugins folder in the Eclipse folder to start Eclipse.

Eclipse Window->open persperctive->other->

  

Open Map/reduce and Resource respectively. Then create a new M/R project in Eclipse, find Wordcount.java source code execution,

Set parameters for run as configuertion in Eclipse:

  

Project directory in eclipse:

  

Execution Result:

  

  

  

CentOS 7 Hadoop installation Configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.