CentOS7 安装kylin2.6.0集群

1. 环境准备

zookeeper3.4.12

mysql5.7

hive2.3.4

hadoop2.7.3

JDK1.8

hbase1.3.3

2. 集群规划

ip地址 机器名 角色
192.168.1.101 palo101 hadoop namenode, hadoop datanode, yarn nodeManager, zookeeper, hive, hbase master,hbase region server,
192.168.1.102 palo102 hadoop namenode, hadoop datanode, yarn nodeManager,  yarn resource manager, zookeeper, hive, hbase master,hbase region server
192.168.1.103 palo103 hadoop namenode, hadoop datanode, yarn nodeManager, zookeeper, hive,hbase region server,mysql

3. 下载kylin2.6

wget http://mirrors.tuna.tsinghua.edu.cn/apache/kylin/apache-kylin-2.6.0/apache-kylin-2.6.0-bin-hbase1x.tar.gz   #下载kylin2.6.0二进制文件
tar -xzvf apache-kylin-2.6.0-bin-hbase1x.tar.gz          #解压kylin2.6.0二进制压缩包
mv apache-kylin-2.6.0-bin apache-kylin-2.6.0             #将kylin解压过的文件重命名(去掉最后的bin)
mkdir /usr/local/kylin/                                  #创建目标存放路径
mv apache-kylin-2.6.0    /usr/local/kylin/               #将kylin2.6.0文件夹移动到/usr/local/kylin目录下

4. 添加系统环境变量

vim /etc/profile

在文件末尾添加

