一.准备环境
1.host
本人准备了三台服务器,
vim /etc/hosts
192.168.1.131 dk11
192.168.1.132 dk21
192.168.1.133 dk31
2.免密 SSH
cd ~
ssh-keygen
一直按回车
配置本地的免登录
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
配置其他节点
scp ~/.ssh/authorized_keys dk11:/root/.ssh/
scp ~/.ssh/authorized_keys dk21:/root/.ssh/
scp ~/.ssh/authorized_keys dk31:/root/.ssh/
OK .测试一下是否成功: ssh dk21, ssh dk31
出现
Last login: Tue Mar :: from dk11
说明成功
3. 关闭防火墙
4.同步集群的时间(ntp)
5. 关闭 selinux ,需要重启
vim /etc/selinux/config
SELINUX=disabled
重启.
二、安装Ambari Server
2.1添加 yum 源
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo cp ambari.repo /etc/yum.repos.d yum install epel-release
检查是否成功 :yum repolist
[root@dk11 run]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.zju.edu.cn
* epel: mirror.premi.st
* extras: mirrors.btte.net
* updates: mirrors.cn99.com
repo id repo name status
HDP-UTILS-1.1.0.15 Hortonworks Data Platform Utils Version - HDP-UTI
Updates-ambari-1.2.4.9 ambari-1.2.4.9 - Updates
ambari-.x Ambari .x
base CentOS- - Base ,
epel Extra Packages for Enterprise Linux - x86_64 ,
extras CentOS- - Extras
updates CentOS- - Updates
repolist: ,
出现 epel 则成功
2.2 安装
yum install ambari-server
2.3 设置
ambari-server setup
会提示安装jdk,网速好的可以确定,否则可以下载jdk-6u31-linux-x64.bin,放到/var/lib/ambari-server/resources/下面
接着会提示配置用的数据库,可以选择Oracle或postgresql,选择n会按默认配置
数据库类型:postgresql
数据库:ambari
用户名:ambari
密码:bigdata
如果提示Oracle JDK license,yes
等待安装完成
三、配置Ambari
启动 Ambari-server
ambari-server start
用户名密码: admin,admin
开始配置
点击
注意,秘钥 在 /root/.ssh/id_rsa 中
四.遇到的错误
4.1 Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
4.2 ambari 版本太低
Cluster primary OS type is redhat6 and local OS type is centos5 Local OS is not compatible with cluster primary OS. Please perform manual bootstrap on this host.
检查是不是你下载的
wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.2.4.9/ambari.repo
如果是,请改成 本文推荐的版本
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo
4.3 . error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group
解决方案: yum install openssl