【Bigtop】Ambari2.8.0编译及安装

Ambari2.8.0编译及安装

Ambari2.8.0编译及安装

编译Ambari

安装必要工具:

bash 复制代码
yum -y install gcc-c++ git psutils python-devel rpm-build 

克隆仓库并切换到2.8.0-rc1分支

bash 复制代码
git checkout release-2.8.0-rc1

必须安装3.8.6的mvn,不然会在编译ambari-metrics时报错:

复制代码
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.7.0:copy-dependencies (default) on project ambari-metrics-timelineservice: Excluding every artifact inside 'test' resolution scope means excluding everything: you probably want includeScope='compile', read parameters documentation for detailed explanations -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ambari-metrics-timelineservice

先装个node然后手动做下ambari-admin的依赖安装,防止后面bower依赖安装太久了,版本供参考:

bash 复制代码
[root@ops-3 ~]# npm version
{
  npm: '8.1.2',
  node: '16.13.2',
}

进到admin-web执行下面操作:

bash 复制代码
npm install
npm install -g bower
npm install -g gulp

然后执行bower安装依赖

bash 复制代码
bower install --allow-root

编译整个ambari

bash 复制代码
mvn clean install rpm:rpm -DskipTests -Drat.skip=true

编译Ambari-metrics

手动下载这些然后做本地http服务

xml 复制代码
    <hbase.tar>http://repo.bigtop.apache.org.s3.amazonaws.com/bigtop-stack-binary/3.2.0/centos-7/x86_64/hbase-2.4.13-bin.tar.gz</hbase.tar>
    <hadoop.tar>http://repo.bigtop.apache.org.s3.amazonaws.com/bigtop-stack-binary/3.2.0/centos-7/x86_64/hadoop-3.3.4.tar.gz</hadoop.tar>
    <grafana.tar>https://dl.grafana.com/oss/release/grafana-9.3.2.linux-amd64.tar.gz</grafana.tar>
    <phoenix.tar>http://repo.bigtop.apache.org.s3.amazonaws.com/bigtop-stack-binary/3.2.0/centos-7/x86_64/phoenix-hbase-2.4-5.1.2-bin.tar.gz</phoenix.tar>

改成自己做的本地http,比如:

xml 复制代码
    <hbase.tar>http://172.18.2.31:5000/hbase-2.4.13-bin.tar.gz</hbase.tar>
    <hadoop.tar>http://172.18.2.31:5000/hadoop-3.3.4.tar.gz</hadoop.tar>
    <grafana.tar>http://172.18.2.31:5000/grafana-9.3.2.linux-amd64.tar.gz</grafana.tar>
    <phoenix.tar>http://172.18.2.31:5000/phoenix-hbase-2.4-5.1.2-bin.tar.gz</phoenix.tar>

搭建Ambari

镜像准备

dockerfile 复制代码
FROM centos:centos7.9.2009 

RUN rm -rf /etc/yum.repos.d/*.repo

ADD CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo 
ADD epel.repo /etc/yum.repos.d/
ADD packages/jdk-8u291-linux-x64.rpm /tmp/

RUN yum update -y && yum install --nogpgcheck -y openssh-server \
    net-tools \
    vim \
    wget \
    curl \
    telnet \
    lsb \ 
    redhat-lsb \
    zip \ 
    tar 

CMD ['/usr/sbin/init']

创建3台虚拟机来做安装部署

复制代码
docker run -it -d --privileged=true --name bigdata01 --network bridge --hostname bigdata01 ambari /usr/sbin/init
docker run -it -d --privileged=true --name bigdata02 --network bridge --hostname bigdata02 ambari /usr/sbin/init
docker run -it -d --privileged=true --name bigdata03 --network bridge --hostname bigdata03 ambari /usr/sbin/init

操作前手动把jdk、selinux、防火墙、时间同步这些东西处置好

用createrepo命令创建yum仓库,并配置repo文件:

bash 复制代码
[ambari-2.8.0.0.0]
name=ambari Version - ambari-2.8.0.0.0
baseurl=http://172.18.2.31:9000/2.8.0.0.0/
enabled=1
gpgcheck=0

这里我们自己装了个数据库,没装的话装一下,我们这里用的是PG,导入建表语句:

复制代码
psql -Upostgres -p5832 -h127.0.0.1 -dambari -f Ambari-DDL-Postgres-CREATE.sql 

sql文件可以在ambari-server的/var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql下找到

进行ambari初始化设置

复制代码
ambari-server setup

设置pg驱动

复制代码
ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/local/share/java/postgresql-42.7.4.jar 

启动ambari-server

bash 复制代码
[root@bigdata01 /]# ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start............
Server started listening on 8080

DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.

然后在页面做一下组件的安装即可,这些都是基础,按照页面引导做即可:

相关推荐
SelectDB技术团队4 小时前
天翼云:Apache Doris + Iceberg 超大规模湖仓一体实践
大数据·数据库·iceberg·doris·数据湖·湖仓一体·天翼云
香菜95276 小时前
TikTok账号养成计划:从0到1打造高权重店铺
大数据·网络·经验分享·业界资讯
szxinmai主板定制专家7 小时前
基于FPGA的3U机箱轨道交通网络通讯板,对内和主控板、各类IO板通信,对外可进行RS485、CAN或MVB组网通信
大数据·人工智能·嵌入式硬件·fpga开发·边缘计算
图生生8 小时前
图生生AI修图,用“画面扩充“重构创作想象
大数据·人工智能·ai·ai作画·图生生·ai修图·画面重构
GIS数据转换器9 小时前
北斗+多技术融合地面沉降监测:精准守护城市安全
大数据·人工智能·物联网·无人机·智慧城市
Dragon--Z10 小时前
大数据技术链路详解
大数据
霖0011 小时前
FPGA中级项目4——DDS实现
大数据·经验分享·嵌入式硬件·学习·fpga开发·fpga
星光璀璨山河无恙12 小时前
【Hadoop】Hadoop的简要介绍
大数据·hadoop·分布式
海上彼尚12 小时前
Node.js中使用Elasticsearch
大数据·elasticsearch·node.js
newsxun12 小时前
非洲能源商会:架起中非能源合作的桥梁
大数据·人工智能