Windows platform installs and configures Hadoop (without Cygwin)

Source: Internet
Author: User

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)

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.