Installation JDK for Hadoop Big Data

Source: Internet
Author: User
Tags save file

※ Note: The JDK can be as long as the 1.5 version

Download good JDK files

I'm using: Jdk-6u34-linux-i586.bin.

1, first use root permissions in the OPT directory to create a new tools directory

Under Ubuntu, first set the password for the root user

Command mode directly with Su, and then enter the password on it, like Ubuntu if you have not set a password for root, you can use the first user (it is the default permission to use the sudo command) to set the password, command: sudo passwd root

To create a directory:

[Email protected]:/opt$ su//switch to root user to create directory
Password://Enter root password, password not visible
[Email protected]:/opt# mkdir Tools//Create Directory

Drag the Jdk-6u34-linux-i586.bin from the host to the virtual machine desktop before copying into the tools directory

[Email protected]:/opt# sudo cp/home/ubuntu-2/desktop/jdk-6u34-linux-i586.bin/opt/tools

Enter the/opt/tools directory, assign permissions to the file,

[Email protected]:/opt# cd/opt/tools
[Email protected]:/opt/tools# chmod u+x Jdk-6u34-linux-i586.bin

Execute the following command, and after execution completes, the JDK folder will be generated in the/opt/tools directory

./jdk-6u34-linux-i586.bin

To configure the JDK environment command:

[Email protected]:/opt/tools# sudo gedit/etc/profile

To enter the profile file, change the file:

Export java_home=/opt/tools/jdk1.6.0_34
Export Jre_home= $JAVA _home/jre
Export classpath= $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $JRE _home/bin: $PATH

Save file, close

Execute the following command to make the configuration file effective:

[Email protected]:/opt/tools# source/etc/profile

Or:

. /etc/profile

Create a new command-line window to see if the installation configuration was successful

Tip: If what appears, you will need to choose to install the JDK, which means that Javac found more than one, not sure which

Resolution: Execute

[Email protected]:/home/ubuntu-2# apt-get Install OPENJDK-6-JDK

Explanatory notes

    • sudo apt-get install package

At this point, congratulations, JDK installation succeeded

※ Note that the above commands are best done under the root user

Installation JDK for Hadoop Big Data

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.