参考博客:https://blog.csdn.net/liuyunshengsir/article/details/102885122
执行脚本
wget -P /etc/yum.repos.d http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.4.0/ambari.repo
wget -P /etc/yum.repos.d http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.0/hdp.repo
wget -P /etc/yum.repos.d http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.1.4.0/hdp.gpl.repo
yum clean all
yum makecache
yum install ambari-server -y