2019独角兽企业重金招聘Python工程师标准>>>
apache kylin 单机版安装
需要的软件
- apache-hive-2.1.1-bin.tar.gz
- apache-kylin-1.6.0-hbase1.x-bin.tar.gz
- hadoop-2.6.5.tar.gz
- hbase-1.2.4-bin.tar.gz
- jdk-8u111-linux-x64.tar.gz
基本环境准备
-
将所有基础软件下载后解压在/usr/local目录下备用
-
设置环境变量
JAVA_HOME=/usr/local/jdk1.8.0_111
CLASS_PATH=/usr/local/jdk1.8.0_111/lib/tools.jar:/usr/local/jdk1.8.0_111/lib/dt.jar
KYLIN_HOME=/usr/local/apache-kylin-1.6.0-hbase1.x-bin
HIVE_HOME=/usr/local/apache-hive-2.1.1-bin
HBASE_HOME=/usr/local/hbase-1.2.4
HADOOP_HOME=/usr/local/hadoop-2.6.5
HIVE_CONF=/usr/local/apache-hive-2.1.1-bin/conf
HCAT_HOME=/usr/local/apache-hive-2.1.1-bin/hcatalog
ZOOKEEPER_HOME=/usr/local/zookeeper-3.4.9
PATH=$PATH:$JAVA_HOME/bin:$KYLIN_HOME/bin:$HIVE_HOME/bin:$HADOOP_HOME/bin:$HBASE_HOME/bin:$HCAT_HOME/bin:$ZOOKEEPER_HOME/bin:$HOME/bin
export PATH JAVA_HOME CLASS_PATH KYLIN_HOME HIVE_HOME HBASE_HOME HADOOP_HOME HIVE_CONF HCAT_HOME ZOOKEEPER_HOME
-
将机器名和ip进行映射
vim /etc/hosts 127.0.0.1 iz2ze3l7f66cghrej3dligz
配置hadoop(伪分布式方式部署)
参考https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html#Pseudo-Distributed_Operation
cd $HADOOP_HOME/etc/hadoop
[root@iz2ze3l7f66cghrej3dligz hadoop]# cat hdfs-site.xml
dfs.replication
1
[root@iz2ze3l7f66cghrej3dligz hadoop]# cat yarn-site.xml
yarn.nodemanager.aux-services
mapreduce_shuffle
配置hive
- 安装mysql数据库作为元数据存储
yum -y install mariadb-server
systemctl enable mariadb
systemctl start mariadb
mysql -u root -p
mysql> CREATE DATABASE hive;
-- 创建 hive 用户,并赋予访问 hive 数据库的权限
mysql> GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'localhost' IDENTIFIED BY 'hive';
mysql> FLUSH PRIVILEGES;
-- 设置 binary log 的格式:
mysql> set global binlog_format=MIXED;
hive.metastore.uris
thrift://localhost:9083
Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.
javax.jdo.option.ConnectionURL
jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
JDBC connect string for a JDBC metastore
javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
Driver class name for a JDBC metastore
javax.jdo.option.ConnectionUserName
hive
username to use against metastore database
javax.jdo.option.ConnectionPassword
hive
password to use against metastore database
要添加mysql jdbc jar 包
mv mysql-connector-java-5.1.37/mysql-connector-java-5.1.37-bin.jar $HIVE_HOME/lib
配置zookeeper
cd $ZOOKEEPER_HOME/conf
cp zoo_smaple.cfg zoo.cfg #无需修改默认即可
服务启动顺序
$HADOOP_HOME/sbin/start-all.sh
$nohup $HIVE_HOME/bin/hive --service metastore -p 9083 &
$HBASE_HOME/bin/start-hbase.sh
$KYLIN_HOME/bin/kylin.sh start
详细参考 http://www.cnblogs.com/en-heng/p/5170876.html,感谢博主