[Linux]ubuntu Installation of Hadoop (standalone version)

Source: Internet
Author: User
Tags xsl

Ubuntu version 12.04.3 64-bit

Hadoop is run on a Java virtual machine, so you'll need to install the Jdk,jdk installation configuration method to install it under another blog post ubuntu12.04 jdk1.7

SOURCE Package Preparation:

I downloaded the hadoop-1.2.1.tar.gz, this version is relatively stable, can be provided to the official website of the image http://www.apache.org/dyn/closer.cgi/hadoop/common/

1. Create a Hadoop Administrator account

Execute the following command line directly at the terminal:

1 sudo adduser Hadoop

Then ask you to set the Hadoop account password, this command is to add a standard account called Hadoop, we need an administrator account

You can modify the Hadoop permissions directly under the graphical interface, click on the top right corner of the head, the list appears, click on "User Account", unlock, and then change to administrator rights

2. Installing the SSH Service

SSH can realize remote login and management, details please google Baidu

Ubuntu does not have the default SSH service installed, if you link ubuntu via SSH, you need to manually install Ssh-server. Command line:

1 sudo apt-get install SSH openssh-server

3, SSH no password Authentication login

To create the Ssh-key, here we take the RSA method, the command line is as follows:

1 ssh-keygen-t rsa-p ""

A graphic appears, the graphic is the password, do not care about it

1 Cat ~/.ssh/id_rsa.pub >> Authorized_keys

You can then login without password verification, as follows:

1 ssh localhost

Exit command behavior:

Exit

4. Extract the Hadoop source package

Access the Hadoop source package directory under the terminal, copy the Hadoop source package to/home/hadoop using the copy command

1 CP Hadoop-1.2.1.tar.gz/home/hadoop

Then unzip the command line as follows

TAR-XZVF *.tag.gz

5, configure the Hadoop-env.sh,core-site.xml,mapred-site.xml,hdfs-site.xml under hadoop/conf of Hadoop

Configure hadoop-1.2.1/conf/hadoop-env.sh, command line:

1 gedit/home/hadoop/hadoop-1.2.1/conf/hadoop-env.sh

CTRL + F search to Java_home

Remove the previous #, plus the system JDK path, save exit

Configure Hadoop-1.2.1/conf/core-site.xml, command line:

Gedit/home/hadoop/hadoop-1.2.1/conf/core-site.xml

Create a new hadoop_tmp directory in Hadoop because of http://blog.csdn.net/bychjzh/article/details/7830508

Add the following <configuration> </configuration> to enter, save exit

<?xml version= "1.0"? ><?xml-stylesheet type= "text/xsl" href= "configuration.xsl"?><!--Put Site-specific property overrides the this file. --><configuration>        <property>            <name>fs.default.name</name>            <value >hdfs://localhost:9000</value>        </property>    <property>          <name> hadoop.tmp.dir</name>          <value>/home/hadoop/hadoop-1.2.1/hadoop_tmp</value>         < Description>a base for other temporary directories.</description>    </property></configuration >

Configure Hadoop-1.2.1/conf/mapre-site.xml, command line:

1 gedit/home/hadoop/hadoop-1.2.1/conf/mapre-site.xml.xml

Add the following <configuration> </configuration> to enter, save exit

<?xml version= "1.0"? ><?xml-stylesheet type= "text/xsl" href= "configuration.xsl"?><!--Put Site-specific property overrides the this file. --><configuration>    <property>        <name>mapred.job.tracker</name>        <value >localhost:9001</value>    </property></configuration>

Configure Hadoop-1.2.1/conf/hdfs-site.xml, command line:

1 gedit/home/hadoop/hadoop-1.2.1/conf/hdfs-site.xml

Add the following <configuration> </configuration> to enter, save exit

<?xml version= "1.0"? ><?xml-stylesheet type= "text/xsl" href= "configuration.xsl"?><!--Put Site-specific property overrides the this file. --><configuration>    <property>        <name>dfs.replication</name>        <value >1</value>    </property></configuration>

At this point, the installation configuration for Hadoop is complete, and later the first operation of Hadoop

6. Format HDFs File system

Enter hadoop-1.2.1

/bin/hadoop Namenode-format

When you see it,

Congratulations, HDSF. File System format succeeded

7. Start the Hadoop service

/bin/start-all.sh

The following screen appears

JPs

JPS is a Java thread that looks at the Java Virtual machine running

Then the following screen appears

Regardless of JPS, there are five Hadoop-related threads, congratulations, Hadoop installation configuration is successful and functioning properly.

You can then exit Hadoop. , then start again later, import the data

The above for personal installation experience, write this tutorial written for two hours, than I install is also time-consuming, not easy ah, this is also for the future to see, write out is really learned.

[Linux]ubuntu Installation of Hadoop (standalone version)

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.