cdh6.1.0的环境安装kylin2.6.4

本文基于cdh6.1.0的环境安装kylin2.6.4

各个组件版本信息

首先确定你的安装环境里各个组件的版本信息,来确定选择kylin的版本

1.java 版本

命令:$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

2.hadoop 版本

命令:$ hadoop version
Hadoop 3.0.0-cdh6.1.0
Source code repository http://github.com/cloudera/hadoop -r b8dd3044ff414ac0bf14b77ab23d55ca291464a9
Compiled by jenkins on 2018-12-07T01:00Z
Compiled with protoc 2.5.0
From source with checksum 25f1e186cc43e44704f8d99c6c7bec
This command was run using /opt/cloudera/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702/jars/hadoop-common-3.0.0-cdh6.1.0.jar

3.hive 版本

使用shell 命令 hive 进入hive 客户端,根据输出查看版本信息
命令:$ hive
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702/jars/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702/jars/slf4j-log4j12-1.7.25.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.apache.logging.slf4j.Log4jLoggerFactory]

Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702/jars/hive-common-2.1.1-cdh6.1.0.jar!/hive-log4j2.properties Async: false
WARNING: Hive CLI is deprecated and migration to Beeline is recommended.
hive> 

从hive的jar包找到hive版本
jar:file:/opt/cloudera/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702/jars/hive-common-2.1.1-cdh6.1.0.jar

4.hbase 版本

使用shell命令hbase shell 进入hbase客户端,根据输出查找版本信息
命令:$ hbase shell
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.1.0-cdh6.1.0, rUnknown, Thu Dec  6 16:59:59 PST 2018
Took 0.0055 seconds                                                                                  
hbase(main):001:0> 

看到版本信息 Version 2.1.0-cdh6.1.0

5.通过kylin官网的安装指南选择合适的kylin 版本

http://kylin.apache.org/cn/docs/install/index.html
cdh6.1.0的环境安装kylin2.6.4_第1张图片
在这里我选择kylin 2.6.4

kylin的下载和安装

1.官网下载地址

http://kylin.apache.org/cn/download/
cdh6.1.0的环境安装kylin2.6.4_第2张图片

2.将下载的tar.gz 文件上传到安装节点的安装目录并解压

 cd /home/gzitv/apps  ##进入目录,执行解压就会在这个目录下. 当然你可以指定解压目录.

 tar -zxvf apache-kylin-2.6.4-bin-cdh60.tar.gz  ##解压

解压后的目录 apache-kylin-2.6.4-bin

3.建立软连接

  ln -s apache-kylin-2.6.4-bin

4.添加环境变量到当前用户的bashrc下:

命令:  vi  ~/.bashrc
#added by java
export JAVA_HOME=/usr/java/jdk1.8.0_201-amd64
export JAVA_CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
#added by kylin
export KYLIN_HOME=/home/gzitv/apps/apache-kylin-2.6.4-bin

export BASE_PATH=/opt/cloudera/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib
#added by hadoop
export HADOOP_HOME=$BASE_PATH/hadoop
export HADOOP_CMD=$BASE_PATH/hadoop/bin/hadoop
#added by hbase
export HBASE_HOME=$BASE_PATH/hbase
#added by hive
export HIVE_HOME=$BASE_PATH/hive
export HCAT_HOME=$BASE_PATH/hive-hcatalog
#added by spark
export SPARK_HOME=$BASE_PATH/spark

编辑完成后保存,并生效环境配置,执行命令:
source ~/.bashrc

5.修改kylin.properties配置文件

cd $KYLIN_HOME/conf
vi kylin.properties

#添加配置
kylin.engine.mr.lib-dir=/opt/cloudera/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/sentry/lib
kylin.rest.servers=192.168.200.6:7070
kylin.job.jar=/home/gzitv/apps/apache-kylin-2.6.4-bin/lib/kylin-job-2.6.4.jar
kylin.coprocessor.local.jar=/home/gzitv/apps/apache-kylin-2.6.4-bin/lib/kylin-coprocessor-2.6.4.jar

6.检查

  [root@cdh01 bin]# cd $KYLIN_HOME/bin

执行下面检查命令 会创建kylin目录在hdfs上

   [root@cdh01 bin]# ./check-env.sh

Retrieving hadoop conf dir…

KYLIN_HOME is set to /usr/local/apps/kylin

[root@cdh01 bin]# hadoop fs -ls /

Found 8 items

drwxr-xr-x - hdfs supergroup 0 2017-06-02 17:55 /CONFIG
drwxr-xr-x - hbase hbase 0 2017-08-31 19:11 /hbase
drwxr-xr-x - root supergroup 0 2017-09-01 10:23 /kylin

7.启动kylin

  [root@cdh01 kylin]# bin/kylin.sh  start

查看kylinUI日志

[root@cdh01 kylin]# tailf logs/kylin.out

启动完成
查看kylin server日志

[root@cdh01 kylin]# tailf logs/kylin.log

无报错,启动完成

8.登陆kylin

  http://:7070/kylin
  User: ADMIN
  Pass: KYLIN

你可能感兴趣的:(大数据,个人笔记)