Linux to build the Hadoop environment step sharing _linux

Source: Internet
Author: User

1, download the Hadoop package
wget http://apache.freelamp.com/hadoop/core/stable/hadoop-0.20.2.tar.gz
2, Tar Xvzf hadoop-0.20.2.tar.gz
3, install JDK, download JDK directly from Oracle website, address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
4, chmod +x jdk-6u21-linux-i586.bin; /jdk-6u21-linux-i586.bin, the jdk1.6.0_21 directory appears in the current directory
5. Configure Java environment variable Vi/etc/profile

Copy Code code as follows:

Export java_home=/root/src/hadoop/jdk1.6.0_21
Export classpath= $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib
Export path= $PATH: $JAVA _home/bin

Execute source/etc/profile under terminal to make configuration effective

6, you can use the following command to view
Show Java version java-vesion

Copy Code code as follows:

Echo $JAVA _home
which Java
Echo $PATH
Echo $CLASSPATH

If Java-version does not display your JDK version, please check your path settings.

7. Configure Hadoop environment variable Vi/etc/profile

Copy Code code as follows:

Export hadoop_install=/root/src/hadoop/hadoop-0.20.2
Export path= $PATH: $HADOOP _install/bin

Source/etc/profile the configuration to take effect

8. Test environment
Hadoop version Display
Hadoop 0.20.2
Subversion Https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-r 911707
Compiled by chrisdo on Fri Feb 08:07:34 UTC 2010

9, configuration
Hadoop each component uses an XML file configuration, the core attributes in Core-site.xml, the HDFs attribute in Hdfs-site.xml, and the MapReduce attribute in Mapred-site.xml. These files are in the Conf subdirectory.
Hadoop has three kinds of local mode, pseudo distribution mode and full distribution mode, default configuration is local mode, no daemon, everything is running on a single JVM.

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.