ambari+ bigtop 编译、打包、部署步骤总览
1 ambari + bigtop 构建大数据基础平台
1.1 参考:
- https://blog.csdn.net/qq_42896460/article/details/132717278
- Ambari+Metrics+Bigtop 全家桶编译部署攻略——Ambari系列(ambari 2.8.0+centos 7.9 +bigtop 3.3.0) https://blog.csdn.net/qq_18730505/article/details/136968967
- 对ambari做二次开发:https://www.zhihu.com/question/62343277/answer/2211340398
- Ambari自定义服务集成实战(全):
- ambari二次开发知识库:https://www.yuque.com/create17/ambari
- ambari:
- bigtop:https://gitee.com/piaolingzxh/bigtop.git
- QQ群:ambari+bigtop精华文章
- 系列文章1:
- BigTop3.2.0 大数据组件编译--基础环境准备:https://blog.51cto.com/u_15670647/6179237
- ambari2.8.0+bigtop3.2.0发行版大数据平台编译指南:https://blog.51cto.com/u_15670647/6179238
- Ambari+Bigtop大数据平台安装部署指南(Centos7)一:https://blog.51cto.com/u_15670647/6181593
- 系列文章2
- CentOS内网yum源构建&使用最佳实践:https://blog.csdn.net/m0_48319997/article/details/127972654
- Ambari3.0.0+BigTop3.2.0 SNAPSHOT初体验:https://blog.csdn.net/m0_48319997/article/details/127998559
- ambari2.8.0+bigtop3.2.0部署环境准备教程::https://blog.csdn.net/m0_48319997/article/details/130069050
- ambari2.8.0+bigtop3.2.0发行版大数据平台编译指南:https://blog.csdn.net/m0_48319997/article/details/130046296
- BigTop3.2.0 大数据组件编译--组件编译:https://blog.csdn.net/m0_48319997/article/details/128101667
- Ambari+Bigtop大数据平台安装部署指南(Centos7)一:https://blog.csdn.net/m0_48319997/article/details/130069050
- Ambari+Bigtop大数据平台安装部署指南(Centos7)二:https://blog.csdn.net/m0_48319997/article/details/130233526
- 资源:
- ambari2.8.0+bigtop3.2.0编译好的组件:https://www.aliyundrive.com/s/VrNpPyDqthd
- Ambari2.8.0+Metrics3.0.0+Bigtop3.2.0编译包,所有组件均验证可正常部署,自行下载。链接: https://pan.baidu.com/s/1_SmkYn7aTKNt1w15irLDSQ 提取码: ep12 永久有效
- ambari2.8.0-麒麟v10-rpm包,只有ambari无bigtop。:链接:https://pan.baidu.com/s/1V2zGngqUwcoWroB_NL71zg 提取码:nqgq
- 系列文章1:
1.2 参考
amabri
bigtop
- Apache Bigtop再论与卖书求生存:https://blog.51cto.com/slaytanic/1887685
打包部署
- Ambari+Bigtop大数据平台安装部署指南(Centos7)一:https://blog.csdn.net/m0_48319997/article/details/130069050
- Ambari+Bigtop大数据平台安装部署指南(Centos7)二:https://blog.csdn.net/m0_48319997/article/details/130233526
2 ambari+bigtop编译、打包、部署
操作步骤
- 时间:2024-07-18
- 环境准备:
- 系统centos7
- yum源
- 系统基础组件
- 防火墙、selinux设置、句柄数,时区
- java、scala、maven、gradle、ant、nodejs、环境配置
- 编译步骤:
- 编译ambari:最新分支branch-2.8
- 编译ambari-metrics:最新分支branch-3.0
- 编译bigtop:最新分支barnch-3.3,此处采用branch-3.2
- 打包:将以下文件copy到目标目录
- ambari-server(ambari)
- ambari-agent(ambari)
- ambari-metrics-collector(ambari-metrics)
- ambari-metrics-grafana(ambari-metrics)
- ambari-metrics-hadoop-sink(ambari-metrics)
- ambari-metrics-monitor(ambari-metrics)
- bigtop打包出来的大数据组件(bigtop)
- ambari+bigtop部署
- 服务器准备:4c-16G-60G三台
- 环境检查:操作系统、默认语言、时区、机器名、域名解析、网络、防火墙关闭、selinux关闭、limits句柄数、禁用交换分区、unmask设置、磁盘挂载
- 基础设置:免密、基础软件、ntp服务、离线镜像源+httpd服务,
- 数据库安装、ambari元数据库配置
- 创建并配置bigtop的yum源
- 安装启动ambari-server,初始化(生成表)
2.0 基础环境准备
2.1 ambari编译
2.2 ambari-metrics编译
2.3 bigtop编译
2.4 制作发版镜像
#创建bdp3.2文件夹-所有rpm包将都拷贝到这个文件夹
mkdir -p bdp3.2
#将ambari包拷贝
mkdir -p bdp3.2/ambari # 存放ambari项目打包出来的rpm包
cp ambari/ambari-server/target/rpm/ambari-server/RPMS/x86_64/ambari-server-2.8.0.0-0.x86_64.rpm bdp3.2/ambari/
cp ambari/ambari-agent/target/rpm/ambari-agent/RPMS/x86_64/ambari-agent-2.8.0.0-0.x86_64.rpm bdp3.2/ambari/
#将ambari-metrics包拷贝,# 存放ambari-metrics项目打包出来的rpm包
mkdir -p bdp3.2/ambari-metrics
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-collector/RPMS/x86_64/ambari-metrics-collector-3.0.1-1.x86_64.rpm bdp3.2/ambari-metrics/
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-grafana/RPMS/x86_64/ambari-metrics-grafana-3.0.1-1.x86_64.rpm bdp3.2/ambari-metrics/
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-hadoop-sink/RPMS/x86_64/ambari-metrics-hadoop-sink-3.0.1-1.x86_64.rpm bdp3.2/ambari-metrics/
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-monitor/RPMS/x86_64/ambari-metrics-monitor-3.0.1-1.x86_64.rpm bdp3.2/ambari-metrics/
#将bigtop包拷贝
mkdir -p bdp3.2/bigtop-3.2.1 # 存放bigtop项目打包出来的rpm包
cp -r bigtop/output/* bdp3.2/bigtop-3.2.1
# 制作镜像源,在bdp3.2 目录下生成repodata(也可以将文件拷贝到安装位置后,再制作镜像源)
createrepo bdp3.2/
# bdp3.2.tar.gz,将是最终发版的包
tar zcvf bdp3.2.tar.gz bdp3.2
# yum源模板
vim ambari.repo #必须是此文件名,安装ambari-agent时,界面有检查项
# BIGOP-3.2.1 必须是固定字符串,大写。ambari安装大数据组件时,有检查项,否则找不到数据源,3.2.1 是bigtop.bom 中的base_version
# http://172.16.76.107/chdp3.2 替换成自己的地址,确保访问地址后,能看到上边ambari,ambari-metrics,bigtop-3.2.1 这三个目录
[BIGOP-3.2.1]
name=BIGOP-3.2.1
baseurl=http://172.16.76.107/bdp3.2
failovermethod=priority
enabled=1
gpgcheck=0
2.5 使用镜像|镜像测试
搭建yum源服务器
#将bdp3.2.tar.gz 复制到目标服务器
tar zxfv bdp3.2.tar.gz
ln -s /to/your/path/bdp3.2 /var/wwww/html
systemctl restart httpd # 重启httpd服务
systemctl enable httpd.service # 开机自启
访问:http://${yum_hosts}/bdp3.2, 查看根目录下是否有ambari,ambari-metrics,bigtop-3.2.1,repodata四个文件夹
客户机访问bdp3.2的yum源
1)客户机添加yum源
vim /etc/yum.repos.d/ambari.repo # 内容参考上边的yum源模板
[BIGOP-3.2.1]
name=BIGOP-3.2.1
baseurl=http://172.16.76.107/bdp3.2 ## 请替换此处IP
failovermethod=priority
enabled=1
gpgcheck=0
2)客户机刷新yum缓存(务必执行此操作,否则安装时不会报错,也安装不上)
yum clean all
yum makecache
3)查看是否能够访问bdp3.2上的安装包,
yum search ambari-server
4)查看bigtop源下的包有哪些(注意,若是只有两三个,可以去掉wc -l,看一下是具体那几个)
/usr/bin/yum list available --showduplicates --disablerepo=* --enablerepo=BIGTOP-3.2.0 |wc -l
/usr/bin/yum list available --showduplicates --disablerepo=* --enablerepo=BIGTOP-3.2.1 |wc -l
bdp3.2 压缩包文件结构预览
bdp3.2/
├── ambari
│ └── x86_64
│ ├── ambari-agent-2.8.0.0-0.x86_64.rpm
│ └── ambari-server-2.8.0.0-0.x86_64.rpm
├── ambari-metrics
│ └── x86_64
│ ├── ambari-metrics-collector-3.0.1-1.x86_64.rpm
│ ├── ambari-metrics-grafana-3.0.1-1.x86_64.rpm
│ ├── ambari-metrics-hadoop-sink-3.0.1-1.x86_64.rpm
│ └── ambari-metrics-monitor-3.0.1-1.x86_64.rpm
├── bigtop3.2.1
│ ├── bigtop-ambari-mpack
│ │ ├── bigtop-ambari-mpack-2.7.5.0-1.el7.src.rpm
│ │ └── noarch
│ │ └── bigtop-ambari-mpack-2.7.5.0-1.el7.noarch.rpm
│ ├── bigtop-groovy
│ │ ├── bigtop-groovy-2.5.4-1.el7.src.rpm
│ │ └── noarch
│ │ └── bigtop-groovy-2.5.4-1.el7.noarch.rpm
│ ├── bigtop-jsvc
│ │ ├── bigtop-jsvc-1.2.4-1.el7.src.rpm
│ │ └── x86_64
│ │ ├── bigtop-jsvc-1.2.4-1.el7.x86_64.rpm
│ │ └── bigtop-jsvc-debuginfo-1.2.4-1.el7.x86_64.rpm
│ ├── bigtop-select
│ │ ├── bigtop-select-3.2.1-1.el7.src.rpm
│ │ └── noarch
│ │ └── bigtop-select-3.2.1-1.el7.noarch.rpm
│ ├── bigtop-utils
│ │ ├── bigtop-utils-3.2.1-1.el7.src.rpm
│ │ └── noarch
│ │ └── bigtop-utils-3.2.1-1.el7.noarch.rpm
│ ├── flink
│ │ ├── flink_3_2_1-1.15.3-1.el7.src.rpm
│ │ └── noarch
│ │ ├── flink_3_2_1-1.15.3-1.el7.noarch.rpm
│ │ ├── flink_3_2_1-jobmanager-1.15.3-1.el7.noarch.rpm
│ │ └── flink_3_2_1-taskmanager-1.15.3-1.el7.noarch.rpm
│ ├── hadoop
│ │ ├── hadoop_3_2_1-3.3.6-1.el7.src.rpm
│ │ └── x86_64
│ │ ├── hadoop_3_2_1-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-client-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-conf-pseudo-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-debuginfo-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-doc-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-datanode-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-dfsrouter-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-fuse-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-journalnode-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-namenode-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-secondarynamenode-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-hdfs-zkfc-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-httpfs-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-kms-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-libhdfs-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-libhdfs-devel-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-libhdfspp-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-libhdfspp-devel-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-mapreduce-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-mapreduce-historyserver-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-yarn-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-yarn-nodemanager-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-yarn-proxyserver-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-yarn-resourcemanager-3.3.6-1.el7.x86_64.rpm
│ │ ├── hadoop_3_2_1-yarn-router-3.3.6-1.el7.x86_64.rpm
│ │ └── hadoop_3_2_1-yarn-timelineserver-3.3.6-1.el7.x86_64.rpm
│ ├── hbase
│ │ ├── hbase_3_2_1-2.4.17-1.el7.src.rpm
│ │ ├── noarch
│ │ │ └── hbase_3_2_1-doc-2.4.17-1.el7.noarch.rpm
│ │ └── x86_64
│ │ ├── hbase_3_2_1-2.4.17-1.el7.x86_64.rpm
│ │ ├── hbase_3_2_1-master-2.4.17-1.el7.x86_64.rpm
│ │ ├── hbase_3_2_1-regionserver-2.4.17-1.el7.x86_64.rpm
│ │ ├── hbase_3_2_1-rest-2.4.17-1.el7.x86_64.rpm
│ │ ├── hbase_3_2_1-thrift2-2.4.17-1.el7.x86_64.rpm
│ │ └── hbase_3_2_1-thrift-2.4.17-1.el7.x86_64.rpm
│ ├── hive
│ │ ├── hive_3_2_1-3.1.3-1.el7.src.rpm
│ │ └── noarch
│ │ ├── hive_3_2_1-3.1.3-1.el7.noarch.rpm
│ │ ├── hive_3_2_1-hbase-3.1.3-1.el7.noarch.rpm
│ │ ├── hive_3_2_1-hcatalog-3.1.3-1.el7.noarch.rpm
│ │ ├── hive_3_2_1-hcatalog-server-3.1.3-1.el7.noarch.rpm
│ │ ├── hive_3_2_1-jdbc-3.1.3-1.el7.noarch.rpm
│ │ ├── hive_3_2_1-metastore-3.1.3-1.el7.noarch.rpm
│ │ ├── hive_3_2_1-server2-3.1.3-1.el7.noarch.rpm
│ │ ├── hive_3_2_1-webhcat-3.1.3-1.el7.noarch.rpm
│ │ └── hive_3_2_1-webhcat-server-3.1.3-1.el7.noarch.rpm
│ ├── kafka
│ │ ├── kafka_3_2_1-2.8.2-1.el7.src.rpm
│ │ └── noarch
│ │ ├── kafka_3_2_1-2.8.2-1.el7.noarch.rpm
│ │ └── kafka_3_2_1-server-2.8.2-1.el7.noarch.rpm
│ ├── phoenix
│ │ ├── noarch
│ │ │ └── phoenix-5.1.3-1.el7.noarch.rpm
│ │ └── phoenix-5.1.3-1.el7.src.rpm
│ ├── solr
│ │ ├── noarch
│ │ │ ├── solr_3_2_1-8.11.2-1.el7.noarch.rpm
│ │ │ ├── solr_3_2_1-doc-8.11.2-1.el7.noarch.rpm
│ │ │ └── solr_3_2_1-server-8.11.2-1.el7.noarch.rpm
│ │ └── solr_3_2_1-8.11.2-1.el7.src.rpm
│ ├── spark
│ │ ├── noarch
│ │ │ ├── spark_3_2_1-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-core-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-datanucleus-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-external-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-history-server-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-master-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-python-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-sparkr-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-thriftserver-3.2.3-1.el7.noarch.rpm
│ │ │ ├── spark_3_2_1-worker-3.2.3-1.el7.noarch.rpm
│ │ │ └── spark_3_2_1-yarn-shuffle-3.2.3-1.el7.noarch.rpm
│ │ └── spark_3_2_1-3.2.3-1.el7.src.rpm
│ ├── tez
│ │ ├── noarch
│ │ │ └── tez_3_2_1-0.10.2-1.el7.noarch.rpm
│ │ └── tez_3_2_1-0.10.2-1.el7.src.rpm
│ └── zookeeper
│ ├── x86_64
│ │ ├── zookeeper_3_2_1-3.6.4-1.el7.x86_64.rpm
│ │ ├── zookeeper_3_2_1-debuginfo-3.6.4-1.el7.x86_64.rpm
│ │ ├── zookeeper_3_2_1-native-3.6.4-1.el7.x86_64.rpm
│ │ ├── zookeeper_3_2_1-rest-3.6.4-1.el7.x86_64.rpm
│ │ └── zookeeper_3_2_1-server-3.6.4-1.el7.x86_64.rpm
│ └── zookeeper_3_2_1-3.6.4-1.el7.src.rpm
└── repodata
├── 15cc6a5320a9f6e38cda7b8ec54e7e28ed527df25ee6f56c1bf20cfa421dfe73-other.sqlite.bz2
├── 1a5c0f03d6edae3170255a282d113afe9b22f654f246ea308f162e14234cf5f8-filelists.sqlite.bz2
├── 28cb1ff79328b8ebeaa55021078984e8da908081b0b389e4037d9b1e5854ae22-primary.xml.gz
├── 5066ad167311131c46e983c0d66c4901b92a4e862b11aff3492f02f90ec2eb36-other.xml.gz
├── 617177ba2b017e6e6b4a62b157fe3441ea97b74455d60792e78471f938b86cb8-filelists.xml.gz
├── 7ea377d3a0b59ffaaef9661cb7dd3f2144bd7bc27da1a11070b6d78d5116dddd-primary.sqlite.bz2
└── repomd.xml
37 directories, 103 files
2.6 ambari 安装
-
- 找一台机子搭建yum源,参考搭建yum源服务器
-
- 找一台机子配置yum源,安装ambari-server,参考客户机访问bdp3.2的yum源。
- 安装过程参考大神文档:
- Ambari+Bigtop大数据平台安装部署指南(Centos7)一:https://blog.csdn.net/m0_48319997/article/details/130069050
- Ambari+Bigtop大数据平台安装部署指南(Centos7)二:https://blog.csdn.net/m0_48319997/article/details/130233526
安装中可能出现的问题及解决方案
- 问题1:yum install ambari-server后出现以下日志,软件没有安装成功,也没有任何反应
- 解决方案:yum clean all && yum makecache
Loaded plugins:aliases,changelog,fastestmirror, kabi, langpacks, tmprepo, verify, versionlock
Loading support for RedHat kernel ABI
- 问题2:yum源配置
/etc/yum.repos.d/ambari.repo (必须为此名称,安装过程有校验)
[BIGTOP-3.2.1] # 必须为此名称,和ambari-server中的配置一致,包含大小写,下一行同理
name=BIGTOP-3.2.1
baseurl=http://192.168.76.107/chdp3.2
failovermethod=priority
enabled=1
gpgcheck=0