通过Ambari2.2.2部署HDP大数据服务

node1 amari-server  
node2 amari-agent namenode1,datanode,resourcemanager,zk
node3 amari-agent namenode2,datanode,zk

官方安装文档:https://cwiki.apache.org/confluence/display/AMBARI/Install+Ambari+2.2.2+from+Public+Repositories

1.关闭防火墙和selinux,配置hosts,配置ssh免密码登录,时间同步,安装好jdk和ntp服务并启动

2.安装yum源和相关软件(在线安装很慢,可以把文件下载下来配置本地yum)

cd /etc/yum.repos.d/
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo
yum install ambari-server postgresql-server #node1执行

3.运行ambari-server setup命令设置Ambari

其他默认
设置JDK时候选择3,然后输入jdk的路径
选择数据库类型时候选择1(可根据自己需求安装其他数据库)

3.1启动Amabri

ambari-server start
成功启动后在浏览器输入nod1:8080,用户名和密码admin

3.2安装jdbc驱动

在 ambari-server 上停止 ambari-server 服务,然后在命令行使用

ambari-server setup --jdbc-db=mysql  --jdbc-driver=/root/mysql-connector-java-5.1.40/mysql-connector-java-5.1.40-bin.jar  #开始配置 jdbc-driver 连接器

此步操作会完成以下几个步骤:

  1. 在server本机,会将目标连接器拷贝到 /usr/lib/ambari-server/resources/ 目录中。
  2. 在集群内的所有成员机中,配置连接器信息。

配置完成后,再启动 ambari-server 服务,即可。

4.开始安装大数据

4.1点击上面登录成功页面的Launch Install Wizard 按钮进行集群配置

4.2版本号选择和操作系统

如果是使用本地yum源:

4.3输入节点名称和选择私钥

4.4会自动安装ambari-agent,然后进行注册,这里可能比较慢

如果遇到错误,按照要求排查

4.5选择要安装的服务

4.6服务的master配置和slave配置,可按需修改

4.7服务的客户化配置,可以根据需求修改

HDP配置lzo

yum -y install lzo lzo-devel hadooplzo hadooplzo-native

找到 Advanced core-site 项,在 io.compression.codecs 的原有value值中添加 com.hadoop.compression.lzo.LzoCodec

找到 Custom core-site 项,添加key为 io.compression.codec.lzo.class 且值为 com.hadoop.compression.lzo.LzoCodec 。

保存配置。 重启集群服务即可。

测试lzo:执行

hbase org.apache.hadoop.hbase.util.CompressionTest hdfs://mycluster/test_lzo lzo


4.8检查配置信息

4.9开始安装

安装各个服务,并且完成安装后会启动相关服务,安装过程比较长,如果中途出现错误,请根据具体提示或者log进行修改

NameNode HA配置

  1. In Ambari Web, select Services > HDFS > Summary.

  2. Select Service Actions and choose Enable NameNode HA

ResourceManager HA配置

Hbase HA配置

  1. In Ambari Web, browse to Services > HBase.

  2. In Service Actions, select the + Add HBase Master option.

  3. Choose the host to install the additional HBase Master, then choose Confirm Add.

Hive HA配置

  1. In Ambari Web, browse to Services > Hive.

  2. In Service Actions, select the + Add Hive Metastore option.

  3. Choose the host to install the additional Hive Metastore, then choose Confirm Add.

  4. Ambari installs the component and reconfigures Hive to handle multiple Hive Metastore instances.

 

参考:

http://www.jianshu.com/p/6e59df5f2461

http://blog.csdn.net/daiyutage/article/details/52210830

https://my.oschina.net/wstone/blog/521987

http://www.ibm.com/developerworks/cn/opensource/os-cn-bigdata-ambari/

http://www.linuxidc.com/Linux/2014-12/110824.htm

离线安装:

http://www.itweet.cn/2015/08/31/hdp-install/

原文地址:https://www.cnblogs.com/wsl222000/p/6283025.html