druid的再次使用


今天看極客時間里的druid連接池的課程

發現很多之前用的時候沒注意到的功能

之前使用druid以為只是簡單的有一個數據庫監控 

今天百度druid發現已經歸為了apache下的一個模塊 並且在功能上有所增強

 

 

使用

https://druid.apache.org/downloads.html 進行下載

放入linux中/home/

cd /home執行

tar -xzf apache-druid-0.17.0-bin.tar.gz
cd apache-druid-0.17.0

 

  • LICENSE and NOTICE files
  • bin/* - scripts useful for this quickstart
  • conf/* - example configurations for single-server and clustered setup
  • extensions/* - core Druid extensions
  • hadoop-dependencies/* - Druid Hadoop dependencies
  • lib/* - libraries and dependencies for core Druid
  • quickstart/* - configuration files, sample data, and other files for the quickstart tutorials

上面是文件內容介紹

緊接着我們按官方文檔繼續操作

./bin/start-micro-quickstart

8081被占用 nginx的網關

Cannot start up because port 8081 is already in use.

If you need to change your ports away from the defaults, check out the
configuration documentation:

  https://druid.apache.org/docs/latest/configuration/index.html

If you believe this check is in error, or if you have changed your ports away
from the defaults, you can skip this check using an environment variable:

  export DRUID_SKIP_PORT_CHECK=1

 https://druid.apache.org/docs/latest/configuration/index.html

發現配置文件中很多端口都與我之前弄的沖突了

/home/apache-druid-0.17.0/conf/druid/single-server/xlarge/coordinator-overlord

druid.service=druid/coordinator
druid.plaintextPort=8081

druid.coordinator.startDelay=PT10S
druid.coordinator.period=PT5S

 

testweb1是個測試頁面

最好的辦法是在安全組開幾個新端口,在druid配置文件中進行更改

默認7070-7074更改到原來druid配置的808*中,

保留其原有 1527 和 8888 端口

再次運行

因為是啟動的./bin/start-micro-quickstart

所以更改的配置文件應該是:

/home/apache-druid-0.17.0/conf/druid/single-server/micro-quickstart

 

All persistent state such as the cluster metadata store and segments for the services will be kept in the var directory under the apache-druid-0.17.0 package root. Logs for the services are located at var/sv.

Later on, if you'd like to stop the services, CTRL-C to exit the bin/start-micro-quickstart script, which will terminate the Druid processes.

Once the cluster has started, you can navigate to http://localhost:8888. The Druid router process, which serves the Druid console, resides at this address.

上面官方說你可以在哪里看日志Logs 怎么Ctrl+C退出服務進行 怎么查看界面:8888

但是這里我訪問了還沒看到頁面

新shell頁面:

 

並無8888,判斷,可能是由於之前端口有依賴性關系

在端口號后加了下/druid雖然也無法訪問,但刷新后居然就好了

 

可能是這端口號太霸道了!

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM