下载此文档

Hadoop集群配置.docx


文档分类:IT计算机 | 页数:约21页 举报非法文档有奖
1/21
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/21 下载此文档
文档列表 文档介绍
Hadoop集群配置
准备工作
配置主机名
修改每台服务器上的/etc/hosts文件,添加主机名配置。
master
slave1
slave2
slave3
安装JDK
创建运行Hadoop程序的用户
在系统中添加运行Hadoop程序的用户hadoop,并修改其登录密码为hadoop。
[******@bgu0004 ~]# useradd hadoop
[******@bgu0004 ~]# passwd hadoop
Changing password for user hadoop.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated essfully.
配置SSH无密钥验证配置
为了实现无口令SSH登录,需要在主机上配置公私密钥方式登录。此时需要通过root帐号登录,修改每个主机上的/etc/ssh/sshd_config文件,去掉RSAAuthentication yes和PubkeyAuthentication yes前面的“#”。
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
,在每台主机上运行ssh-keygen -t rsa命令生成本地的公私密钥对。
[******@bgu0001 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hadoop/.ssh/id_rsa):
Created directory '/home/hadoop/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/hadoop/.ssh/id_rsa.
Your public key has been saved in /home/hadoop/.ssh/.
The key fingerprint is:
2f:da:4d:f3:00:e2:c3:87:19:b0:50:fe:43:47:08:a7 ******@bgu0001
同样的过程需要在3台slave主机上执行。然后通过scp命令将3台slave主机的公钥拷贝到master主机上。
[******@bgu0002 ~]$ scp .ssh/ master:/home/hadoop/.ssh/
The authenticity of host 'master ()' can't be established.
RSA key fingerprint is 72:cd:14:f2:a2:d1:f0:e3:9e:a0:db:93:e7:5e:68:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'master,' (RSA) to the list of known hosts.
******@master's password:
100% 396 00:00
:
[******@bgu0001 ~]$ cd .ssh/
[******@bgu0001 .ssh]$ ls
id_rsa
,是用户hadoop在master主机上的公钥;、。
[******@bgu0001 .ssh]$ cat

Hadoop集群配置 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数21
  • 收藏数0 收藏
  • 顶次数0
  • 上传人1136365664
  • 文件大小81 KB
  • 时间2017-11-30