Hadoop Technology Insider-Chapter I preparation before reading the original code

Source: Internet
Author: User
Tags stop script

1.1 Source Code Learning environment

Download of 1.1.1 Basic software

Jdk-http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

ant-http://ant.apache.org/bindownload.cgi

cygwin-http://www.cygwin.com/

eclipse-http://www.eclipse.org/downloads/

1.1.2 Windows environment

D:\hadoop\ including apache-ant-1.9.6, Cygwin, java-jdk1.8.0_65

1.JDK Installation

Double-click the installation package to install the JDK under D:\hadoop\Java\, configure the environment variables Java_home, CLASSPATH, PATH

(1) Environment variables

Http://jingyan.baidu.com/article/d5a880eb6aca7213f047cc6c.html

(2) Configuration Java_home

(3) Configuration Classpath

Variable value:.; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar;

(4) Configure path

Variable Value:%java_home%/bin;%java_home%/jre/bin

After configuration, CMD runs java-version and outputs the following, indicating success.

2.ANT Installation

Double-click the installation package to extract it to D:\hadoop\ and add the environment variable ant_home.

After configuration, type in cmd command mode: Ant-version

There was a problem: unable to locate Tools.jar. Expected to find it in D:\hadoop\Java\lib

Ant_home environment variable has been configured;

Workaround: Copy the Tools.jar file from the "D:\hadoop\Java\jdk1.8.0_65\lib" directory to the "D:\hadoop\Java\lib" directory, rerun command ant, run normally, problem solved.

3.Cygwin installation (Unix-like environment)

(1) Installation Cygwin

(2) Install and start the SSHD service

The Hadoop start/stop script needs to be sent via SSH command to start the relevant daemon and install the SSHD service for this purpose.

Open as an administrator,

Input: Ssh-host-config Follow the prompts to install.

After installation, enter the net start sshd

4.Eclipse Installation

Install directly to D:\hadoop\.

1.1.3 Linux Environment

installation directory structure:

Root/home/dong/eclipse

/usr/lib/apache-ant-1.9.6

/jvm/jdk1.8.0_65

1.JDK Installation and Configuration

Step 1: Install the JDK

(1) Create a new java folder under /usr/lib/

sudo mkdir java

(2) Copy the jdk-8u65-linux-x64.tar.gz on the desktop to the Java folder

sudo scp jdk-8u25-linux-i586.tar.gz/usr/lib/java/

(3) Decompression jdk-8u65-linux-x64.tar.gz

sudo tar xzvf jdk-8u65-linux-x64.tar.gz

Step 2: Configure the JDK

Open ~/.BASHRC file:sudo gedit ~/.bashrc

Input:

Export java_home=/usr/lib/java/jdk1.8.0_25

Export JRE_HOME=/USR/LIB/JAVA/JDK1.8.0_25/JRE

Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH

Export path= $JAVA _home/bin: $JRE _home/bin: $JAVA _home: $PATH

Make ~/.BASHRC effective: source ~/.BASHRC

Check if Java is installed successfully

Input: Java-version

2.Ant and Eclipse installation

(1) Installing and configuring Ant

Steps to work with the JDK

Export ant_home=/usr/lib/apache-ant-1.9.6

Export path= $PATH: $ANT _home/bin

Configuration effective: Source ~./BASHRC

Check if Ant is installed successfully

Input: Ant-version

(2) Installing eclipse

Unzip the package directly to/usr/lib/hadoop/

Hadoop Technology Insider-Chapter I preparation before reading the original code

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.