Druid1.7.0在CentOS7.7源码编译

Druid1.7.0在CentOS7.7源码编译

Druid是一个为在大数据集之上做实时统计分析而设计的开源数据存储。这个系统集合了一个面向列存储的层,一个分布式、shared-nothing的架构,和一个高级的索引结构,来达成在秒级以内对十亿行级别的表进行任意的探索分析。

编译平台环境

个人准备了一台Centos7的Linux服务器,X86 64位操作系统,最小化安装。静态IP:192.168.0.150(itdeer)

系统检查

[root@itdeer ~]# cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)

[root@itdeer ~]# uname -a
Linux itdeer 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

创建用户

创建一个itdeer的用户,用来编译

[root@itdeer ~]# adduser itdeer

[root@itdeer ~]$ su - itdeer

依赖软件安装

[1] JDK (JDK 8, 8u92+)

需要提前安装好JDK,安装JDK可以参考JDK在Centos7.2的安装配置

[2] Maven(3.x)

安装Maven,可以参考 Linux下安装Maven

[3] Node

安装Node,可以参考NodeJS在Centos7.2上的安装

[4] Python3安装

安装Python3,可以参考Python3源码编译

编译

[1] 下载解压源码

[itdeer@study ~]$ cd /opt/
[itdeer@study opt]$ wget https://github.com/apache/druid/archive/druid-0.17.0.tar.gz


[itdeer@study opt]$ tar -zxvf druid-0.17.0.tar.gz

[itdeer@study opt]$ cd druid-druid-0.17.0

[2] 编译


[itdeer@study druid-druid-0.17.0]$ mvn clean install -Pdist -DskipTests -Dmaven.compile.fork=true -Dmaven.test.skip=true -Dcheckstyle.skip

-Pdist                      打出二进制包
-DskipTests                 跳过测试
-Dmaven.compile.fork=true   多核编译
-Dcheckstyle.skip           不检查代码的格式

