Hadoop集群(三节点)安装与部署

1.2.1 环境准备
环境由三台服务器组成,分别为目录节点,内容节点,服务器列表如下所示:

表1  主机环境准备

IP

机器名称

10.0.0.201

m1.Hadoop

10.0.0.209

s1.hadoop

10.0.0.211

s2.hadoop

相关阅读:

下面列出各主机配置信息:

主机:m1.hadoop

[hadoop@m1 .ssh]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"

NM_CONTROLLED="yes"

ONBOOT=yes

TYPE=Ethernet

BOOTPROTO=none

IPADDR=10.0.0.201

PREFIX=24

GATEWAY=10.0.0.254

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

name="System eth0"

HWADDR=10:50:56:AF:00:CF

[hadoop@m1 .ssh]$ cat /etc/hosts

10.0.0.201  m1.hadoop

10.0.0.209  s1.hadoop

10.0.0.211  s2.hadoop

127.0.0.1      localhost.localdomain  localhost

 [hadoop@m1 .ssh]$ cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=m1.hadoop

FORWARD_IPV4=yes

 
 

主机:s1.hadoop

[hadoop@s1 .ssh]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"

NM_CONTROLLED="yes"

ONBOOT=yes

HWADDR=10:50:56:AF:00:D4

TYPE=Ethernet

BOOTPROTO=none

IPADDR=10.0.0.209

PREFIX=24

GATEWAY=10.0.0.254

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

name="System eth0"

 [hadoop@s1 .ssh]$ cat /etc/hosts

10.0.0.209  s1.hadoop

10.0.0.201  m1.hadoop

10.0.0.211  s2.hadoop

127.0.0.1  localhost.localdomain    localhost

 [hadoop@s1 .ssh]$ cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=s1.hadoop
 

主机:s2.hadoop

[hadoop@s2 .ssh]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"

NM_CONTROLLED="yes"

ONBOOT=yes

HWADDR=01:50:56:AF:00:D7

TYPE=Ethernet

BOOTPROTO=none

IPADDR=10.0.0.211

PREFIX=24

GATEWAY=10.0.0.254

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

name="System eth0"

 [hadoop@s2 .ssh]$ cat /etc/hosts

10.0.0.211  s2.hadoop

10.0.0.201  m1.hadoop

10.0.0.209  s1.hadoop

127.0.0.1  localhost.localdomain    localhost

[hadoop@s2 .ssh]$ cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=s2.hadoop

相关推荐