Hadoop安装-分布式-Fully

〇、所需资料

一、配置

1、基础配置

(1)系统安装

(2)hostname主机名配置

(3)ip地址、dns、hosts映射文件配置

(4)关闭防火墙与selinux

(5)开启ntpd时钟同步

(6)jdk安装与环境变量配置

(7)机器克隆、配置

(8)ssh免密设置

2、部署配置

(1)包含内容

Untitled

(2)hadoop环境变量配置

vi /etc/profile

(3)etc/hadoop下配置-core-site.xml

<configuration>
<property>
    <name>fs.defaultFS</name>
    <value>hdfs://hadoop01:9000</value>
</property>
<property>
    <name>hadoop.tmp.dir</name>
    <value>/var/bigdata/tmp/hadoop/full</value>
</property>
</configuration>

(4)etc/hadoop下配置-hdfs-site.xml

<configuration>
<property>
    <name>dfs.replication</name>
    <value>2</value>
</property>
<property>
    <name>dfs.namenode.name.dir</name>
    <value>/var/bigdata/hadoop/full/dfs/name</value>
</property>
<property>
    <name>dfs.datanode.data.dir</name>
    <value>/var/bigdata/hadoop/full/dfs/data</value>
</property>
<property>
    <name>dfs.namenode.secondary.http-address</name>
    <value>hadoop02:50090</value>
</property>
<property>
    <name>dfs.namenode.checkpoint.dir</name>
    <value>/var/bigdata/hadoop/full/dfs/secondary</value>
</property>
</configuration>

(3)etc/hadoop下配置-slave配置dn

hadoop02
hadoop03

(4)目录分发到其他节点

scp -r ./hadoop/ hadoop02:pwd

二、启动

1、nn格式化

bin/hdfs namenode -format

2、启动dfs

sbin/start-dfs.sh

三、验证

1、nn验证

Untitled

2、dn验证

Untitled

3、页面验证

Untitled

Untitled

Untitled

Untitled