1安装 Apache HTTP 服务器:允许 http 服务通过防火墙(永久)。
[root@localhost ~]# yum install httpd
[root@localhost ~]# firewall-cmd --add-service=http
[root@localhost ~]# firewall-cmd --permanent --add-service=http
2添加 Apache 服务到系统层使其随系统自动启动。
[root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl enable httpd.service
3安装本地源制作相关工具
[root@localhost ~]# yum install yum-utils createrepo
4下载安装资源
wget http://public-repo-1.hortonworks.com/ambari/centos7/2.x/
updates/2.6.0.0/ambari.repo
wget http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.6.0/ambari-2.6.0.0-centos7.tar.gz
将jdk-8u112-linux-x64.tar.gz 拷入到/var/lib/ambari-server/resources
5在httpd网站根目录,默认是即/var/www/html/,创建目录ambari,并且将下载的压缩包解压到/var/www/html/ambari目录。
[root@localhost ~]# # cd /var/www/html/
[root@lhtml]# mkdir ambari
[root@html# cd ambari/
[root@html# tar -zxvf ambari-2.6.0.0-centos7.tar.gz -C /var/www/html/
ambari/
tar -zxvf HDP-2.6.3.0-centos7-rpm.tar.gz -C /var/www/html/ambari/
tar -zxvf HDP-UTILS-1.1.0.21-centos7.tar.gz -C /var/www/html/ambari/
tar -zxvf HDP-UTILS-1.1.0.21-centos7.tar.gz
配置ambari的本地源
[root@localhost ~]# cd /etc/yum.repos.d
[root@yum.repos.d]# vi ambari.repo
yum makecache
#VERSION_NUMBER=2.6.0.0-267
[ambari-2.6.0.0]
name=ambari Version - ambari-2.6.0.0
baseurl=http://10.70.23.234//ambari/ambari/centos7/2.6.0.0-267
gpgcheck=1
gpgkey=http://10.70.23.234//ambari/ambari/centos7/2.6.0.0-267/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[root@localhost ~]# yum install ambari-agent -y
[root@localhost ~]# vi /etc/ambari-agent/conf/ambari-agent.ini
[server]
hostname=<your.ambari.server.hostname>
url_port=8440
secured_url_port=8441
将jdk-8u112-linux-x64.tar.gz 拷入到/var/lib/ambari-server/resources
[root@localhost ~]# ambari-server setup
[root@localhost ~]# ambari-server start
yum install ambari-server -y
[root@localhost ~]# ambari-server reset