失效链接处理 |
Hadoop集群搭建 PDF 下载
本站整理下载:
相关截图:
主要内容:
1. 机器分配情况
2. 创建三个虚拟机
2cpu 2G CentOS7
修改成静态IP
IPADDR=192.168.201.135
NETMASK=255.255.255.0
DNS1=192.168.201.2
BOOTPROTO="static"
修改主机名
/etc/hostname hadoop002
创建用户
hadoop
添加密码
在 /opt/创建 moudle、software并修改 所有者 和 组 为 hadoop
提升权限无需输入密码
/etc/sudoers hadoop ALL=(ALL) NOPASSWD: ALL
3. 修改 hosts 文件
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.201.135 hadoop002
192.168.201.136 hadoop003
192.168.201.137 hadoop004
4. 创建虚拟机的免密登录
先在一台虚拟机上创建 ssh 登录的密钥对
给自己这个服务器赋值 认证使用的公钥
验证 ssh 登录
ssh-keygen -t rsa
# 显示如下
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): # 直接回车
Enter passphrase (empty for no passphrase): # 直接回车
Enter same passphrase again: # 直接回车
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:7JOo87sn8zcnbtAmUv02WYgfbOuDP5Zmq31FolB41b0 root@hadoop001
The key's randomart image is:
+---[RSA 2048]----+
| . ....|
| . o o|
| . = . .|
| .. + = oE.|
| .S. = * o |
| .oo.o O .|
| ..++ + o . |
| ..o ..*.X . |
| .o+B.+oX+= |
+----[SHA256]-----+
ssh-copy-id hadoop002
# 显示信息如下
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed:
"/home/test/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter
out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are
prompted now it is to install the new keys
test@hadoop002's password: # 输入密码
Permission denied, please try again.
test@hadoop002's password: # 再次数据密码
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'hadoop001'"
and check to make sure that only the key(s) you wanted were added.
|