Ambari【部署 01】最新版本ambari-2.7.7下载编译打包安装使用(踩坑实录)

news2025/3/1 11:55:59

Ambari 官网 本次安装的为当前最新版本 2.7.7 文档 。

1.环境及准备

1.1 环境

# 系统
[root@tcloud ~]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
# JDK
[root@tcloud ~]# java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
# Python
[root@tcloud ~]# python -V
Python 2.7.5

1.2 准备

Note: You need to have tools such as rpm-build tool, brunch, etc. For details on prerequisites, please see Ambari Development.

在这里插入图片描述

  • 安装maven用于构建项目【已从国内镜像下载安装包】
# 1.解压并移动文件
tar -zxvf apache-maven-3.9.1-bin.tar.gz
mv ./apache-maven-3.9.1/ /usr/local/maven

# 2.配置环境变量
cat <<'EOF' > /etc/profile.d/maven.sh
export MAVEN_HOME=/usr/local/maven
export PATH=$PATH:$MAVEN_HOME/bin:$PATH
EOF
# 使配置生效
source /etc/profile.d/maven.sh

# 3.验证安装
mvn -v
# 验证信息
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: /usr/local/maven
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: /usr/local/java/jdk1.8.0_241/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.71.1.el7.x86_64", arch: "amd64", family: "unix"
  • 安装rpmbuild
yum install -y rpm-build
  • 在线安装git
yum install -y git
  • 安装nodejs
yum install -y nodejs
  • 安装npm
yum install -y npm

# 修改npm的地址为国内淘宝镜像
npm config set registry https://registry.npm.taobao.org
  • 安装g++
yum install -y gcc-c++

2.下载安装配置启动

安装步骤保留英文原文,部分步骤添加中文解释。

Step 1: Download and build Ambari 2.7.7 source

# 1.官网指导下载方式
wget https://www-eu.apache.org/dist/ambari/ambari-2.7.7/apache-ambari-2.7.7-src.tar.gz
# 实际在清华大学开源软件镜像站下载
https://mirrors.tuna.tsinghua.edu.cn/

# 2.解压
tar -zxvf apache-ambari-2.7.7-src.tar.gz
# 切换文件夹
cd apache-ambari-2.7.7-src

在这里插入图片描述

# 3.设置新的版本号并构建项目【云服务器用时10分钟多】
mvn versions:set -DnewVersion=2.7.7.0.0

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

# 4.切换到 ambari-metrics 目录下
pushd ambari-metrics
# 构建 ambari-metrics【云服务器用时不到2分钟】
mvn versions:set -DnewVersion=2.7.7.0.0
# 切换到原文件夹
popd

在这里插入图片描述
在这里插入图片描述

# 5.maven 打包项目【云服务器用时】一定要注意执行命令的文件夹
# Re-run Maven using the -X switch to enable full debug logging.
mvn -B clean install rpm:rpm -DnewVersion=2.7.7.0.0 -DbuildNumber=388e072381e71c7755673b7743531c03a4d61be8 -DskipTests -Dpython.ver="python >= 2.6" -X

-Drat.skip=true -Preplaceurl

在这里插入图片描述

打包项目时的问题

  • 无法下载文件【从GIT下载失败 原因就不多说了】
# 报错详情
[INFO] Downloading https://github.com/yarnpkg/yarn/releases/download/v0.23.2/yarn-v0.23.2.tar.gz to /root/.m2/repository/com/github/eirslett/yarn/0.23.2/yarn-0.23.2./yarn-v0.23.2.tar.gz

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:install-node-and-yarn (install node and yarn) on project ambari-web: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v0.23.2/yarn-v0.23.2.tar.gz: Remote host closed connection during handshake: SSL peer shut down incorrectly -> [Help 1]

# 问题解决
# 1.自行下载安装包【浏览器直接输入文件地址即可】
https://github.com/yarnpkg/yarn/releases/download/v0.23.2/yarn-v0.23.2.tar.gz

