日期:2014-05-16  浏览次数:20844 次

Windows下安装Hadoop开发环境

Windows下安装Hadoop开发环境

准备:

1.Eclipse

2.Java 6+

3.Cygwin

4.Hadoop

1.安装Cygwin

通过链接下载http://cygwin.com/setup.exe,打开exe文件,

运行安装程序。 
1.显示 Cygwin 欢迎屏幕。
2.单击 Next 进入下一个屏幕,选择要执行的安装类型。
3.单击 Install from Internet。
4.单击 Next,然后选择一个安装目录。
5.安装时一定要确认选择“ openssh ”安装包。如下图:


通过使用 Start 菜单或双击 Cygwin 图标(如果添加了这些快捷方式的话),启动 Cygwin;也可以执行 Cygwin 目录中的 Cygwin 脚本(比如 C:\cygwin\Cygwin.bat)。

我在安装中遇到了一些问题,按照这篇文章重新安装了一遍就好了

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

2.安装SSH守护线程

Hadoop连接需要ssh

a.打开 Cygwin 命令环境(以管理员的身份运行)

b.执行以下命令
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, the
*** 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 an
*** 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 could be found.

*** Info: This script plans to us