码迷,mamicode.com
首页 > 其他好文 > 详细

单机版Druid安装过程

时间:2019-08-15 23:12:27      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:bin   druid   pre   started   path   arc   tin   keep   一个   

记录Druid单机版安装过程,大体与官网安装过程,加入了个别与官网安装不一致的情况和解决方法

Druid运行依赖zookeeper作为分布式协调服务,下载安装zookeeper

wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz
tar -zvf zookeeper-3.4.14.tar.gz
ln -s zookeeper-3.4.14 zookeeper

下载Druid安装包:

wget http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/druid/0.15.0-incubating/apache-druid-0.15.0-incubating-bin.tar.gz
tar -zxf apache-druid-0.15.0-incubating-bin.tar.gz
ln -s apache-druid-0.15.0-incubating druid

配置~/.bash_profile 环境变量
vim ~/.bash_profile

export JAVA_HOME=/home/homework/jdk
export ZK_HOME=/home/homework/zookeeper
export DRUID_HOME=/home/homework/druid
export KAFKA_HOME=/home/homework/kafka
export PATH=$PATH:$JAVA_HOME/bin:$ZK_HOME/bin:$DRUID_HOME/bin:$KAFKA_HOME/bin

重新加载环境变量
source ~/.bash_profile

启动zookeeper

zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /home/homework/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

启动druid

[homework@test druid]$ start-micro-quickstart 
[Thu Aug 15 19:51:07 2019] Running command[zk], logging to[/mnt/homework/apache-druid-0.15.0-incubating/var/sv/zk.log]: bin/run-zk conf
[Thu Aug 15 19:51:07 2019] Running command[coordinator-overlord], logging to[/mnt/homework/apache-druid-0.15.0-incubating/var/sv/coordinator-overlord.log]: bin/run-druid coordinator-overlord conf/druid/single-server/micro-quickstart
[Thu Aug 15 19:51:07 2019] Running command[broker], logging to[/mnt/homework/apache-druid-0.15.0-incubating/var/sv/broker.log]: bin/run-druid broker conf/druid/single-server/micro-quickstart
[Thu Aug 15 19:51:07 2019] Running command[router], logging to[/mnt/homework/apache-druid-0.15.0-incubating/var/sv/router.log]: bin/run-druid router conf/druid/single-server/micro-quickstart
[Thu Aug 15 19:51:07 2019] Running command[historical], logging to[/mnt/homework/apache-druid-0.15.0-incubating/var/sv/historical.log]: bin/run-druid historical conf/druid/single-server/micro-quickstart
[Thu Aug 15 19:51:07 2019] Running command[middleManager], logging to[/mnt/homework/apache-druid-0.15.0-incubating/var/sv/middleManager.log]: bin/run-druid middleManager conf/druid/single-server/micro-quickstart
[Thu Aug 15 19:51:08 2019] Command[zk] exited (pid = 25982, exited = 1)
[Thu Aug 15 19:51:08 2019] Command[zk] failed, see logfile for more details: /mnt/homework/apache-druid-0.15.0-incubating/var/sv/zk.log
[Thu Aug 15 19:51:11 2019] Running command[zk], logging to[/mnt/homework/apache-druid-0.15.0-incubating/var/sv/zk.log]: bin/run-zk conf

我在执行这个命令的情况下会报错。具体报错内容可以查看/mnt/homework/apache-druid-0.15.0-incubating/var/sv/zk.log。主要原因是官网要求将zookeeper以zk文件夹放在druid的根目录下。
由于我这里zookeeper的安装是与druid等其他组件同级目录。所以在druid的安装目录下创建了一个软连接,指向zk

cd /home/homework/druid
ln -s /home/homework/zookeeper zk

这个情况下,就能够启动druid

单机版Druid安装过程

标签:bin   druid   pre   started   path   arc   tin   keep   一个   

原文地址:https://blog.51cto.com/10120275/2429912

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!