(A) building of the development environment configuration Hadoop development environment - JavaJDK configuration (with the installation package)

Install the JDK

We first create a jdk folder, and then copy the downloaded archive to jdk JDK folder {installation package: https://pan.baidu.com/s/1e7aIRRBvw9ujrH74680W7gextraction code: 9dqm}
State
then decompressed jdk installation package

tar -zxvf jdk-7u45-linux-x64.tar.gz 


Hadoop create a new folder, unzip the file jdk folder to folder hadoop

mv jdk1.7.0_45/ /usr/hadoop1

Here Insert Picture Description

Configuration environment variable

After unpacking the JDK also you need to configure the environment variable JDK, before you can use, the next step to configure the JDK.

Enter the command: vim /etc/profileedit the configuration file;

In the end of the file enter the following code (no space):

JAVA_HOME=/usr/hadoop/jdk1.7.0_45   #这里是跟的是jdk安装路径,注意版本号的正确书写
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH

Then, save and exit.

Finally: source /etc/profilethe just configuration to take effect.

Finally, we can test whether the configuration environment variable.

Enter: java -versionthe following interface represents the configuration is successful.
Here Insert Picture Description

Released three original articles · won praise 0 · Views 191

Guess you like

Origin blog.csdn.net/weixin_45873289/article/details/104945583