在windows平台上部署伪分布式系统开发hadoop程序

大数据开发框架一般在linux系统上操作,但是Linux操作系统需要安装虚拟机等原因,很多人选择在windows平台上通过cygwin来虚拟linux系统
下面讲一下如何通过cygwin来虚拟linux系统
1:软件工具:cygwin putty jdk eclipse hadoop
首先安装jdk,到www.oracle.com网站下载自己电脑平台的jdk安装包。双击可执行文件,安装。
将jdk安装路径下的bin(可执行文件,命令java,javac)文件夹对应的 位置配置到环境 变量中,如果要执行某命令,可以将其bin文件加载到path中。
2 安装cygwin
安装cygwin过程中,将openssl,openssh包下载安装。
管理员权限运行cygwin,
开启ssh服务
admin@admin-PC ~
$ ssh-host-config

* Info: Generating missing SSH host keys
* Query: Overwrite existing /etc/ssh_config file? (yes/no) no
* Query: Overwrite existing /etc/sshd_config file? (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: [ntsec] ntsec 填入ntsec
* 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: 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) no
* Query: Create new privileged user account ‘ADMIN-PC\cyg_server’ (Cygwin name: ‘cyg_server’)? (yes/no) yes
* Info: Please enter a password for new user cyg_server. Please be sure
* Info: Entering no password will exit the configuration.
* Query: Please enter the password: 输入密码
* Query: Reenter: 再次输入密码

* Info: User ‘cyg_server’ has been created with password ‘xxxx’.
* Info: If you change the password, please remember also to change the
* Info: password for the installed services which use (or will soon use)
* Info: the ‘cyg_server’ account. //创建用户
* Info: Host configuration finished. Have fun! //安装成功

3为cygwin配置免秘钥登录
admin@admin-PC /

$ ssh-keygen -t rsa -P ” -f ~/.ssh/id_rsa

Generating public/private rsa key pair. //生成公钥私钥对
Your identification has been saved in /home/admin/.ssh/id_rsa. 私钥
Your public key has been saved in /home/admin/.ssh/id_rsa.pub. 公钥
The key fingerprint is:
SHA256:8lYCTGO+RcxsUW3KayKmp3FbRYNb7iG1yGeqHNoO4mo admin@admin-PC
The key’s randomart image is:
+—[RSA 2048]—-+
| ++oo.. |
| = o=. o |
| +.o.=o |
| = Boo |
| o S O. |
| oo.Xo. |
| . ooo.=o. |
| E ..B.* |
|o.. o+* |
+—-[SHA256]—–+

admin@admin-PC /
$

admin@admin-PC ~
重启:

admin@admin-PC ~
$ ssh localhost
The authenticity of host ‘localhost (::1)’ can’t be established.
ECDSA key fingerprint is SHA256:7eE4P+QcQtOu0MHPn3Nw9nHVWyUuGf3GOTQynHwbnzc.
Are you sure you want to continue connecting (yes/no)? yes 第一次启动需要确认yes
Warning: Permanently added ‘localhost’ (ECDSA) to the list of known hosts.
admin@localhost’s password: 输入密码,登录ssh

4,安装qutty,
双击可执行文件,输入主机名(localhost)或ip地址
login as :输入用户名(admin)

admin@admin-PC ~
$
用putty连接ssh
login as: admin
admin@localhost’s password:
Last login: Mon Feb 20 09:35:44 2017 from ::1
这里写图片描述

5,安装hadoop
我们需要改四个配置文件hadoop-env.sh;core-site.xml;hdfs- site.xml;mapred-site.xml;
下载hadoop,通过cygwin 进入到hadoop/bin目录下,
输入./start-all.sh 开启节点。

6,安装eclipse,
将hadoop部署到eclipse上。
将下载的hadoop-eclipse-plugin-2.2.0.jar文件放到Eclipse的plugins 目录下,重启Eclipse即可看到该插件已生效。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值