【Druid】單機版Druid安裝過程

記錄Druid單機版安裝過程,大致與官網安裝過程,加入了個別與官網安裝不一致的狀況和解決方法apache

Druid運行依賴zookeeper做爲分佈式協調服務,下載安裝zookeepervim

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安裝包:bash

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_profileide

啓動zookeeperui

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

啓動druidrouter

[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的安裝目錄下建立了一個軟鏈接,指向zkserver

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

這個狀況下,就可以啓動druidget

相關文章
相關標籤/搜索