1、获得相关源码包
http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_Installing_HDP_AMB/content/_obtaining_the_repositories.html在此页面可以获得repo以及离线包的地址
HDP Repository
http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/HDP-2.3.0.0-centos6-rpm.tar.gz
HDP-Utils Repository
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6/HDP-UTILS-1.1.0.20-centos6.tar.gz
Ambari Repository
wget http://public-repo-1.hortonworks.com/ambari/centos6/ambari-2.1.0-centos6.tar.gz
2、配置安装包文件
mkdir -p /var/www/html/external
tar -xvf ./HDP-1.3.0.0-centos6-rpm.tar.gz -C /var/www/html/external/
tar -xvf ./HDP-UTILS-1.1.0.15-centos6-rpm.tar.gz -C /var/www/html/external/
tar -xvf ./ambari-1.2.4.9-centos6.tar.gz -C /var/www/html/external/
3、建立repo并发送到其他节点上
ambari.repo
[ambari-1.x]
name=Ambari 1.x
baseurl=http://ISCASTest01/external/ambari/centos6/1.x/updates/1.2.4.9
gpgcheck=1
gpgkey=http://ISCASTest01/external/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-UTILS-1.1.0.15]
name=Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.15
baseurl=http://ISCASTest01/external/HDP-UTILS-1.1.0.15/repos/centos6
gpgcheck=0
gpgkey=http://ISCASTest01/external/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[Updates-ambari-1.2.4.9]
name=ambari-1.2.4.9 - Updates
baseurl=http://ISCASTest01/external/ambari/centos6/1.x/updates/1.2.4.9
gpgcheck=1
gpgkey=http://ISCASTest01/external/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
hdp.repo
[HDP-1.3.0.0]
name=Hortonworks Data Platform Version - HDP-1.3.0.0
baseurl=http://ISCASTest01/external/HDP/centos6/1.x/GA/1.3.0.0
gpgcheck=1
gpgkey=http://ISCASTest01/external/HDP/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-UTILS-1.1.0.15]
name=Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.15
baseurl=http://ISCASTest01/external/HDP-UTILS-1.1.0.15/repos/centos6
gpgcheck=1
gpgkey=http://ISCASTest01/external/HDP/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
hdp-util.repo
[HDP-UTILS-1.1.0.15]
name=Hortonworks Data Platform Version - HDP-UTILS-1.1.0.15
baseurl= http://ISCASTest01/external/HDP-UTILS-1.1.0.15/repos/centos6
gpgcheck=1
enabled=1
priority=1
注:ISCASTest01为主机域名
scp ambari.repo root@ISCASTest02:/etc/yum.repo.d/
scp hdp.repo root@ISCASTest02:/etc/yum.repo.d/
scp hdp-util.repo root@ISCASTest02:/etc/yum.repo.d/
scp ambari.repo root@ISCASTest03:/etc/yum.repo.d/
scp hdp.repo root@ISCASTest03:/etc/yum.repo.d/
scp hdp-util.repo root@ISCASTest03:/etc/yum.repo.d/
4、安装 Ambari
主节点上
yum install ambari-server
其他节点上
yum install ambari-agent
主节点上
ambari-server start
注:如果出现jdk错误,则可以用这个来将本机的jdk加入到ambari-server中
ambari-server setup -j /usr/java/jdk1.8.0_05/
注:后面/usr/java/jdk1.8.0_05/为你jdk安装路径
5、配置节点之间ssh无密码访问
ssh-keygen
把.ssh/id_rsa.pub复制都其他节点上,运行:
cat id_rsa.pub >> authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
之后可以互相ssh登陆验证一下
6、启动服务后,打开http://localhost:8080,输入用户名和密码都是admin,进去页面,安装其他服务。