转载请注明出处:http://blog.csdn.net/dongdong9223/article/details/87911390
本文出自【我是干勾鱼的博客】
Ingredients:
Java:Java SE Development Kit 8u162(Oracle Java Archive),Linux下安装JDK修改环境变量
Ambari/HDP:Ambari 2.7.3 Repositories,HDP 3.1.0 Repositories(Apache Ambari-2.7.3.0 Installation,Support Matrix,Hortonworks)
yum install httpd
service httpd start
service httpd status
mkdir -p /var/www/html/ambari
因为需要安装的文件较多,这里多创建了1级目录:ambari。
访问Obtaining Public Repositories来获取。
Ambari Repositories:
wget -c http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.3.0/ambari-2.7.3.0-centos7.tar.gz
HDP 3.1.0 Repositories:
HDP:
wget -c http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.0.0/HDP-3.1.0.0-centos7-rpm.tar.gz
HDP-UTILS:
wget -c 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:
wget -c http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.1.0.0/HDP-GPL-3.1.0.0-centos7-gpl.tar.gz
所有文件放入mirror server的仓库目录:
/var/www/html/ambari
并解压缩。
确保mirror server可以通过互联网被访问,比如目录:
http://shizhi004/ambari/
注意! 这一步的配置需要在所有3台服务器上都进行。
Ambari Repo File:
wget -c http://public-repo-1.hortonworks.com/ambari/amazonlinux2/2.x/updates/2.7.3.0/ambari.repo
HDP Repo File:
wget -c http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.0.0/hdp.repo
HDP-GPL Repo File:
wget -c http://public-repo-1.hortonworks.com/HDP-GPL/amazonlinux2/3.x/updates/3.1.0.0/hdp.gpl.repo
#VERSION_NUMBER=2.7.3.0-139
[ambari-2.7.3.0]
name=ambari Version - ambari-2.7.3.0
baseurl=http://shizhi004/ambari/ambari/centos7/2.7.3.0-139/
gpgcheck=1
gpgkey=http://shizhi004/ambari/ambari/centos7/2.7.3.0-139/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
#VERSION_NUMBER=3.1.0.0-78
[HDP-3.1]
name=HDP Version - HDP-3.1
baseurl=http://shizhi004/ambari/HDP/centos7/3.1.0.0-78/
gpgcheck=1
gpgkey=http://shizhi004/ambari/HDP/centos7/3.1.0.0-78/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://shizhi004/ambari/HDP-UTILS/centos7/1.1.0.22/
gpgcheck=1
gpgkey=http://shizhi004/ambari/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
注意! 版本这里要将默认的 [HDP-3.1.0.0] 改成 [HDP-3.1],否则安装的时候会报找不到安装文件mirror的错误!
#VERSION_NUMBER=3.1.0.0-78
[HDP-GPL-3.1.0.0]
name=HDP-GPL Version - HDP-GPL-3.1.0.0
baseurl=http://shizhi004/ambari/HDP-GPL/centos7/3.1.0.0-78/
gpgcheck=1
gpgkey=http://shizhi004/ambari/HDP-GPL/centos7/3.1.0.0-78/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
yum clean all
yum makecache
yum repolist
这时候执行的yum repolist命令可能看到的结果如下:
[root@shizhi004 yum.repos.d]# yum repolist
已加载插件:fastestmirror, priorities
Loading mirror speeds from cached hostfile
16 packages excluded due to repository priority protections
源标识 源名称 状态
HDP-3.1 HDP Version - HDP-3.1 201
HDP-GPL-3.1.0.0 HDP-GPL Version - HDP-GPL-3.1.0.0 4
HDP-UTILS-1.1.0.22 HDP-UTILS Version - HDP-UTILS-1.1.0.22 16
ambari-2.7.3.0 ambari Version - ambari-2.7.3.0 13
base/7/x86_64 CentOS-7 10,015+4
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,890+12
extras/7/x86_64 CentOS-7 371
updates/7/x86_64 CentOS-7 1,098
repolist: 24,608
说明可以识别到mirror server上面的所有tarball了。
九阴真经Ambari——1.熟悉Hortonworks官网结构并找到Ambari下载地址
九阴真经Ambari——2.基础环境准备
九阴真经Ambari——3.安装并配置MariaDB
Chapter 2. Using a Local Repository
Chapter 3. Obtaining Public Repositories