下载包:
http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0/ambari-2.6.0.0-centos7.tar.gz
http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.5.0/HDP-2.6.5.0-centos7-rpm.tar.gz
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7/HDP-UTILS-1.1.0.21-centos7.tar.gz
配置ambari用户
[root@xx-hz16 ~]# useradd ambari
[root@xx-hz16 ~]# passwd ambari
配置DNS和FQDN
vim /etc/hosts
ip hz16-hadooop hz16-hadoop.bdp
vim /etc/sysconfig/network
HOSTNAME=hz16-hadoop.bdp
关闭selinux和防火墙
关闭防火墙:
sudo systemctl disable firewalld
sudo systemctl stop firewalld
关闭selinx:
查看SELinux状态:sestatus
临时关闭,不用重启机器:setenforce 0
修改配置文件需要重启机器:
cat /etc/sysconfig/selinuxy
SELINUX=disabled
配置本地yum源
sudo yum install -y httpd
sduo systemctl start httpd.service
sduo systemctl enable httpd.service
sduo yum install yum-utils createrepo -y
安装ntp服务
sudo yum install ntp -y
sudo systemctl is-enabled ntpd
sudo systemctl enable ntpd
sudo systemctl start ntpd
安装并启动http服务
sudo yum install -y httpd
sudo systemctl start httpd.service
sudo systemctl status httpd.service
sudo mkdir /var/www/html/ambari
配置repo文件
ambari.repo
[root@xx-hz16 yum.repos.d]# vi ambari.repo
#VERSION_NUMBER=2.6.0.0-267
[ambari-2.6.0.0]
name=ambari Version - ambari-2.6.0.0
baseurl=http://ip/ambari/ambari/centos7/2.6.0.0-267
gpgcheck=1
gpgkey=http://ip/ambari/ambari/centos7/2.6.0.0-267/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
hdp.repo
[root@xx-hz16 yum.repos.d]# vi hdp.repo
#VERSION_NUMBER=2.6.3.0-235
[HDP-2.6.3.0]
name=HDP Version - HDP-2.6.3.0
baseurl=http://ip/ambari/HDP/centos7
gpgcheck=1
gpgkey=http://ip/ambari/HDP/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-UTILS-1.1.0.21]
name=HDP Utils Version - HDP-UTILS-1.1.0.21
baseurl=http://ip/ambari/HDP-UTILS
gpgcheck=1
gpgkey=http://ip/ambari/HDP-UTILS/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
将mysql的驱动包放到/usr/share/java
create database ambari DEFAULT CHARACTER SET utf8;
create user 'ambari'@'%' IDENTIFIED BY '123456';
grant all PRIVILEGES on *.* TO ' ambari'@'%';
FLUSH PRIVILEGES;
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
安装postgresql
[ambari@xx-hz16 software]$ sudo rpm -ivh postgresql-libs-8.4.18-1.el6_4.x86_64.rpm
[ambari@xx-hz16 software]$ sudo rpm -ivh postgresql-8.4.18-1.el6_4.x86_64.rpm
[ambari@xx-hz16 software]$ sudo rpm -ivh postgresql-server-8.4.18-1.el6_4.x86_64.rpm
安装ambari
sudo yum install ambari-server
sudo ambari-server setup
source /opt/software/Ambari-DDL-MySQL-CREATE.sql
sudo ambari-server start
系统基本参数配置
sysctl -w vm.swappiness=10
echo "vm.swappiness=10" >> /etc/sysctl.conf
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo "echo never > /sys/kernel/mm/transparent_hugepage/defrag" >> /etc/rc.local
echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local
启动
ip:8080
账号:admin
密码:amdin