前言
hadoop安装版本为:hadoop-2.7.1。
下载hadoop
Linux终端:wget http://mirrors.cnnic.cn/apache/hadoop/common/hadoop-2.7.1/hadoop-2.7.1.tar.gz
配置SSH
1.配置ssh:ssh-keygen -t rsa -P "";
2.密钥启用SSH访问本地计算机:cat /home/hduser_/.ssd/id_rsa.pub >> /home/hduser_/.ssh/authorized_keys;
修改hadoop配置
1.解压hadoop 到 usr/local/hadoop;
2.配置hadoop环境变量到~/.bashrc:
#Set HADOOP_HOME export HADOOP_HOME=/usr/local/hadoop export PATH=$PATH:$HADOOP_HOME/bin
1.配置JAVA_HOME到hadoop-env.sh:vi /usr/local/hadoop/etc/hadoop/hadoop-env.sh;
# 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 the License. # Set Hadoop-specific environment variables here. # The only required environment variable is JAVA_HOME. All others are # optional. When running a distributed configuration it is best to # set JAVA_HOME in this file, so that it is correctly defined on # remote nodes. # The java implementation to use. export JAVA_HOME=/usr/java/jdk1.7.0_80 # The jsvc implementation to use. Jsvc is required to run secure datanodes # that bind to privileged ports to provide authentication of data transfer # protocol. Jsvc is not required if SASL is configured for authentication of # data transfer protocol using non-privileged ports. #export JSVC_HOME=${JSVC_HOME}
2.在$HADOOP_HOME/etc/hadoop/core-site.xml 文件配置hadoop存储数据相关参数,
vi /usr/local/hadoop/etc/hadoop/core-site.xml,修改如下:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed 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 the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <!-- 指定目录存储让hadoop存储数据文件 --> <name>hadoop.tmp.dir</name> <value>/app/hadoop/tmp</value> <description>Parent directory for other temporary directories.</description> </property> <property> <!-- 指定默认文件系统 --> <name>fs.defaultFS </name> <value>hdfs://localhost:54310</value> <description>The name of the default file system. </description> </property> </configuration>
3.创建存储文件目录:mkdir -p /app/hadoop/tmp;
4.授予权限:chmod 750 /app/hadoop/tmp
Map Reduce配置
1.设置hadoop环境变量:vi /etc/profile.d/hadoop.sh;
export HADOOP_HOME=/usr/local/hadoop
2.授权:chmod +x /etc/profile.d/hadoop.sh;
3.配置mapred,先在模板复制mapred-site.xml ,再编辑:
复制:cp $HADOOP_HOME/etc/hadoop/mapred-site.xml.template $HADOOP_HOME/etc/hadoop/mapred-site.xml;
编辑:vi $HADOOP_HOME/etc/hadoop/mapred-site.xml
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>mapreduce.jobtracker.address</name> <value>localhost:54311</value> <description>MapReduce job tracker runs at this host and port. </description> </property> </configuration>
配置HDFS
1,编辑hdfs-site.xml配置:vi $HADOOP_HOME/etc/hadoop/hdfs-site.xml;
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
<description>Default block replication.</description>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/home/hduser_/hdfs</value>
</property>
</configuration>
2.创建配置指定的目录:mkdir -p /home/hduser_/hdfs
3.授权:chmod 750 /home/hduser_/hdfs
相关推荐
### Hadoop安装教程:单机与伪分布式配置详解 #### 一、引言 Hadoop是一种开源的大数据处理框架,广泛应用于数据存储和处理场景。本文档将详细介绍如何在Ubuntu 14.04环境下安装配置Hadoop 2.6.0版本,包括单机模式...
hadoop单点配置教程!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
hadoop平台的安装与配置,恰同学少年,风华正茂,挥斥方遒
"Hadoop 集群安装与配置详细步骤" Hadoop 集群安装与配置详细步骤是大数据处理和存储的重要组件。为了实现高效的数据处理和存储,需要安装和配置 Hadoop 集群。本节将详细介绍 Hadoop 集群安装与配置的步骤。 安装...
hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2安装和配置hadoop1.1.2...
Hadoop 单节点配置详解 Hadoop 是一个开源的大数据处理框架,由Apache基金会维护。它可以在单节点模式下运行,以便于开发、测试和学习。单节点模式下,Hadoop 可以在一台机器上模拟分布式环境,方便用户快速上手和...
### Hadoop单机配置详解 在大数据处理领域,Apache Hadoop是一个开源软件框架,用于分布式存储和处理大型数据集。本文将详细介绍如何在单机环境下配置Hadoop,使其能够运行基本的大数据处理任务。 #### 一、配置...
Hadoop安装教程_单机/伪分布式配置_Hadoop2.7.1/Ubuntu 16.04 本教程主要讲述了在 Ubuntu 16.04 环境下安装 Hadoop 2.7.1 的步骤,包括单机模式、伪分布式模式和分布式模式三种安装方式。以下是本教程的知识点总结...
Hadoop 单结点安装和配置 Hadoop 单结点是 Hadoop 集群的基本组件,它可以单独运行在一台机器上,本文将指导您如何安装和配置 Hadoop 单结点。 卸载已安装的 JDK 和安装新版本 在开始安装 Hadoop 之前,需要卸载...
Hadoop 安装部署与配置实验 Hadoop 是一个基于 Java 的大数据处理框架,由 Apache 基金会开发和维护。该框架提供了一个分布式计算环境,能够处理大量数据。下面是 Hadoop 的安装部署与配置实验总结。 一、实验环境...
### Hadoop安装与配置知识点详解 #### 一、Hadoop简介及核心组件 **Hadoop** 是Apache软件基金会旗下的一款开源分布式计算平台,其主要功能是处理和存储大规模数据集。Hadoop的核心组件包括 **Hadoop分布式文件...
### Hadoop安装与配置详解 #### 一、概述 Hadoop是一个开源软件框架,用于分布式存储和处理大数据集。它能够高效地处理PB级别的数据,适用于海量数据的存储和计算场景。本文将详细介绍如何在多台虚拟机上安装和...
hadoop单机配置 hadoop单机配置是指在单个机器上安装和配置...hadoop单机配置需要安装Linux操作系统、创建hadoop用户组和用户、安装JDK、修改机器名、安装ssh服务、建立ssh无密码登录本机、安装hadoop等七个步骤。
### Hadoop3.1.3安装与单机/伪分布式配置知识点详解 #### 一、实验目的和要求 - **掌握Hadoop3.1.3的安装与配置**:包括单机模式和伪分布式模式。 - **理解Hadoop的工作原理**:特别是其在不同模式下的运行机制。 ...
以上内容详细介绍了在Linux环境下Hadoop和Spark的安装与配置方法,涉及了JDK、用户权限、SSH无密码登录以及Hadoop和Spark自身的安装配置等重要知识点。这些步骤为在Linux环境中搭建和配置大数据处理环境提供了清晰的...
### Hadoop核心组件安装及配置知识点详解 #### Hadoop简介 Hadoop是一个开源软件框架,主要用于分布式存储和处理大规模数据集。它通过提供一个高效、可靠且可扩展的平台,支持大量的并发用户对数据进行访问。Hadoop...
详尽的hadoop-2.7.3安装配置文档,包括ssh jdk Hadoop linux