# 2.放到对应 maven 目录中
/root/.m2/repository/com/github/eirslett/yarn/0.23.2/yarn-0.23.2./yarn-v0.23.2.tar.gz

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 没有许可证字段
# 报错详情
[ERROR] warning Ambari@2.4.0: No license field
[INFO] [1/4] Resolving packages...
[INFO] [2/4] Fetching packages...
[ERROR] warning fsevents@0.3.8: The platform "linux" is incompatible with this module.
[ERROR] warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
[INFO] info "fsevents@0.3.8" is an optional dependency and failed compatibility check. Excluding it from installation.
[INFO] info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[INFO] [3/4] Linking dependencies...
[INFO] [4/4] Building fresh packages...

# 问题解决
# 无需处理耐心等待后续报错
  • 命令执行失败【未解决】
# 报错详情
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (Bower install) on project ambari-admin: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

# 问题解决
# 编辑 .bowerrc 文件
cd ambari-admin/src/main/resources/ui/admin-web
vim .bowerrc
# 修改后
{
    # 原始
    "directory": "app/bower_components"
    # 新增
    ,"allow_root": true
}

# 删除admin-web下的node及node_modules文件夹文件
rm -rf node*
# 清除仓库最后更新文件
find ~/.m2/repository/ -name "*.lastUpdated" -exec rm -rf {} \;

在这里插入图片描述

  • 无法访问git仓库:遇到文件结束【未解决】
# 报错详情
fatal: unable to access 'https://github.com/mochajs/mocha.git/': Encountered end of file

# 关闭代理
git config --global --unset http.proxy
git config --global --unset https.proxy
  • 服务器空回复【未解决】
# 报错详情
bower angular-translate#*                            
ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/PascalPrecht/bower-angular-translate.git", exit code of #128 fatal: unable to access 'https://github.com/PascalPrecht/bower-angular-translate.git/': Empty reply from server

# 加速
git config --global http.proxy 'socks5://127.0.0.1:7890' 
git config --global https.proxy 'socks5://127.0.0.1:7890'
# 问题解决 
# 1.安装bower
npm install bower
# 2.在 ambari-admin/src/main/resources/ui/admin-web/ 下执行
bower install

[root@tcloud admin-web]# npm install bower
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'karma@0.12.16',
npm WARN EBADENGINE   required: { node: '~0.8 || ~0.10' },
npm WARN EBADENGINE   current: { node: 'v16.18.1', npm: '8.19.2' }
npm WARN EBADENGINE }

Step 2: Install Ambari Server

Install the rpm package from ambari-server/target/rpm/ambari-server/RPMS/noarch/

yum install ambari-server*.rpm

Step 3: Setup and Start Ambari Server

Run the setup command to configure your Ambari Server, Database, JDK, LDAP, and other options:

ambari-server setup

Follow the on-screen instructions to proceed.

Once set up is done, start Ambari Server:

ambari-server start

Step 4: Install and Start Ambari Agent on All Hosts

Note: This step needs to be run on all hosts that will be managed by Ambari.

Copy the rpm package from ambari-agent/target/rpm/ambari-agent/RPMS/x86_64/ and run:

yum install ambari-agent*.rpm

Edit /etc/ambari-agent/ambari.ini

...
[server]
hostname=localhost
 
...

Make sure hostname under the [server] section points to the actual Ambari Server host, rather than “localhost”.

ambari-agent start

Step 5: Deploy Cluster using Ambari Web UI

Open up a web browser and go to http://:8080.

Log in with username admin and password admin and follow on-screen instructions. Secure your environment by ensuring your administrator details are changed from the default values as soon as possible.

Under Install Options page, enter the hosts to add to the cluster. Do not supply any SSH key, and check “Perform manual registration on hosts and do not use SSH” and hit “Next”.

3.总结

  • 不同环境进行编译能够保证运行。
  • 编译遇到的问题实在是不少,解决办法只能搜索,有些难以解决。
  • 仅能管理收费版本的Hadoop生态组件。
  • 放弃!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/434539.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

java模板/策略模式打怪兽

