今天看极客时间里的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
filesbin/*
- scripts useful for this quickstartconf/*
- example configurations for single-server and clustered setupextensions/*
- core Druid extensionshadoop-dependencies/*
- Druid Hadoop dependencieslib/*
- libraries and dependencies for core Druidquickstart/*
- 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虽然也无法访问,但刷新后居然就好了
可能是这端口号太霸道了!
原文:https://www.cnblogs.com/ukzq/p/12523726.html