Hadoop Elephant Tour 005-Install the JDK environment

Source: Internet
Author: User

Hadoop Elephant Safari 005- Installing the JDK environment

sinom

    becauseHadoopneed to run onJAVAplatform, so we also need toCentOSinstalled inJavathe environment, where we chooseJavathe version isJdk-6u45-linux-i586.bin;

1. upload the JDK file to CentOS

securefxportable.exe centos /usr/local folder, will jdk-6u45-linux-i586.bin upload Span style= "Font-family:courier new;font-size:18px;color:black;" >/usr/local


2. Installing the JDK

referring to the method described in the previous section, use the SecureCRTPortable.exe Login CentOS , into the /usr/local directory.


use the command " . / Jdk-6u45-linux-i586.bin " Unzip the installation JDK ,

If you cannot do this, use the command first " chmod 755 jdk-6u45-linux-i586.bin" gives the current user permission to execute the file


after the decompression is complete, we use the command " ls" to see the newly created directory jdk1.6.0_45


use the command " mv jdk1.6.0_45/ jdk" rename the folder name to facilitate reference later


3. Configuring the JDK Environment Variables

Next put JDK configured in the environment variable.

use the command " vi/etc/profile" Edit configuration file


use the shortcut key " i" Enter the file editing mode, the file finally added the following content.

Exportjava_home=/usr/local/jdk

Exportpath=.: $PATH: $JAVA _home/bin

use the shortcut key " ESC" exit file editing mode;

Use the Shift "and": "Combo key into command mode, enter command" Wq "Save and exit.

Here's an explanation: " Export "is a keyword that is used to set environment variables. We set up two environment variables, one is java_home,

one is PATH . For a reference to an environment variable, use"$", a connection between multiple environment variables, using ":".


use the command " Source /etc/profile" makes the above configuration effective immediately

use the command " java –version" detects if the JDK is configured successfully ! See the following tips, congratulations, the configuration is successful ~!~


Hadoop Elephant Tour 005-Install the JDK environment

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.