First, install the JDK
1. Download path: http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Install to C:\Java\jdk1.8.0_121(do not install to the directory path with spaces, so Hadoop will not be found when looking for java_home)
Second, configure the Java environment variables
1,java_home : C:\Java\jdk1.8.0_121
2,CLASSPATH : .; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;
3,path : Add %java_home%\bin;%java_home%\jre\bin; to the front.
4, Test : open command line cmd, enter the following command under any path, return the result is configured correctly
Command:java-version
Return: Java Version "1.8.0_121"
Java (TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot (TM) 64-bit Server VM (build 25.121-b13, Mixed mode)
Command:javac-version
return: Javac 1.8.0_121
Third, download Hadoop
1. Download path: http://hadoop.apache.org/releases.html
2, extract to D:\wyw\ Big Data \hadoop-2.3
Third, configure the Hadoop environment variables
1,hadoop_home : D:\wyw\ Big Data \hadoop-2.3
2,path : Add %hadoop_home%\bin;
3, test: Open command line cmd, enter the Hadoop command under any path, return the result is configured correctly
Note: If you are prompted that the Java_home path is not correct, modify the set java_home=%java_home% under%hadoop_home%\etc\hadoop\hadoop-env.cmd.
Transferred from: http://blog.csdn.net/wuyuanwei123/article/details/76870442
Special tribute to the author
environment variable configuration for Hadoop under Windows