设为首页 收藏本站
查看: 799|回复: 0

[经验分享] 基于cygwin的Hadoop Windows环境搭建

[复制链接]

尚未签到

发表于 2016-5-20 12:13:54 | 显示全部楼层 |阅读模式
  在装完cygwin后我们一般将它添加到win7系统环境变量PATH中:
  D:\cygwin\bin;D:\cygwin\usr\sbin;
  
  在cygwin中开启停用删除服务的命令:
  开启服务: $ net start 服务名
  停止服务: $ net stop 服务名
  删除服务: $ cygrunsrv -R 服务名
  
  cygwin自带的命令:
  检查所有安装的软件的版本号: $ cygcheck -c
检查当前Cygwin的版本号: $ cygcheck -c cygwin
  
  cygwin编译搭建hadoop环境需要安装的软件包:
  1.openssh
2.openssl
3.sed
4.zlib
4.tcp_wrappers
5.diffutils
6.vim
7.subversion
  8.mpfr(版本4)
  
  cygwin没有自动卸载功能,需要手动操作3个步骤如下:
  1.停止服务: $ net stop 服务名
  2.删除服务: $ cygrunsrv -R 服务名
  3.删除cygwin文件
  
  然后如下进行操作(因为是重新安装,与第一次安装稍有区别)

Administrator@RD-2013-03-25-02 ~
$ 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                                                                                                                           ME.privsep.
*** 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: [] netsec
*** 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 use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) yes
*** Query: Enter the new user name: Administrator
*** Query: Reenter: Administrator
*** Warning: Privileged account 'Administrator' was specified,
*** Warning: but it does not have the necessary privileges.
*** Warning: Continuing, but will probably use a different account.
*** Warning: The specified account 'Administrator' does not have the
*** Warning: required permissions or group memberships. This may
*** Warning: cause problems if not corrected; continuing...
*** Query: Please enter the password for user 'Administrator':
*** Query: Reenter:

*** Info: The sshd service has been installed under the 'Administrator'
*** 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!

  
  

Administrator@RD-2013-03-25-02 ~
$ net start sshd
CYGWIN sshd 服务正在启动 .
CYGWIN sshd 服务已经启动成功
  接下来是配置无密码登陆:
  
  

Administrator@RD-2013-03-25-02 ~
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sony/.ssh/id_rsa):回车
Created directory '/home/Administrator/.ssh'.
Enter passphrase (empty for no passphrase):回车
Enter same passphrase again:回车
Your identification has been saved in /home/Administrator/.ssh/id_rsa.
Your public key has been saved in /home/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
e8:38:5e:e3:bb:cf:76:03:61:5f:f2:68:ed:a3:49:db Administrator@RD-2013-03-25-02
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|       .o . .    |
|      ..So *     |
|     o  . + o    |
|    o +  o..     |
|   . + o..o+o    |
|    . +=o.+oE.   |
+-----------------+
Administrator@RD-2013-03-25-02 ~
$ cd .ssh/
Administrator@RD-2013-03-25-02 ~/.ssh
$ ls
id_rsa  id_rsa.pub
Administrator@RD-2013-03-25-02 ~/.ssh
$ cp id_rsa.pub authorized_keys
Administrator@RD-2013-03-25-02 ~/.ssh
$ ls
authorized_keys  id_rsa  id_rsa.pub
  
  
  验证如下:
  

Administrator@RD-2013-03-25-02 ~/.ssh
$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is 5f:21:b1:24:80:92:f6:af:3e:e3:a8:f9:cb:a4:4f:ec.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Administrator@RD-2013-03-25-02 ~/.ssh
$ who
admin    tty0         2011-11-25 15:42 (::1)
  
  
  
  
  
  
  
  
  
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-219593-1-1.html 上篇帖子: Windows变慢原因分析及解决方法 下篇帖子: 如何在windows NT 下安装jboss为服务?(How to install jboss as Windows
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表