#kylin
export KYLIN_HOME=/usr/local/kylin/apache-kylin-2.6.0
export KYLIN_CONF_HOME=$KYLIN_HOME/conf
export PATH=:$PATH:$KYLIN_HOME/bin:$CATALINE_HOME/bin
export tomcat_root=$KYLIN_HOME/tomcat   #变量名小写
export hive_dependency=$HIVE_HOME/conf:$HIVE_HOME/lib/*:$HCAT_HOME/share/hcatalog/hive-hcatalog-core-2.3.4.jar   #变量名小写

:wq保存退出,并输入source /etc/profile使环境变量生效

5. 配置kylin

5.1 配置$KYLIN_HOME/bin/kylin.sh

vim $KYLIN_HOME/bin/kylin.sh

在文件开头添加

export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$hive_dependency:$HBASE_CLASSPATH_PREFIX

这么做的目的是为了加入$hive_dependency环境,解决后续的两个问题,都是没有hive依赖的原因:
a) kylinweb界面load hive表会失败
b) cube build的第二步会报org/apache/Hadoop/hive/conf/hiveConf的错误。

5.2 hadoop压缩配置

关于snappy压缩支持问题,如果支持需要事先重新编译Hadoop源码,使得native库支持snappy.使用snappy能够实现一个适合的压缩比,使得这个运算的中间结果和最终结果都能占用较小的存储空间
本例的hadoop不支持snappy压缩,这个会导致后续cube build报错。

vim  $KYLIN_HOME/conf/Kylin_job_conf.xml

修改配置文件,将配置项mapreduce.map.output.compress,mapreduce.output.fileoutputformat.compress修改为false

    <property>
        <name>mapreduce.map.output.compress</name>
        <value>false</value>
        <description>Compress map outputs</description>
    </property>
    <property>
        <name>mapreduce.output.fileoutputformat.compress</name>
        <value>false</value>
        <description>Compress the output of a MapReduce job</description>
    </property>

还有一个关于压缩的地方需要修改

vim   $KYLIN_HOME/conf/kylin.properties

将kylin.hbase.default.compression.codec设置为none或者注释掉

#kylin.storage.hbase.compression-codec=none

5.3 主配置$KYLIN_HOME/conf/kylin.properties

vim   $KYLIN_HOME/conf/kylin.properties

修改为:

kylin.metadata.url=[email protected]   ###hbase上存储kylin元数据
kylin.env.hdfs-working-dir=/kylin      ###hdfs上kylin工作目录
kylin.env=DEV
kylin.env.zookeeper-base-path=/kylin
kylin.server.mode=all      ###kylin主节点模式,从节点的模式为query,只有这一点不一样
kylin.rest.servers=192.168.1.101:7070,192.168.1.102:7070,192.168.1.103:7070    ###集群的信息同步
kylin.web.timezone=GMT+8    ####改为中国时间
kylin.job.retry=3
kylin.job.mapreduce.default.reduce.input.mb=500
kylin.job.concurrent.max.limit=10
kylin.job.yarn.app.rest.check.interval.seconds=10
kylin.job.hive.database.for.intermediatetable=kylin_flat_db     ###build cube 产生的Hive中间表存放的数据库
kylin.hbase.default.compression.codec=none   ###不采用压缩
kylin.job.cubing.inmem.sampling.percent=100
kylin.hbase.regin.cut=5
kylin.hbase.hfile.size.gb=2
###定义kylin用于MR jobs的job.jar包和hbase的协处理jar包,用于提升性能(添加项)
kylin.job.jar=/usr/local/kylin/apache-kylin-2.6.0/lib/kylin-job-2.6.0.jar
kylin.coprocessor.local.jar=/usr/local/kylin/apache-kylin-2.6.0/lib/kylin-coprocessor-2.6.0.jar

5.4 将配置好的kylin复制到其他两台机器上去

scp -r /usr/local/kylin/  192.168.1.102:/usr/local
scp -r /usr/local/kylin/  192.168.1.103:/usr/local

5.5 将192.168.1.102,192.168.1.103上的kylin.server.mode改为query

vim   $KYLIN_HOME/conf/kylin.properties

修改项为

kylin.server.mode=query      ###kylin主节点模式,从节点的模式为query,只有这一点不一样

6. 启动kylin

6.1 前提条件:依赖服务先启动

a) 启动zookeeper,所有节点运行zkServer.sh start
b) 启动hadoop,主节点运行start-all.sh
c) 启动JobHistoryserver服务,yarn主节点启动$HADOOP_HOME/sbin/mr-jobhistoryserver-deamon.sh start historyserver
d) 启动hivemetastore服务,hive –service metastore & #后台运行
e) 启动hbase集群,主节点启动start-hbase.sh

启动后的进程为:

192.168.1.101

[[email protected] apache-kylin-2.6.0]# jps
62403 NameNode          #hdfs NameNode
31013 NodeManager       #yarn NodeManager
22325 Kafka
54217 QuorumPeerMain    #zookeeper
7274 Jps
62589 DataNode          #hadoop datanode
28895 HRegionServer     #hbase region server
8440 HMaster            #hbase master

192.168.1.102

[[email protected] ~]# jps
47474 QuorumPeerMain    #zookeeper
15203 NodeManager       #yarn NodeManager
15061 ResourceManager   #yarn ResourceManager
49877 Jps
6694 HRegionServer      #hbase region server
7673 Kafka
37517 SecondaryNameNode #hdfs SecondaryNameNode
37359 DataNode          #hadoop datanode

192.168.1.103

[[email protected] ~]# jps
1185 RunJar             #hive metastore
62404 NodeManager       #yarn NodeManager
47365 HRegionServer     #hbase region server
62342 QuorumPeerMain    #zookeeper
20952 ManagerBootStrap
52440 Kafka
31801 RunJar            #hive thrift server
47901 DataNode          #hadoop datanode
36494 Jps

6.2 检查配置是否正确

 $KYLIN_HOME/bin/check-env.sh
[[email protected] bin]#  $KYLIN_HOME/bin/check-env.sh
Retrieving hadoop conf dir...
KYLIN_HOME is set to /usr/local/kylin/apache-kylin-2.6.0
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/apache-hive-2.3.4-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/apache-hive-2.3.4-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/apache-hive-2.3.4-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

hive依赖检查find-hive-dependency.sh
hbase依赖检查find-hbase-dependency.sh
所有的依赖检查可吃用check-env.sh

6.3 所有节点运行下面命令来启动kylin

 $KYLIN_HOME/bin/kylin.sh start

启动时如果出现下面的错误

Failed to find metadata store by url: [email protected]

解决办法 为:

1)将$HBASE_HOME/conf/hbase-site.html的属性hbase.rootdir改成与$HADOOP_HOME/etc/hadoop/core-site.xml中的属性fs.defaultFS一致

2)进入zk的bin的zkCli,将/hbase删除,然后重启hbase可以解决

原文地址:https://www.cnblogs.com/lenmom/p/10329956.html

时间: 2024-12-07 21:20:21

CentOS7 安装kylin2.6.0集群的相关文章

Ubuntu12.04-x64编译Hadoop2.2.0和安装Hadoop2.2.0集群

1 . 安装maven .libssl-dev .cmake 和JDK 安装本机库http://wiki.apache.org/hadoop/HowToContribute sudo apt-get -y install maven build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev sudo tar -zxvf jdk-7u51-linux-x64.tar.gz /usr/lib/jv

centos 安装 redis3.2.0 集群

这里创建6个redis节点,其中三个为主节点,三个为从节点. redis和端口对应关系: 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 从: 127.0.0.1:7003127.0.0.1:7004127.0.0.1:7005 步骤:1,下载redis.官网下载3.0.0版本,之前几的版本不支持集群模式 下载地址:http://download.redis.io/releases/redis-3.0.0.tar.gz 2:上传服务器,解压,编译tar

centos7安装zookeeper3.4.12集群

zookeeper的三要素: 1.一致,能够保证数据的一致性 2.有头,始终有一个leader,node/2+1个节点有效,就能正常工作 3.数据树,树状结构且每个树必须有数据 1. 环境准备 操作系统:CentOS Linux release 7.2.1511 (Core) JDK版本:1.8.0_121 具体安装jdk的配置请参见本人的博客https://www.cnblogs.com/lenmom/p/9152947.html中关于jdk安装部分的内容,本文假设jdk已经安装好了 服务器 

centos7安装zookeeper3.4.9集群

本篇文章目的:以最小成本学习zookeeper的集群安装 环境准备 操作系统:CentOS Linux release 7.2.1511 (Core) JDK版本:1.8.0_121 三台服务器:192.168.1.91; 192.168.1.92; 192.168.1.93; 下载zookeeper 下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 选择zookeeper-3.4.9版本 下载即可 拷贝zookeeper 先

centos7安装hadoop3.2.1集群

这次我安装的是hadoop3.2.1 一.下载Hadoop以及JDK hadoop下载地址:http://mirrors.hust.edu.cn/apache/hadoop/common/ jdk参照:https://www.cnblogs.com/mufeng07/p/12150820.html 二.先一台虚拟机安装hadoop 1.修改主机 hostnamectl set-hostname hadoop01 vi /etc/hosts   追加 192.168.31.111 hadoop01

centos7 安装zookeeper3.4.8集群

1.下载上传文件到centos中 2.解压文件夹 3.cd conf 文件下,cp  zoo_sample.cfg  zoo.cfg 4.vim zoo.cfg # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that c

centos7安装hadoop完全分布式集群

groupadd test             //新建test工作组 useradd -g test phpq        //新建phpq用户并增加到test工作组 userdel 选项 用户名 常用的选项是 -r,它的作用是把用户的主目录一起删除. chmod u+w /etc/sudoers vim /etc/sudoers 在文件的如下位置,为hadoop用户和spark用户添加一行即可: root ALL=(ALL) ALL hadoop ALL=(ALL) ALL spark

redis3.0 集群实战1 -- 安装和配置

本文主要是在centos7上安装和配置redis集群实战 参考: http://hot66hot.iteye.com/blog/2050676 集群教程: http://redisdoc.com/topic/cluster-tutorial.html#id2 1 安装准备 1.1 下载redis3.0版本 到redis官网redis.io或者redis中文官网www.redis.cn上(http://www.redis.cn/download.html)去下载最新的版本,我下载的是redis3.

_00024 妳那伊抹微笑_云计算之ClouderaManager以及CHD5.1.0集群部署安装文档V1.0

博文作者:妳那伊抹微笑 博客地址:http://blog.csdn.net/u012185296 博文标题:_00024 妳那伊抹微笑_云计算之ClouderaManager以及CHD5.1.0集群部署安装文档V1.0 个性签名:世界上最遥远的距离不是天涯,也不是海角,而是我站在妳的面前,妳却感觉不到我的存在 技术方向:Flume+Kafka+Storm+Redis/Hbase+Hadoop+Hive+Mahout+Spark ... 云计算技术 转载声明:可以转载, 但必须以超链接形式标明文章