【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.

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

相关推荐
wukangjupingbb16 分钟前
数据资产盘点
大数据·人工智能
PLM小助手1 小时前
鼎捷新一代PLM 荣膺维科杯 “2023年度行业优秀产品奖”
java·大数据·前端·人工智能·分布式·低代码·微服务
Lansonli1 小时前
Elasticsearch基础(七):Logstash如何开启死信队列
大数据·elasticsearch·搜索引擎
旗晟机器人2 小时前
《创新电力巡检,机器人铸就安全高效未来》
大数据·人工智能·安全·机器人
电商数据girl2 小时前
B2C电商接口解决方案||搭建电商项目必备电商接口
java·大数据·开发语言·人工智能·后端·json
Casual_Lei2 小时前
比较Spark与Flink
大数据·flink·spark
@Young Cheung3 小时前
Elasticsearch入门安装
大数据·elasticsearch·jenkins
AI服务老曹4 小时前
可对画面进行平台传输,实时查看监控的智慧交通开源了
大数据·人工智能·物联网·开源
Python极客之家4 小时前
基于Python的B站热门视频可视化分析与挖掘系统
大数据·python·数据分析·毕业设计·网络爬虫·线性回归·课程设计
Elastic 中国社区官方博客4 小时前
使用 Elastic 和 LM Studio 的 Herding Llama 3.1
大数据·人工智能·elasticsearch·搜索引擎·ai·语言模型·llama