Hadoop fully distributed environment to build

Source: Internet
Author: User
Keywords nbsp; java install ssh name
Tags address aliyun distributed environment etc hadoop host hostname

One. Preparation

Experimental environment: Vmware virtual three hosts, the system is CentOS_6.4_i386

Software Used: Hadoop-1.2.1-1.i386.rpm, jdk-7u9-linux-i586.rpm

Host Planning:

IP address & http: //www.aliyun.com/zixun/aggregation/37954.html "> nbsp; hostname role

192.168.2.22 master.flyence.tk NameNode, JobTracker

192.168.2.42 datanode.flyence.tk DataNode, TaskTracker

192.168.2.32 snn.flyence.tk SecondaryNameNode

The hostname command modifies the host name and modifies the host in / etc / sysconfig / network

Take the master node for example

[root @ localhost ~] # hostname master.flyence.tk

[root @ localhost ~] # vim / etc / sysconfig / network

[root @ localhost ~] # logout

-

Below is the contents of / etc / sysconfig / network

NETWORKING = yes

HOSTNAME = master.flyence.tk

In / etc / hosts, record the IP and hostname of the three hosts

3. Add hadoop users on 3 hosts and set the password

# useradd hadoop

# echo "hadoop" | passwd --stdin hadoop

4. The hadoop user at the master node can log in to other nodes in key-based authentication to start additional processes such as starting a process and performing monitoring.

[root @ master ~] # su - hadoop

[hadoop @ master ~] $ ssh-keygen -t rsa -P ''

[hadoop @ master ~] $ ssh-copy-id -i .ssh / id_rsa.pub hadoop@datanode.flyence.tk

[hadoop @ master ~] $ ssh-copy-id -i .ssh / id_rsa.pub hadoop@snn.flyence.tk

Two. Install JDK

3 host must be installed, the following steps to be repeated three times

[Root @ master ~] # rpm -ivh jdk-7u9-linux-i586.rpm

Edit /etc/profile.d/java.sh, add the following in the file:

export PATH = / usr / java / latest / bin: $ PATH

Switch to hadoop user, and execute the following command to test jdk environment configuration is ready

[hadoop @ master ~] $ java-version

java version "1.7.0_09"

Java (TM) SE Runtime Environment (build 1.7.0_09-b05)

Java HotSpot ™ Client VM (build 23.5-b02, mixed mode, sharing)

Third, install Hadoop

Hadoop is installed on every node in the cluster.

[Root @ master ~] # rpm -ivh hadoop-1.2.1-1.i386.rpm

Switch to the hadoop user and verify that Hadoop installation is complete

[hadoop @ master ~] $ hadoop version

Hadoop 1.2.1

Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152

Compiled by mattf on Mon Jul 22 15:17:22 PDT 2013

From source with checksum 6923c86528809c4e7e6f493b6b413a9a

This command was run using /usr/share/hadoop/hadoop-core-1.2.1.jar

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.