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

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

相关推荐
zhixingheyi_tian5 小时前
Spark 之 Aggregate
大数据·分布式·spark
PersistJiao5 小时前
Spark 分布式计算中网络传输和序列化的关系(一)
大数据·网络·spark
宅小海8 小时前
scala String
大数据·开发语言·scala
小白的白是白痴的白8 小时前
11.17 Scala练习:梦想清单管理
大数据
java1234_小锋8 小时前
Elasticsearch是如何实现Master选举的?
大数据·elasticsearch·搜索引擎
JessieZeng aaa11 小时前
CSV文件数据导入hive
数据仓库·hive·hadoop
Java 第一深情12 小时前
零基础入门Flink,掌握基本使用方法
大数据·flink·实时计算
MXsoft61813 小时前
华为服务器(iBMC)硬件监控指标解读
大数据·运维·数据库
PersistJiao13 小时前
Spark 分布式计算中网络传输和序列化的关系(二)
大数据·网络·spark·序列化·分布式计算
九河云13 小时前
如何对AWS进行节省
大数据·云计算·aws