Install Imply Private on Linux · 2021.09
集群部署 · ApacheDruid中文技术文档 (apache-druid.cn)
部署说明
Imply 基于 Apache Druid 开发了一整套大数据分析解决方案,提供开源社区版本和商业版,简化了 Apache Druid 的部署
搭建准备
① 环境准备
3 台云服务器 + 1 台云数据库 Mysql ( 5.7 )
节点 | node1 | node2 | node3 |
---|
配置 | 2C - 8G - 50G | 2C - 4G - 50G | 2C - 4G - 50G |
服务 | node1 | node2 | node3 |
---|
Zookeeper | √ | √ | √ | kafka | √ | √ | √ | Apache Druid - overlord | √ | | | Apache Druid - coordinator | √ | | | Apache Druid - middleManager | | √ | | Apache Druid - historical | | √ | | Apache Druid - broker | | | √ | Apache Druid - router | | | √ |
② 安装包下载
Apache Druid Imply Download
tar -zxvf imply-3.0.4.tar.gz -C /opt/server
配置修改
说明:配置主要是对 jvm 的参数的修改,机器硬件配置有限,可以根据自己的情况调整
① 在 mysql 中创建 Apache Druid 的数据库
CREATE DATABASE `druid` DEFAULT CHARACTER SET utf8;
CREATE DATABASE `pivot` DEFAULT CHARACTER SET utf8;
② 修改配置文件 piovt/config.yaml
cd /opt/server/imply-3.0.4/conf/pivot
vim config.yaml
stateStore:
type: mysql
location: mysql
connection: 'mysql://root:123456@101.132.183.133:3306/pivot'
③ 修改配置文件 druid/_common/common.runtime.properties
cd /opt/server/imply-3.0.4/conf/druid/_common
vim common.runtime.properties
druid.extensions.loadList=["druid-kafka-indexing-service","mysql-metadata-storage"]
druid.zk.service.host=node1:2181,node2:2181,node3:2181
druid.metadata.storage.type=mysql
druid.metadata.storage.connector.connectURI=jdbc:mysql://101.132.183.133:3306/druid
druid.metadata.storage.connector.user=root
druid.metadata.storage.connector.password=123456
④ 修改配置文件 druid/broker/jvm.config
cd /opt/server/imply-3.0.4/conf/druid/broker
vim jvm.config
-server
-Xms2g
-Xmx2g
-XX:MaxDirectMemorySize=2g
-XX:+ExitOnOutOfMemoryError
-Duser.timezone=UTC+8
-Dfile.encoding=UTF-8
-Djava.io.tmpdir=var/tmp
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
⑤ 修改配置文件 druid/broker/runtime.properties
cd /opt/server/imply-3.0.4/conf/druid/broker
vim runtime.properties
druid.server.http.numThreads=10
druid.broker.http.numConnections=8
druid.processing.buffer.sizeBytes=134217728
⑥ 修改配置文件 druid/coordinator/jvm.config
cd /opt/server/imply-3.0.4/conf/druid/coordinator
vim jvm.config
-Duser.timezone=UTC+8
⑦ 修改配置文件 druid/historical/jvm.config
cd /opt/server/imply-3.0.4/conf/druid/historical
vim jvm.config
-server
-Xms3g
-Xmx3g
-XX:MaxDirectMemorySize=3g
-XX:+ExitOnOutOfMemoryError
-Duser.timezone=UTC+8
-Dfile.encoding=UTF-8
-Djava.io.tmpdir=var/tmp
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
⑧ 修改配置文件 druid/coordinator/runtime.properties
cd /opt/server/imply-3.0.4/conf/druid/historical
vim runtime.properties
druid.server.http.numThreads=10
druid.processing.buffer.sizeBytes=100000000
druid.processing.numThreads=2
⑨ 修改配置文件 druid/middleManager/jvm.config
cd /opt/server/imply-3.0.4/conf/druid/middleManager
vim jvm.config
-Duser.timezone=UTC+8
⑩ 修改配置文件 druid/middleManager/runtime.properties
cd /opt/server/imply-3.0.4/conf/druid/middleManager
vim runtime.properties
druid.indexer.runner.javaOpts=-server -Xmx2g -Duser.timezone=UTC+8 -Dfile.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
druid.server.http.numThreads=10
? 修改配置文件 druid/overlord/jvm.confg
cd /opt/server/imply-3.0.4/conf/druid/overlord
vim jvm.confg
-Duser.timezone=UTC+8
? 修改配置文件 druid/router/jvm.confg
cd /opt/server/imply-3.0.4/conf/druid/router
vim jvm.confg
-Duser.timezone=UTC+8
? 修改配置文件 druid/router/runtime.properties
cd /opt/server/imply-3.0.4/conf/druid/router
vim runtime.properties
druid.router.http.numMaxThreads=10
druid.server.http.numThreads=10
配置分发
① 分发配置文件
上文的配置都是在 node1 节点修改完成,接下来我们只需要将 node1 解压目录整体打包分发到其他节点,然后解压即可
cd /opt/server
tar -zcvf imply.tar.gz ./imply-3.0.4
scp /opt/server/imply.tar.gz node2:$PWD
scp /opt/server/imply.tar.gz node3:$PWD
tar -zxvf imply.tar.gz
② 配置环境变量(3 台都配置)
vim /etc/profile
export DRUID_HOME=/opt/server/imply-3.0.4
source /etc/profile
启动测试
① 启动
/opt/server/imply-3.0.4/bin/supervise -c /opt/server/imply-3.0.4/conf/supervise/master-no-zk.conf --daemonize
/opt/server/imply-3.0.4/bin/supervise -c /opt/server/imply-3.0.4/conf/supervise/data.conf --daemonize
/opt/server/imply-3.0.4/bin/supervise -c /opt/server/imply-3.0.4/conf/supervise/query.conf --daemonize
/opt/server/imply-3.0.4/bin/service --down
② WEB-UI 访问
组件名 | URL |
---|
broker | http://node3:8888 | coordinator、overlord | http://node1:8081/index.html | middleManager、historical | http://node1:8090/console.html |
|