在装完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)
相关推荐
win7下Cygwin搭建Hadoop开发环境
在Windows上使用Cygwin作为类Unix支撑环境来安装Hadoop, 网上介绍的还是比较多的。 但是我在安装过程中碰到的一些问题, 没有在任何一个可找到的网页中得到全部解决。 例如,我们一开始选择的是Hadoop 1.0.0版本,...
windows平台下cygwin搭建hadoop,不错的资料欢迎下载
Cygwin+Eclipse搭建Hadoop单机开发环境 cygwin安装后文件备份
内含三个文档,Cygwin+Eclipse搭建Hadoop开发环境、cygwin安装及基本操作方法总结、Hadoop环境搭建及wordcount实例运行,要做这方面工作的人,可以进行参考
Windows下Cygwin环境的Hadoop安装- 在Eclipse中重新编译hadoop的jar包
windows下配置cygwin、hadoop等并运行mapreduce及mapreduce程序讲解
1. JDK 版本"1.7.0_01" 2. Cygwin——在线安装 3. Eclipse SDK 版本3.3.2 4. Hadoop 版本 hadoop-0.20.2 5. windows 7
win7(32位)平台下Cygwin+Eclipse搭建Hadoop单机开发环境 Cygwin(32位)的安装 + ssh的配置 离线安装包
本文档详细介绍了如何在Windows上的Cygwin环境上安装Hadoop的详细过程,网上的很多帖子都是有错误的,我在这里总结并修改的部分错误,希望对大家有帮助。
iphone平台hello示例代码 博文链接:https://canco.iteye.com/blog/199106
在Windows下利用cygwin仿unix环境安装配置Hadoop
Cygwin+Eclipse搭建Hadoop单机开发环境 cygwin安装后文件备份
Cygwin+Eclipse搭建Hadoop单机开发环境 cygwin安装后文件备份
在windows下通过cygwin模拟linux环境,搭建hadoop分布式文件系统,hadoop为0.18.3版本
cygwin安装程序+ndk环境搭建以及opengl在ndk环境中的使用说明
Win10不需要Cygwin搭建大数据测试环境搭建hive的bin文件(包含官方版本中缺少的cmd文件),完美解决windows环境下配置hive时,找不到hive命令问题
使用NDK,在Android开发总调用c++等语言 使用cygwin模拟unix环境以生成so文件