As a result of the project, I installed several virtual machine Windows Server R2 on VMware, and I wanted to build a Hadoop cluster. Just getting started with Hadoop, confused, and then began to search various tutorials, the first is to choose Cygwin to install, but then, then a bunch of problems, and then give up. Finally choose to install the configuration of Hadoop directly on Windows Server R2, here is very grateful to Bo Friends Tutorial, the address is 52067441, basically follow this tutorial, the main point I stepped on the pit bar.
The whole process is:
JDK installation and environment variable configuration (this tutorial is a lot of self-search)
Download hadoop2.5.2.tar.gz and unzip, configure the Hadoop environment variables, modify the Hadoop configuration file, I put it directly in the C directory, that is C:\hadoop-2.5.2
Its file directory is
Download the Hadooponwindows-master.zip and unzip and replace the bin directory with the bin directory in the original Hadoop directory.
Run the environment: run cmd, window up to C:\hadoop-2.5.2\bin, execute "hdfs namenode-format" command, here began to error,
Associated with Hdfs-site.xml file, exception: Byte 2 of the 2 byte UTF-8 sequence is invalid
<?xml version= "1.0" encoding= "UTF-8"?>
Change the UTF-8 directly to UTF8, i.e.
<?xml version= "1.0" encoding= "UTF8"?>
Re-run CMD, the last format generated by the logs directory of files and files generated in the workplace directory is deleted, note that only the files in the directory is deleted, do not delete the file directory. Window up to C:\hadoop-2.5.2\bin, execute "hdfs namenode-format" command, not error
CMD window to Sbin, execute "start-all.cmd" command, pop up the following four windows,
Immediately following the Sbin, execute the "JPS" command, resulting in:
In this step, the Hadoop service is built.
Follow the above-mentioned Bo friends tutorial to upload tests, operate HDFS, note that in the state of the Hadoop service is turned on, and then open another CMD window, do the following:
First create the input directory:
Upload data to directory:
Then view the file:
Windows platform installs and configures Hadoop (without Cygwin)