hadoop基础hdfs集群的安装配置

本文介绍了Hadoop HDFS集群的安装配置步骤,包括准备阶段的软件版本选择、节点间账号免密配置,以及单节点和全部节点的配置过程。通过启动和监控集群,确保安装配置成功。
摘要由CSDN通过智能技术生成

一:准备工作

1、每个节点创建相同的账号:账号名为自己名字的大写,我的时KYJ,清楚对应的ip地址和节点名称。

节点安排如下:

2、每种安装软件的安装版本:

jdk 版本java version "1.8.0_271"

maven 版本Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T03:00:29+08:00)

hadoop 版本hadoop-2.7.6

3、对五台节点的KYJ账号进行相互免密(免密方法可看我的其他文章

二:单节点配置:

在单节点上进行横向配置:

1、解压jdk maven hadoop安装包放在/home/KYJ/soft文件之下

tar zxvf jdk-8u271-linux-x64.tar.gz
tar zxvf hadoop-2.7.6.tar.gz
tar zxvf apache-maven-3.6.1-bin.tar.gz

2、在90节点上的/home/KYJ/soft/hadoop-2.7.6/etc/hadoop目录下配置

(1)core-site.xml

在core-site.xml中加入以下内容L:

<configuration>
<property>
        <name>fs.defaultFS</name>
        <value>hdfs://westgisB090:8020</value>
  </property>
</configuration>

(2)hdfs-site.xml

在hdfs-site.xml中

<configuration>
<property>
        <name>dfs.replication</name>
        <value>3</value>
  </property>
 <property>
       <name>dfs.namenode.name.dir</name>
        <value>/home/KYJ/soft/hdfs/NameNode</value>
  </property>
 <property>
        <name>dfs.datanode.data.dir</name>
         <value>/home/KYJ/soft/hdfs/DataNode</value>
  </property>
</configuration>

(3)hadoop-env.sh

在最后添加export JAVA_HOME=/home/KYJ/soft/jdk1.8.0_271

或者将以下代码加入到其中

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under t
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值