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