模板&策略模式 实现姿势 我们会从简单到复杂&#xff0c;讲解代码正确的实现姿势&#xff0c;分别为最 Low 方式、常规方式、模板模式和策略模式。 最 Low 方式 假如现在有 3 个奥特曼&#xff0c;都喜欢 “训练&#xff0c;飞翔&#xff0c;打怪兽” public class OldTig…

jsp+java自行车租赁租借和买卖系统

自行车租借和买卖系统 系统包括四个模块。1&#xff0c;系统模块&#xff0c;2&#xff0c;车辆管理模块&#xff0c;3.租借车管理模块&#xff0c;4&#xff0c;买卖车管理模块。 1&#xff0c;系统模块包括: 连接数据库&#xff0c;工作人员登录&#xff0c;退出。 2&#…

《类和对象》(中篇)

本文主要介绍类里面的六大默认成员函数 文章目录 前言类的6个默认成员函数1、构造函数1.1 概念1.2 特性 2、析构函数2.1 概念2.2 特性 3 、拷贝构造函数3.1 概念3.2 特性3.3 使用场景 4、运算符重载4.1 规则4.2 赋值运算符重载 5、const 成员6、取地址与const取地址操作符重载总…

Shiro安全框架简介

一、权限管理 1.1 什么是权限管理 基本上只要涉及到用户参数的系统都要进行权限管理&#xff0c;使用权限管理实现了对用户访问系统的控制&#xff0c;不同的用户访问不同的资源。按照安全规则或者安全策略控制用户访问资源&#xff0c;而且只能访问被授权的资源 权限管理包括认…

学成在线笔记+踩坑(1)——项目思路、架构、父工程和基础工程,Gogs使用

【黑马Java笔记踩坑汇总】JavaSEJavaWebSSMSpringBoot瑞吉外卖SpringCloud黑马旅游谷粒商城学成在线牛客面试题 目录 简历-技术架构 项目预览 后台页面 课程管理 媒资管理页面上传视频 新增课程 课程管理页提交审核 审核员审核后发布课程 前台页面 主页 验证码登录…

uniapp系列-超详细教你在uni-app+vue3里通过web-view组件传递信息打开H5页面写入localstorage并解决兼容性

web-view是什么 web-view 是一个 web 浏览器组件&#xff0c;可以用来承载网页的容器&#xff0c;会自动铺满整个页面&#xff08;nvue 使用需要手动指定宽高&#xff09;。点击这里直达官网文档点击这里下载我的代码demo本文最下面还有一些常见或者奇怪问题解决方案哦~ 为什…

GMRES算法及Matlab程序

关于GMRES的总结 一些理论以及代码 首先是我们要解决的问题&#xff0c;也就是最常见的问题&#xff0c;即求解 A x b Axb Axb Galerkin条件 krylov子空间 我们所做的GMRES实际上就是在Galerkin条件的扩张下&#xff0c;n o r m ( r ) normnorm不断减小的一个过程。这也是…

家用洗地机哪种好?性价比高的洗地机推荐

选择清洁家电时&#xff0c;首先需要考虑你需要清洁的区域和清洁的方式。如果你需要清洁的是地面&#xff0c;那么洗地机可能是一个不错的选择。洗地机的优势在于它可以自动清洁地面&#xff0c;并且可以在较短的时间内完成清洁工作。相比于其他的清洁家电&#xff0c;洗地机的…

设计链表(链表篇)

你可以选择使用单链表或者双链表&#xff0c;设计并实现自己的链表。 单链表中的节点应该具备两个属性&#xff1a;val 和 next 。val 是当前节点的值&#xff0c;next 是指向下一个节点的指针/引用。 如果是双向链表&#xff0c;则还需要属性 prev 以指示链表中的上一个节点…

Linux_红帽8学习笔记分享_5

