Hadoop on Mac OS Practice 1: Standalone Configuration

Source: Internet
Author: User

Statement: For hadoop-related information, please refer to the official documentation and select different versions as needed:

Current version, http://hadoop.apache.org/docs/current/

Version list, http://hadoop.apache.org/docs/

This article uses hadoop version 0.20.2 and Mac OS X 10.7.5.

0. Download hadoop

Https://archive.apache.org/dist/hadoop/core/hadoop-0.20.2/

1. Java environment setup:

Omitted

2. Decompress hadoop:

$ Tar xvzf hadoop-0.20.2.tar.gz

3. $ Vim hadoop-0.20.2/CONF/hadoop-env.sh, configure java_home:

Add "Export java_home =/system/library/Java/javavirtualmachines/1.6.0.jdk/contents/home" in double quotation marks"

4. Modify the environment variables for hadoop. (1) and (2) select one:

(1) Global modification:

$ Vim/etc/paths

Add the section in double quotes, "/users/waterforest/hadoop/hadoop-0.20.2/bin"

(2) User modification:

$ Vim ~ /. Profile

Add the section in double quotes, "Export Path = $ path:/users/waterforest/hadoop/hadoop-0.20.2/bin"

Test 1:

$ Hadoop version

If you see the following content, the configuration is successful:

Hadoop 0.20.2Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707Compiled by chrisdo on Fri Feb 19 08:07:34 UTC 2010
Test 2:

$ Hadoop-0.20.2 CD

$ Mkdir Input

$ Cp conf/*. xml Input

$ Hadoop jar hadoop-*-examples. Jar grep input output 'dfs [A-Z.] +'

$ Cat output /*

If the following information is displayed, the configuration is successful:

1dfsadmin

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.