Data EngineeringBig DataHadoop

Hadoop Setup in Windows

Quick guide to installing Hadoop on Windows with Cygwin, including Java configuration and verification steps.

5 October 2011 · 1 min read

This post explains quickly how to install Hadoop on Windows for development. I used Windows XP, but you can follow the same steps to configure a standalone setup for Hadoop.

  1. Download the latest stable release from the Hadoop website.
  2. If you are on Windows you also need Cygwin — download it from its website and choose to install the openssh and rsync packages. (When you download Hadoop, the file /src/core/overview.html lists the required software.)
  3. Add the following to your Windows PATH variable: ;c:\cygwin\bin;c:\cygwin\usr\bin
  4. Copy the Hadoop zip file to /usr/local directory. Rename the hadoop.x.x folder to a simple name such as hadoop.
  5. To make the JAVA_HOME setup easy, I copied Java directly into usr/local/lib/jdk1.7.0.
  6. Open the file conf/hadoop-env.sh and set the JAVA_HOME variable:
# The java implementation to use. Required.
export JAVA_HOME=/usr/local/lib/jdk1.7.0

If you are copying Java to the default Windows path like C:\Program Files\Java, you need to escape the space with \.

  1. To test that the configuration has been done properly, run the following on the Cygwin command prompt:
cd /usr/local/hadoop
bin/hadoop version

It should show output like:

Hadoop 0.20.203.0
Subversion http://svn.apache.org/...
Compiled by XXX on XXX

If you see this, the setup is complete.