Hadoop集群部署
作者:互联网
集群规划
HDFS需要部署NameNode
和DataNode
YARN需要部署ResourceManager
和NodeManager
假设现在有三台服务器,规划方式如下:
hadoop000 192.168.199.234
NameNode
DataNode
ResourceManager
NodeManager
hadoop001 192.168.199.235
NameNode
DataNode
hadoop002 192.168.199.236
NameNode
DataNode
配置
- 修改hostname(每台都要):
vim /etc/hostname
,将hostname分别改为hadoop000、hadoop001和hadoop002 - 配置hostname和ip的映射关系(每台都要):
vim /etc/hosts
e.g:假设当前机器是hadoop000,则配置如下:192.168.199.234 hadoop000 192.168.199.235 hadoop001 192.168.199.236 hadoop002 192.168.199.234 localhost
前置安装
-
ssh免密登录 (每台都要):
ssh-keygen -t rsa
-
机器间免密登录(只要hadoop000):
ssh-copy-id -i ~/.ssh/id_rsa.pub hadoop000 ssh-copy-id -i ~/.ssh/id_rsa.pub hadoop001 ssh-copy-id -i ~/.ssh/id_rsa.pub hadoop002
第一次执行需要密码,后续就不用输密码了
-
JDK、Hadoop安装(每台都要)
标签:部署,Hadoop,192.168,hadoop000,hadoop001,hadoop002,集群,ssh,id 来源: https://blog.csdn.net/gates0087/article/details/104115380