Install the hadoop development environment in Windows

Source: Internet
Author: User
Tags win32 error
Install the hadoop development environment in Windows

Preparation:

1. Eclipse

2. Java 6 +

3. cygwin

4. hadoop

1. Install cygwin

Download http://cygwin.com/setup.exeand open the exefile,

Run the installer.
1. The cygwin welcome screen is displayed.
2. Click Next to go to the next screen and select the installation type to be executed.
3. Click Install from Internet.
4. Click Next and select an installation directory.
5. Make sure to select the "OpenSSH" installation package during installation. For example:


Use the Start Menu or double-click the cygwin icon (if you have added these shortcuts) to start cygwin. You can also execute the cygwin script in the cygwin directory (for example, c: \ cygwin. BAT ).

I encountered some problems during the installation. Just reinstall it as per this article.

Http://wenku.baidu.com/view/45409fc289eb172ded63b775.html

2. Install the SSH daemon thread

SSH is required for hadoop connection

A. Open the cygwin command environment (run as Administrator)

B. Execute the following command
Dell @ Dell-PC $ chmod + R/etc/group
Dell @ Dell-PC $ chmod + R/etc/passwd
Dell @ Dell-PC $ chmod + rwx/var
Dell @ Dell-PC $ ssh-host-config

* ** Query: overwrite existing/etc/ssh_config file? (Yes/No) Yes
* ** Info: Creating default/etc/ssh_config File
* ** Query: overwrite existing/etc/sshd_config file? (Yes/No) Yes
* ** Info: Creating default/etc/sshd_config file
* ** Info: Privilege Separation is set to yes by default since OpenSSH 3.3.
* ** Info: However, this requires a non-privileged account called 'sshd '.
* ** Info: for more info on Privilege Separation read/usr/share/doc/OpenSSH/read
* ** Query: Should Privilege Separation be used? (Yes/No) No
* ** Info: updating/etc/sshd_config file

* ** Query: Do you want to install sshd as a service?
* ** Query: (say "no" if it is already installed as a Service) (Yes/No) Yes
* ** Query: Enter the value of cygwin for the daemon: [] cyg_ssh
* ** Info: on Windows Server 2003, Windows Vista, and above,
* ** Info: system account cannot setuid to other users -- a capability
* ** Info: sshd requires. You need to have or to create a privileged
* ** Info: account. This script will help you do so.

* ** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
* ** Info: or later. On these systems, it's not possible to use the LocalSystem
* ** Info: account for services that can change the user ID without
* ** Info: explicit password (such as passwordless logins [e.g. Public Key
* ** Info: authentication] via sshd ).

* ** Info: If you want to enable that functionality, it's required to create
* ** Info: a new account with special privileges (unless a similar account
* ** Info: already exists). This account is then used to run these special
* ** Info: servers.

* ** Info: note that creating a new user requires that the current account
* ** Info: have administrator privileges itself.

* ** Info: no privileged account cocould be found.

* ** Info: This script plans to use 'cyg _ Server '.
* ** Info: 'cyg _ Server' will only be used by registered services.
* ** Query: Do you want to use a different name? (Yes/No) No
* ** Query: Create new privileged user account 'cyg _ Server '? (Yes/No) Yes
* ** Info: Please enter a password for new user cyg_server. Please be sure
* ** Info: that this password matches the password rules given on your system.
* ** Info: entering no password will exit the configuration.
* ** Query: Please enter the password:
* ** Query: reenter:

* ** Info: User 'cyg _ Server' has been created with password '1qaz2wsx '.
* ** Info: If you change the password, please remember also to change
* ** Info: password for the installed services which use (or will soon use)
* ** Info: The 'cyg _ Server' account.

* ** Info: Also keep in mind that the user 'cyg _ Server' needs Read Permissions
* ** Info: on all users 'relevant files for the services running as 'cyg _ Server '.
* ** Info: In particle, for the sshd server All Users '. Ssh/authorized_keys
* ** Info: Files must have appropriate permissions to allow public key
* ** Info: authentication. (re-) running SSH-user-config for each user will set
* ** Info: these permissions correctly. [similar restrictions apply,
* ** Info: instance, for. rhosts files if the rshd server is running, etc].

* ** Info: the sshd service has been installed under the 'cyg _ Server'
* ** Info: account. to start the service now, call 'net start sshd' or
* ** Info: 'cygrunsrv-s sshd'. Otherwise, it will start automatically
* ** Info: after the next reboot.

* ** Info: Host Configuration finished. Have fun!

D. An error occurred while running Net start sshd.

Cygrunsrv: Error starting a service: queryservicestatus: Win32 error 1062:
The service has not been started.

Probably the permission settings for/var/log are incorrect. Run mkpasswd and mkgroup to regenerate the permission information, delete the sshd service, and reconfigure it:

$ Mkpasswd-L>/etc/passwd
$ Mkgroup-L>/etc/group
$ Cygrunsrv-r sshd
$ Ssh-host-config-y
$ Cygrunsrv-s sshd

Then we found that the instance was started normally.


Next, install hadoop.

Http://blog.csdn.net/savechina/article/details/5656937

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.