1, installation Cygwin
To download Cygwin Setup.exe from http://www.cygwin.com/, double-click Run:
Select Install from the Internet:
To set the installation directory:
To set the installation package directory:
To set up "Internet Connection", select "Direct Connection":
Select a download site:
After "Next", the "Setup Alert" dialog box may pop up, directly "OK" to
In the Select Packages dialog box, you must ensure that "OpenSSL" under "Net Category" is installed:
If you also want to compile Hadoop on eclipse, you must also install sed under Base Category:
Subversion recommended for "Devel Category" Installation:
Download and install:
When the download is complete, it will automatically go to the "Setup" dialog box:
In the dialog box shown, select "Create icon on desktop" to make it easy to launch directly from the desktop
Cygwin, then click the "Finish" button. At this point, Cgywin has been installed.
2. Configure Environment variables
Environment variables that need to be configured include path and Java_home: The bin directory of the JDK, the bin directory of the Cygwin
and Cygwin Usr\bin (sbin) directories are added to the PATH environment variable; java_home points to the JRE installation directory.
3. Running Hadoop cluster on Windows system, pseudo distributed mode installation step:
① start Cygwin, unzip the Hadoop installation package. With Cygdrive (located in the Cygwin root directory), you can map directly to individual logical disk partitions under Windows. For example, if the Hadoop installation package is placed under partition d:\, the extracted command is $ tar-zxvf/cygdrive/d/hadoop-0.20.2.tar.gz and can be viewed using the LS command after decompression, such as:
The default decompression directory is the user root directory, which is D:\cygwin\home\lsq (user account).
② Edit the conf/hadoop-env.sh file, set the Java_home variable to the Java installation directory. For example, Java is installed in the directory C:\Program files\java\jdk1.6.0_13, if the path is not a space, directly configured. If there are spaces, you need to abbreviate program files into progra_1, such as:
③ Edit the Core-site.xml, Mapred-site.xml, and Hdfs-site.xml files in the Conf directory in turn, such as:
④ installation configuration ssh
Click on the Cygwin icon on the desktop, start Cygwin, execute the ssh-host-config command, and press the Select input:
When you are prompted do want to use a different name? Enter Yes, this step is to configure the installed sshd service, to which user login, the default is cyg_server this user, here does not create a cyg_server this user in advance, With the current local users of the super tube: Chenx, follow the prompts, 2 times Enter the password for this account
The host configuration finished appears. Have fun! General installation completed successfully. Such as:
Enter the command $ net start sshd to start ssh, such as:
Note: After the SSHD service is installed, will not start by default, if the startup report login failed, can not be started, in the Service Properties-log on window manually modified, in the above process, Cygwin will not verify the password is correct, should just check the 2 times the input is consistent, and then manually start. Do not know why, sshd service if you choose the Local System login method, subsequent problems, so the SSHD service is best set as the current logged on user.
⑤ Configuring SSH Login
Execute the Ssh-keygen command to generate the key file
Enter the following command:
CD ~/.ssh
Ls-l
Cat Id_rsa.pub >> Authorized_keys
After you do this, the exit command exits the Cygwin window, and if you do not do this, the following operation may encounter an error. Next, rerun the Cygwin, execute the ssh localhost command, when the first time ssh localhost, there will be "is you sure your want to continue connection<yes/no>?" Prompt, enter Yes, and then enter. When prompted, complete the step successfully:
⑥hadoop Run
Formatting Namenode
Open the Cygwin window and enter the following command:
CD hadoop-0.20.2
mkdir logs
Bin/hadoop Namenode–format
Start Hadoop
In Cygwin, enter the bin directory of Hadoop,
Run./start-all.sh start Hadoop;
Can execute./hadoop fs-ls/command to view the root directory of Hadoop;
Can perform JPS to view related processes;
such as: (if displayed and similar, General Hadoop installation/Startup success)
Transferred from: http://my.oschina.net/u/570654/blog/112757
Installing Hadoop in Windows systems