ambari 1.2.0安装(中文版)

1.配置hostname(所有节点)

ambari需要完整的hostname,要不然肯定会安装失败

vi /etc/sysconfig/network
HOSTNAME=node***.ambari

然后输入 hostname node***.ambari

测试hostname是否完成

hostname -f

hostname

上两个命令的输出结果应该是一致的,都为:node***.ambari

2.配置hosts(所有节点)

由于集群比较小,没必要配置DNS,因此用host就可以了

hosts文件内容应当如下

vi /etc/hosts

127.0.0.1 localhost.localdomain localhost
12.0.5.11 node1.ambari node1
12.0.5.12 node2.ambari node2
12.0.5.14 node4.ambari node4
12.0.5.15 node5.ambari node5
12.0.5.16 node6.ambari node6

第一列为IP地址,第二列为hostname,第三列为别名

3.配置SSH无密码访问(master节点)

选择一个节点为主节点,同时也是ambari的master节点

ssh-keygen -t dsa

生产公钥和密钥对

scp ~/.ssh/id_dsa.pub  node**:~/.ssh/authorized_keys

发送公钥到其他的节点

4.关闭iptables和SElinux(所有节点)

修改/etc/selinux/config文件中的SELINUX=""  disabled ,并重启!

输入sestatus  查看 SELINUX状态

关闭防火墙

chkconfig iptables off
/etc/init.d/iptables stop
5.配置NTP服务,同步集群时间(所有节点)

主节点:

(1)首先确定ntp是否存在,若不存在则通过以下命令安装:

  1. yum install ntp

(2)修改配置文件/etc/ntp.conf,在其中插入:

[c-sharp]  view plain copy
  1. restrict 12.0.5.0 mask 255.0.0.0 nomodify notrap  

其中:

用restrict控管权限
nomodify - 用户端不能更改ntp服务器的时间参数
noquery - 用户端不能使用ntpq,ntpc等命令来查询ntp服务器
notrap - 不提供trap远端登陆

(3)此时可以向12.0.5.0/24的机器提供时间服务了,开启ntp服务:

  1. /etc/rc.d/init.d/ntpd start // 启动ntp服务  
  2. chkconfig ntpd on // 让ntp服务开机启动  
其他节点(客户端同步)


1)修改vi /etc/ntp.conf,在里边插入:

  1. server 12.0.5.11  

(2)使ntpd服务开启启动

  1. chkconfig ntpd on  

(3)启动客户端ntpd服务

  1. /etc/rc.d/init.d/ntpd start  
6.在所有节点上安装以下软件

  • yum

  • rpm     

  • scp

  • curl    yum -y install curl

  • wget

  • pdsh yum -y install pdsh

    如果遇到gpg check的问题 可以

    用 yum install nagios --nogpgcheck

附:增加RPMforge源

1,download the rpmforge package:

http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

2,Install DAG's GPG key

sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

如果上面出现错误,确认下:

sudo rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm

3,sudo rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm

4,试试看:sudo yum install htop

开始更新系统:

yum update


7.检查相关安装

http://incubator.apache.org/ambari/1.2.0/installing-hadoop-using-ambari/content/ambari-chap1-5-1.html  

按照此网页的内容




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值