一、准备工作:

 

1.

基本工具

 

yum 

rpm 

scp 

curl 

wget 

pdsh 

前几个一般系统都自带了,

pdsh

需要自己装

 

 

yum install pdsh 

这个命令没有成功执行

 

自己下载

pdsh.tar.bz2

,用

tar 

-jxvf 

filename.tar.bz

解压。之后进入

filename

文件夹,执行

./configure,

然后执行

make

make install

命令。安装结束。

 

 

 

 

 

 

另:使用

yum 

install 

pdsh

没有成功的问题安装

epel

即可解决。

epel

是一个提供高质量

软件包的项目。安装过程如下:

 

 

1.

查看是否安装:

rpm -q epel-release 

 

2.

若没有,使用

rpm

命令安装:

 

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

(也可手

动下载安装包安装)

 

 

3.

成功后查看其所依附的软件包:

rpm -qR epel-release 

 

 

 

4.

导入

key

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 

 

5.

安装

yum-priority

yum install yum-priorities 

 

6.cd /etc/yum.repos.d 

 

 

 

ls |grep epel 

 

7.

安装

pdsh

即可:

yum install pdsh 

 

 

ambari

文档上说“

The Python version shipped with SUSE 11, 2.6.0-8.12.2, has a critical bug that 

may cause the Ambari Agent to fail with 24 hours. If you are installing on SUSE 11, please update 

all your hosts to Python version 2.6.8-0.15.1.

 

使用

yum update python

命令更新

python

版本,但目前得到的版本是

2.6.6-***

的。

 

 

 

2.

分别配置

/etc/hosts

/etc/sysconfig/network 

ambari

节点为例:

(

本机

192.168.235.138) 

127.0.0.1 

 

 

 

 

 

 

 

 

ambari 

::1 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ambari 

 

192.168.235.139 

 

 

master 

192.168.235.140 

 

 

slave 

 

(修改主机名,比如改为

aaa

 

 

hostname aaa 

vi /etc/hosts 

 

在里面设置

aaa 

vi /etc/sysconfig/network 

在里面设置

aaa 

重启即可)

 

 

 

3.

设置免密码登陆:

 

[root@ambari ~]# ssh-keygen 

[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 slave1:/root/.ssh/ 

[root@ambari ~]# scp ~/.ssh/authorized_keys slave2:/root/.ssh/ 

 

 

4.

关闭

SELinux

 

暂时关闭命令:

setenforce 0 

 

 

永久关闭命令:

vi /etc/selinux/config 

将其中的

SELinux

设置:为

SELINUX=disabled 

 

 

 

5.

关闭防火墙:

 

永久关闭:

chkconfig iptables off 

关闭:

/etc/init.d/iptables stop 

(也可在

setup

中设置开机不开启防火墙)

 

 

 

6.

设置关闭

packagekit 

vi /etc/yum/pluginconf.d/refresh-packagekit.conf 

enabled

设为

 

 

7. Optional: Configure the Local Repositorie

(没有联网,或者配置很大的集群并想保持带宽)

 

 

前面是百度得到的准备工作,照做就可以,第七步选作

 

wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo

 

yum install ambari-server

 

ambari-server start

ok了

 

参考:https://cwiki.apache.org/confluence/display/AMBARI/Install+Ambari+1.6.1+from+Public+Repositories

 

posted on 2014-10-20 21:53  老梁  阅读(297)  评论(1编辑  收藏  举报