栏目分类:
子分类:
返回
文库吧用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
文库吧 > IT > 前沿技术 > 大数据 > 大数据系统

Hadoop+Spark+Zookeeper+Hbase集群搭建

Hadoop+Spark+Zookeeper+Hbase集群搭建

文章目录
  • 端口
  • Hadoop
  • Spark
  • Zookeeper
  • Hbase

端口

端口开放问题
关闭防火墙systemctl stop firewalld,并在服务器开放以下端口:

Hadoop

使用docker部署hadoop集群-手把手复现

vim core-site.xml
    
        fs.defaultFS
        hdfs://hadoop1:9000
    
    
        hadoop.tmp.dir
        file:/home/hadoop/tmp
    
vim hdfs-site.xml
	
        dfs.namenode.name.dir
        file:/home/hadoop/hdfs_name
    
    
        dfs.datanode.data.dir
        file:/home/hadoop/hdfs_data
    
    
        dfs.replication
        2
    
    
        dfs.namenode.secondary.http-address
        hadoop1:9001
    
    
        dfs.webhdfs.enabled
        true
    
    
        dfs.permissions
        false
    

vim mapred-site.xml
	
        mapreduce.framework.name
        yarn
    
    
        mapreduce.jobhistory.address
        hadoop1:10020
    
    
        mapreduce.jobhistory.webapp.address
        hadoop1:19888
    
    
                yarn.app.mapreduce.am.env
                HADOOP_MAPRED_HOME=${HADOOP_HOME}
        
        
         mapreduce.map.env
         HADOOP_MAPRED_HOME=${HADOOP_HOME}
        
        
          mapreduce.reduce.env
          HADOOP_MAPRED_HOME=${HADOOP_HOME}
        
vim yarn-site.xml
        
                yarn.resourcemanager.hostname
                hadoop1
        
        
                yarn.nodemanager.aux-services
                mapreduce_shuffle
        
        
                yarn.log-aggregation-enable
                true
        
        
                yarn.log-aggregation.retain-seconds
                604800
        
vim hadoop-env.sh
export JAVA_HOME=/usr/local/jdk1.8


Spark

Spark集群安装-基于hadoop集群

插播反爬信息 )博主CSDN地址:https://wzlodq.blog.csdn.net/

Zookeeper
  1. 下载解压
    https://downloads.apache.org/zookeeper/stable/apache-zookeeper-3.6.3-bin.tar.gz
wget https://downloads.apache.org/zookeeper/stable/apache-zookeeper-3.6.3-bin.tar.gz
tar -zxvf apache-zookeeper-3.6.3-bin.tar.gz
mv apache-zookeeper-3.6.3-bin /usr/local/zookeeper
  1. 配置zoo.cfg
cd /usr/local/zookeeper/conf
cp zoo_sample.cfg zoo.cfg
vim zoo.cfg
dataDir=/data/zookeeper/data/
dataLogDir=/data/zookeeper/logs/
quorumListenonAllIPs=true
admin.serverPort=8181
server.1=hadoop1:2888:3888
server.2=hadoop2:2888:3888

  1. 配置myid
mkdir -p /data/zookeeper/
cd /data/zookeeper/
mkdir data logs
cd data
vim myid

  1. 同步
scp -r /usr/local/zookeeper/ hadoop2:/usr/local/
  1. 启动
    在各个节点启动zookeeper
cd /usr/local/zookeeper/bin
./zkServer.sh start

Hbase

IDEA远程连接Hbase及其Java API实战当时这篇是单机的,没介绍集群,步骤基本一致。

  1. 下载解压
wget https://downloads.apache.org/hbase/2.3.5/hbase-2.3.5-src.tar.gz
tar -zxvf hbase-2.3.5-src.tar.gz
mv hbase-2.3.5 /usr/local/hbase
  1. 配置hbase-site.xml
cd /usr/local/hbase/conf
vi hbase-site.xml
  
    hbase.cluster.distributed
    true
  
  
    hbase.tmp.dir
    ./tmp
  
  
    hbase.unsafe.stream.capability.enforce
    true
  
  
    hbase.rootdir
    hdfs://hadoop1:9000/hbase
  
  
    hbase.zookeeper.quorum
    hadoop1:2181,hadoop2:2181
    The directory shared by RegionServers. 
  
  
    hbase.master.info.port
    16010
  
  
    zookeeper.session.timeout
    90000
    hbase-default.xml
  
  1. 配置hbase-env.sh
cd /usr/local/hbase/conf
echo $JAVA_HOME
vi hbase-env.sh #添加和你输出的JAVA_HOME一致
export JAVA_HOME=/usr/local/jdk1.8
export Hbase_MANAGES_ZK=false

  1. 设置从节点
cd /usr/local/hbase/conf
vi regionservers

  1. 同步
    将主节点Hbase配置同步给从节点
scp -r /usr/local/hbase/ hadoop2:/usr/local/
  1. 启动测试
    记得先启动zookeeper和hadoop
cd /usr/local/hbase/bin
./start-hbase.sh

原创不易,请勿转载(本不富裕的访问量雪上加霜
博主首页:https://wzlodq.blog.csdn.net/
来都来了,不评论两句吗
如果文章对你有帮助,记得一键三连❤

转载请注明:文章转载自 www.wk8.com.cn
本文地址:https://www.wk8.com.cn/it/280041.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 wk8.com.cn

ICP备案号:晋ICP备2021003244-6号