Ambari 的安装
Contents
[TOC]
因为各种原因,如果直接用Ambari
的官方包进行安装时,速度会极慢,而官方本身也是支持离线安装的。所以,本文使用离线安装的方式。
一、下载离线包
离线包的地址可以在官网找到:Ambari
Ambari 2.7.4:http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.4.0/ambari-2.7.4.0-centos7.tar.gz
HDP-3.1.4.0:
HDP:http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.0/HDP-3.1.4.0-centos7-rpm.tar.gz
HDP-UTILS:http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz
HDP-GPL:http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.1.4.0/HDP-GPL-3.1.4.0-centos7-gpl.tar.gz
|
|
二、安装 Nginx,并搭建本地源
主要通过docker
来进行搭建,快捷。
|
|
配置文件.env
:
|
|
nginx 配置
在nginx.conf
中,http
字段添加:
|
|
添加defaul.conf
文件到conf.d
文件夹中:
|
|
解压下载好的离线包
|
|
三、配置本地 Repo
-
下载相关工具
1 2 3
yum install -y yum-utils yum repolist yum install -y createrepo wget
-
配置 Ambari Repo
1 2
// 下载2.7.4.0版本的ambari.repo # wget -O /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.4.0/ambari.repo
-
修改
ambari.repo
文件将
baseurl
替换成我们自己Nginx
搭建的地址,这里注意,先自己访问一下地址,可能路径名称有些不一样。1 2 3 4 5 6 7 8 9
#VERSION_NUMBER=2.7.4.0-118 [ambari-2.7.4.0] #json.url = http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json name=ambari Version - ambari-2.7.4.0 baseurl=http://192.168.200.20/ambari/centos7/2.7.4.0-118/ gpgcheck=1 gpgkey=http://192.168.200.20/ambari/centos7/2.7.4.0-118/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins enabled=1 priority=1
-
修改
hdp.repo
文件同样的,下载并修改
hdp.repo
文件。1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#VERSION_NUMBER=3.1.4.0-315 [HDP-3.1.4.0-315] name=HDP Version - HDP-3.1.4.0-315 baseurl=http://192.168.200.20/HDP/centos7 gpgcheck=1 gpgkey=http://192.168.200.20/HDP/centos7/3.1.4.0-315/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins enabled=1 priority=1 [HDP-UTILS-1.1.0.22] name=HDP-UTILS Version - HDP-UTILS-1.1.0.22 baseurl=http://192.168.200.20/HDP-UTILS/ gpgcheck=1 gpgkey=http://192.168.200.20/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins enabled=1 priority=1
-
生成本地源
1 2
createrepo /psth_to_ambari/HDP/centos7/ createrepo /psth_to_ambari/HDP-UTILS/
Elasticsearch
https://github.com/steven-dfheinz/dfhz_elk_mpack
遇到问题
1. getpwuid() Error
提示: 如果安装配置用户时,出现如下报错: ERROR: Unexpected error ‘getpwuid(): uid not found: 1001’
可以查看ambari.repo文件的权限,修改为默认的root 644权限即可。
2. Elasticsearch
对ambari-server
执行命令:
|
|