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

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

相关推荐
Data跳动4 小时前
Spark内存都消耗在哪里了?
大数据·分布式·spark
woshiabc1115 小时前
windows安装Elasticsearch及增删改查操作
大数据·elasticsearch·搜索引擎
lucky_syq5 小时前
Saprk和Flink的区别
大数据·flink
lucky_syq5 小时前
流式处理,为什么Flink比Spark Streaming好?
大数据·flink·spark
袋鼠云数栈5 小时前
深入浅出Flink CEP丨如何通过Flink SQL作业动态更新Flink CEP作业
大数据
清平乐的技术专栏5 小时前
Hive SQL 查询所有函数
hive·hadoop·sql
小白学大数据6 小时前
如何使用Selenium处理JavaScript动态加载的内容?
大数据·javascript·爬虫·selenium·测试工具
15年网络推广青哥7 小时前
国际抖音TikTok矩阵运营的关键要素有哪些?
大数据·人工智能·矩阵
节点。csn7 小时前
Hadoop yarn安装
大数据·hadoop·分布式
不惑_8 小时前
小白入门 · 腾讯云轻量服务器部署 Hadoop 3.3.6
服务器·hadoop·腾讯云