CentOS 6.5下安装Ambari 详解

一、前期环境准备

1.安装epel源

2.安装pdsh

yum -y install pdsh

3.在master和slave上配置hosts

cat /etc/hosts
127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
::1        localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.40.217  ambari
192.168.40.216  slave

4.设置免密码登录

ssh-keygen  -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): #输入空格
Enter same passphrase again: #输入空格
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
01:f9:c3:e6:e2:cc:46:1c:55:68:c4:2d:2b:eb:77:09 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|      .+.+.      |
|      ..* .      |
|      =.o      |
|      o *.      |
|    . *S.      |
|      = E        |
|    * . . .    |
|      * . o      |
|    . . .      |
+-----------------+
[root@ambari ~]# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[root@ambari ~]# scp ~/.ssh/authorized_keys master:/root/.ssh/
[root@ambari ~]# scp ~/.ssh/authorized_keys slave:/root/.ssh/

5.关闭selinux 和防火墙

二、安装ambari

1.配置yum源

[root@ambari ~]# wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo
[root@ambari ~]# mv ambari.repo  /etc/yum.repos.d/

2.安装ambari-server

[root@ambari ~]# yum  -y install ambari-server  #过程比较慢,ambari-server包有80M大小

3.本地配置

4.启动服务

[root@ambari ~]# ambari-server start
Using python  /usr/bin/python2.6
Starting ambari-server
WARNING: The hostname was not found in the reverse DNS lookup. This may result in incorrect behavior. Please check the DNS setup and fix the issue.
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log

启动ambari报错

WARNING: The hostname was not found in the reverse DNS lookup. This may result in incorrect behavior. Please check the DNS setup and fix the issue. ‘
这个问题是由于没有把主机名已经对应的ip加到/etc/hosts 导致的。

5.访问web

http://ip:8080  默认用户是admin,密码admin

猜你喜欢

转载自www.linuxidc.com/Linux/2017-03/141290.htm