您的位置:首页 > 大数据

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

2017-01-13 15:52 549 查看
node1amari-server
node2amari-agentnamenode1,datanode,resourcemanager,zk
node3amari-agentnamenode2,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 连接器


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

在server本机,会将目标连接器拷贝到 /usr/lib/ambari-server/resources/ 目录中。

在集群内的所有成员机中,配置连接器信息。

配置完成后,再启动 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配置

可参考https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.1.1/bk_Ambari_Users_Guide/content/_how_to_configure_namenode_high_availability.html

In Ambari Web, select
Services > HDFS > Summary.


Select Service Actions and choose Enable NameNode HA





ResourceManager HA配置

可参考 https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.1.1/bk_Ambari_Users_Guide/content/_how_to_configure_resourcemanager_high_availability.html

In Ambari Web, browse to
Services > YARN > Summary
. Select
Service Actions
and choose
Enable ResourceManager HA
.



Hbase HA配置

In Ambari Web, browse to
Services > HBase
.

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

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



Hive HA配置

In Ambari Web, browse to
Services > Hive
.

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

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

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/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