Druid安装-单机

单机版安装

  • 下载安装包
    http://static.druid.io/artifacts/releases/druid-0.9.1.1-bin.tar.gz
  • 安装 
    • 解压缩
      Druid安装-单机

      安装zookeeper

    • curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz -o zookeeper-3.4.6.tar.gz
      tar -xzf zookeeper-3.4.6.tar.gz
      cd zookeeper-3.4.6
      cp conf/zoo_sample.cfg conf/zoo.cfg
      ./bin/zkServer.sh start

      Druid安装-单机

    • 启动不同类型的节点  -切换到druid-0.0.1.1 目录下执行命令

      • 在root 用户下执行
      • 新开5个终端界面进行执行
    • java `cat conf-quickstart/druid/historical/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/historical:lib/*" io.druid.cli.Main server historical
      java `cat conf-quickstart/druid/broker/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/broker:lib/*" io.druid.cli.Main server broker
      java `cat conf-quickstart/druid/coordinator/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/coordinator:lib/*" io.druid.cli.Main server coordinator
      java `cat conf-quickstart/druid/overlord/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/overlord:lib/*" io.druid.cli.Main server overlord
      java `cat conf-quickstart/druid/middleManager/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/middleManager:lib/*" io.druid.cli.Main server middleManager
    • 测试 -新起一个终端 -写入

      curl -X 'POST' -H 'Content-Type:application/json' -d @quickstart/wikiticker-index.json *:8090/druid/indexer/v1/task

      Druid安装-单机

    • console

    • Druid安装-单机

      Druid安装-单机

    • 数据读取 (默认端口为 broker 机器的8082 端口,这个地方我做了部分修改)

      curl -L -H'Content-Type: application/json' -XPOST --data-binary @quickstart/wikiticker-top-pages.json http://*:8085/druid/v2/?pretty

    • Druid安装-单机

上一篇:04 KVC|KVO|Delegate|NSNotification区别


下一篇:centos中安装tomcat6