[3] 编译完成

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Druid 0.17.0:
[INFO] 
[INFO] Druid .............................................. SUCCESS [ 11.655 s]
[INFO] druid-core ......................................... SUCCESS [01:19 min]
[INFO] druid-hll .......................................... SUCCESS [  9.901 s]
[INFO] extendedset ........................................ SUCCESS [  9.617 s]
[INFO] druid-processing ................................... SUCCESS [01:52 min]
[INFO] druid-aws-common ................................... SUCCESS [  7.954 s]
[INFO] druid-gcp-common ................................... SUCCESS [  7.578 s]
[INFO] druid-console ...................................... SUCCESS [06:21 min]
[INFO] druid-server ....................................... SUCCESS [01:10 min]
[INFO] druid-indexing-hadoop .............................. SUCCESS [ 58.934 s]
[INFO] druid-indexing-service ............................. SUCCESS [ 53.180 s]
[INFO] druid-sql .......................................... SUCCESS [ 31.016 s]
[INFO] druid-services ..................................... SUCCESS [ 53.256 s]
[INFO] druid-s3-extensions ................................ SUCCESS [ 10.066 s]
[INFO] druid-datasketches ................................. SUCCESS [ 17.429 s]
[INFO] druid-histogram .................................... SUCCESS [ 14.596 s]
[INFO] mysql-metadata-storage ............................. SUCCESS [  9.101 s]
[INFO] druid-kafka-indexing-service ....................... SUCCESS [ 19.698 s]
[INFO] druid-basic-security ............................... SUCCESS [ 15.904 s]
[INFO] druid-lookups-cached-global ........................ SUCCESS [ 11.975 s]
[INFO] simple-client-sslcontext ........................... SUCCESS [  8.973 s]
[INFO] druid-integration-tests ............................ SUCCESS [ 14.790 s]
[INFO] druid-benchmarks ................................... SUCCESS [01:09 min]
[INFO] druid-avro-extensions .............................. SUCCESS [ 16.124 s]
[INFO] druid-bloom-filter ................................. SUCCESS [ 13.264 s]
[INFO] druid-kerberos ..................................... SUCCESS [ 10.199 s]
[INFO] druid-hdfs-storage ................................. SUCCESS [ 12.855 s]
[INFO] druid-stats ........................................ SUCCESS [ 14.486 s]
[INFO] druid-kafka-extraction-namespace ................... SUCCESS [ 10.980 s]
[INFO] druid-kinesis-indexing-service ..................... SUCCESS [ 18.595 s]
[INFO] druid-orc-extensions ............................... SUCCESS [ 12.400 s]
[INFO] druid-parquet-extensions ........................... SUCCESS [ 13.060 s]
[INFO] postgresql-metadata-storage ........................ SUCCESS [  9.308 s]
[INFO] druid-protobuf-extensions .......................... SUCCESS [ 10.989 s]
[INFO] druid-lookups-cached-single ........................ SUCCESS [ 10.654 s]
[INFO] druid-ec2-extensions ............................... SUCCESS [ 10.300 s]
[INFO] druid-google-extensions ............................ SUCCESS [  7.722 s]
[INFO] druid-influx-extensions ............................ SUCCESS [  6.498 s]
[INFO] druid-azure-extensions ............................. SUCCESS [  7.467 s]
[INFO] druid-cassandra-storage ............................ SUCCESS [  6.494 s]
[INFO] dropwizard-emitter ................................. SUCCESS [  9.348 s]
[INFO] druid-cloudfiles-extensions ........................ SUCCESS [  7.530 s]
[INFO] graphite-emitter ................................... SUCCESS [ 11.279 s]
[INFO] druid-distinctcount ................................ SUCCESS [  7.010 s]
[INFO] statsd-emitter ..................................... SUCCESS [  6.976 s]
[INFO] druid-time-min-max ................................. SUCCESS [  7.317 s]
[INFO] druid-virtual-columns .............................. SUCCESS [  7.026 s]
[INFO] druid-thrift-extensions ............................ SUCCESS [ 14.569 s]
[INFO] ambari-metrics-emitter ............................. SUCCESS [  9.034 s]
[INFO] sqlserver-metadata-storage ......................... SUCCESS [  9.256 s]
[INFO] kafka-emitter ...................................... SUCCESS [  7.079 s]
[INFO] druid-redis-cache .................................. SUCCESS [  9.446 s]
[INFO] druid-opentsdb-emitter ............................. SUCCESS [  9.317 s]
[INFO] materialized-view-maintenance ...................... SUCCESS [  9.991 s]
[INFO] materialized-view-selection ........................ SUCCESS [ 10.142 s]
[INFO] druid-momentsketch ................................. SUCCESS [  7.621 s]
[INFO] druid-moving-average-query ......................... SUCCESS [ 12.370 s]
[INFO] tdigestsketch ...................................... SUCCESS [ 11.191 s]
[INFO] druid-influxdb-emitter ............................. SUCCESS [  7.081 s]
[INFO] distribution ....................................... SUCCESS [02:38 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  26:44 min
[INFO] Finished at: 2020-02-18T19:23:46+08:00
[INFO] ------------------------------------------------------------------------

问题

[1] 问题1

描述(下载linux-x64-64_binding.node下载不下来)

[INFO] druid-console ...................................... FAILURE [06:02 min]

解决方式

找到编译过程中输出的下载路径,自己从网上下载一个包或者找一个相同的包,上传到服务器上

npm的缓存目录在
/home/itdeer/.npm/node-sass/下

把linux-x64-64_binding.node放到/home/itdeer/.npm/node-sass/4.12.0/下

如下:/home/itdeer/.npm/node-sass/4.12.0/linux-x64-64_binding.node

[2] 问题2

描述(pip安装软件出现ssl不支持问题)

[itdeer@itdeer distribution]$ pip3 install pyyaml
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pyyaml==5.3
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyyaml/

解决方式

编译Python3的时候需要加入支持ssl,参考Python3安装扩展
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 213,711评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,079评论 3 387
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 159,194评论 0 349
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,089评论 1 286
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,197评论 6 385
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,306评论 1 292
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,338评论 3 412
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,119评论 0 269
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,541评论 1 306
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,846评论 2 328
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,014评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,694评论 4 337
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,322评论 3 318
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,026评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,257评论 1 267
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,863评论 2 365
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,895评论 2 351

推荐阅读更多精彩内容