Linux_红帽8学习笔记分享_5 文章目录 Linux_红帽8学习笔记分享_51. UMASK反掩码1.1如何查看反掩码umask1.2 UMASK反掩码的作用1.2.1对于目录来说1.2.2对于文件来说 1.3如何修改UMASK反掩码1.4普通用户反掩码的测试 2.whereis的使用3. SUID权限弥补(主要针对文件,所有者执行位变…

第14章_数据结构与集合源码

第14章_数据结构与集合源码 讲师&#xff1a;尚硅谷-宋红康&#xff08;江湖人称&#xff1a;康师傅&#xff09; 官网&#xff1a;http://www.atguigu.com 本章专题与脉络 1. 数据结构剖析 我们举一个形象的例子来理解数据结构的作用&#xff1a; 战场&#xff1a;程序运行…

认识Object类和深浅拷贝

本文介绍了Object类以及Object类部分方法,toString方法,equals和hashCode方法(重写前和重写后的对比),getClass方法,clone方法,以及拷贝新对象时会出现的深浅拷贝, 内容较长,耗时一天,建议收藏后观看~ Object类和深浅拷贝 一.初识Object类1.Object类接收所有子类实例2.Object类…

【C 字符串】02 常用字符串函数(命令行参数)

Navigator 一、strlen()函数—统计长度二、strcat()函数—拼接三、strncat()函数—strcat()的升级四、strcmp()和strncmp()—比较五、strcpy()和strncpy()—拷贝六、sprintf()函数—合并多个字符串七、其他可能用到的字符串函数八、ctype.h中的字符函数九、把字符串转换为数字十…

(03)基础强化:静态类静态成员,静态构造函数,抽象类抽象成员,值类型和引用类型,Ref

一、静态成员 1、方法重写注意事项 1&#xff09;子类重写父类方法时&#xff0c;必须与父类保持一致的方法签名与返回值类型。即: 方 法名、返回值类型、参数列表都必须保持一致。[访问修饰符也得一致] 2&#xff09;“方法签名”:一般是指…

VScode---visual stdio code快速安装教程(Windows系统)

1.下载VSCode安装包&#xff0c;官网传送门https://code.visualstudio.com/ 选择Windows下的User Installer 64 bit 直接下载速度如果很慢&#xff0c;在浏览器或者下载软件中就可以看到这么一个下载地址了&#xff0c;复制链接地址&#xff08;如下图箭头所指&#xff09;。 …

本节作业之5秒后自动关闭广告、倒计时、发送短信、5秒之后自动跳转页面、获取URL参数数据

本节作业之5秒后自动关闭广告、倒计时、发送短信、5秒之后自动跳转页面、获取URL参数数据 1 5秒后自动关闭广告2 倒计时3 发送短信4 5秒之后自动跳转页面5 获取URL参数数据 1 5秒后自动关闭广告 <!DOCTYPE html> <html lang"en"> <head><meta …

管理系统的前端模板(vue2+Element UI)

目录 前言 一、模板展示图 二、获取的方式及操作运行步骤 &#xff08;一&#xff09;获取方式 &#xff08;二&#xff09;操作步骤 1.下载安装node.js 2.下载完成解压缩后在idea的里面打开终端。 3.输入下载相关依赖的命令 4.运行项目的命令 5.然后把给到的地址…

腾讯云渲染实战

UE使用流渲染技术的主要原因是为了提高渲染效率和降低成本。流渲染技术可以将渲染任务分配到多个计算节点上进行并行处理&#xff0c;从而加快渲染速度。同时&#xff0c;流渲染技术还可以将渲染任务分配到云端进行处理&#xff0c;减少本地计算机的负担&#xff0c;降低成本。…

又一科研利器诞生!能对话的论文阅读器,hammerScholar

文&#xff5c;智商掉了一地 hammerScholar 新升级&#xff0c;用对话式读论文工具提升科研生产力~ 不得不说&#xff0c;自从 AIGC 这个概念出现以来&#xff0c;它极强的内容理解与生成能力也推动着各种生产力工具层出不穷&#xff0c;除了一些浏览器和代码插件以外&#xff…

SpringBoot的Interceptor拦截器的简介和实际使用

拦截器&#xff08;Interceptor&#xff09; 概念&#xff1a;是一种动态拦截方法调用的机制&#xff0c;类似于过滤器。Spring框架中提供的&#xff0c;用来动态拦截控制器方法的执行。 作用&#xff1a;拦截请求&#xff0c;在指定的方法调用前后&#xff0c;根据业务需要执行…