溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

【Druid】單機版Druid安裝過程

發(fā)布時間:2020-07-24 10:50:06 來源:網(wǎng)絡(luò) 閱讀:1136 作者:巧克力黒 欄目:大數(shù)據(jù)

記錄Druid單機版安裝過程,大體與官網(wǎng)安裝過程,加入了個別與官網(wǎng)安裝不一致的情況和解決方法

Druid運行依賴zookeeper作為分布式協(xié)調(diào)服務(wù),下載安裝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 環(huán)境變量
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

重新加載環(huán)境變量
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

我在執(zhí)行這個命令的情況下會報錯。具體報錯內(nèi)容可以查看/mnt/homework/apache-druid-0.15.0-incubating/var/sv/zk.log。主要原因是官網(wǎng)要求將zookeeper以zk文件夾放在druid的根目錄下。
由于我這里zookeeper的安裝是與druid等其他組件同級目錄。所以在druid的安裝目錄下創(chuàng)建了一個軟連接,指向zk

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

這個情況下,就能夠啟動druid

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI