【Druid】单机版Druid安装过程

发布时间:2020-07-24 10:50:06 作者:巧克力黒
来源:网络 阅读:1136

记录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

推荐阅读:
  1. springBoot(12):集成Druid
  2. 【Druid】Druid读取Kafka数据的简单配置过程

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

druid 安装 %d

上一篇:wifi密码如何修改

下一篇:静态路由的原理和配置

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》