kylin2.0环境搭建

tar -zxvf apache-kylin-2.0.0-bin-cdh57.tar.gz

压缩整个kylin目录
tar -rf kylin2.0_bak.gz apps
解压
tar -xvf kylin2.0_bak.gz
-------------------------------------------------------------

创建路径软链接
ln -s apache-kylin-2.0.0-bin kylin

-------------------------------------------------------------

##编辑(vi /etc/profile)


export BASE_PATH_BIG=/opt/cloudera/parcels/CDH/lib
#added by hbase
export HBASE_HOME=$BASE_PATH_BIG/hbase
export PATH=$HBASE_HOME/bin:$PATH

#added by HCat
#export HCAT_HOME=$BASE_PATH_BIG/hive-hcatalog
export HCAT_HOME=/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hive-hcatalog/share/hcatalog

#added by kylin
export KYLIN_HOME=/usr/local/apps/kylin


-------------------------------------------------------------

##kylin配置文件中修改的(ip地址要换)
kylin.server.cluster-servers=192.168.100.102:7070

-------------------------------------------------------------

##kylin配置文件中新增的(ip地址要换)
kylin.engine.mr.job-jar=/usr/local/apps/kylin/lib/kylin-job-2.0.0.jar
kylin.storage.hbase.coprocessor-local-jar=/usr/local/apps/kylin/lib/kylin-coprocessor-2.0.0.jar
kylin.engine.mr.yarn-check-status-url=http://192.168.100.04:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
kylin.engine.mr.lib-dir=/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/sentry/lib


-------------------------------------------------------------
在hdfs中创建/kylin目录
hadoop fs -mkdir /kylin

用root用户创建、或者授权给root
#先切换到所有者用户
su hdfs
#修改权限
hadoop fs -chmod 777 /kylin

给hive等工具在hdfs中的目录加上权限
su hdfs
hadoop fs -chmod 777 /user



-------------------------------------------------------------

7.检查
[root@cdh01 bin]# cd /usr/local/apps/kylin/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



[root@cdh01 bin]# ./find-hbase-dependency.sh
Retrieving hbase dependency...
[root@cdh01 bin]# ./find-hive-dependency.sh
Retrieving hive dependency...

-------------------------------------------------------------
8.启动kylin
[root@cdh01 kylin]# ./kylin.sh start
查看kylinUI日志
[root@cdh01 kylin]# tailf logs/kylin.out

INFO: Starting ProtocolHandler ["http-bio-7070"]
Sep 01, 2017 10:35:28 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-9009"]
Sep 01, 2017 10:35:28 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 22057 ms
启动完成

查看kylin server日志
[root@cdh01 kylin]# tailf logs/kylin.log



-------------------------------------------------------------
//启动kylin
cd /usr/local/apps/kylin/bin
./kylin.sh start
//停止kylin
./kylin.sh stop
-------------------------------------------------------------
管理台
http://192.168.100.04:7070/kylin/login
User: ADMIN
Pass: KYLIN

 
-------------------------------------------------------------

//清理无用数据,节省资源
清理元数据
./metastore.sh clean --delete true
//清理hdfs、hbase中的垃圾数据
./kylin.sh org.apache.kylin.storage.hbase.util.StorageCleanupJob --delete true
(false:只查询不删除;true:删除无用表和基础数据)

-------------------------------------------------------------
#kylin元数据备份
./metastore.sh backup

#kylin元数据还原
./metastore.sh restore /usr/local/apps/apache-kylin-2.0.0-bin/meta_backups/meta_2017_11_01_10_40_39



-------------------------------------------------------------
压缩整个kylin目录
tar -rf kylin2.1_bak.gz apps
解压
tar -xvf kylin2.1_bak.gz

ps -ef|grep kylin


压缩整个kylin目录
cd /usr/local/apps
tar -rf kylin2.0.0_bak.gz apache-kylin-2.0.0-bin
-------------------------------------------------------------

 

posted @ 2018-01-22 10:22  double_kill  阅读(314)  评论(0编辑  收藏  举报