ambari安装配置HDP
HDP对虚机的内存会有要求,现在每台分配3G内存可以保证安装能够顺利完成。分配2G内存的话,软件服务如HDFS都会安装失败,报各种错误,通信连接不上等。接上次安装ambari的步骤,开机启动ambari,登录web地址192.168.222.21:8080
点击上面登录成功页面的Launch Install Wizard 按钮进行集群配置
设置集群名称
设置HDP安装源
主机信息确认
选择要安装部署的服务
各个服务Master节点配置
从节点的配置
服务的定制化配置
datanode |
/root/training/bigdata/datanode |
yarn.nodemanager.local-dirs |
/root/training/bigdata/nodemanager/local |
yarn.nodemanager.log-dirs |
/root/training/bigdata/nodemanager/log |
所有密码 |
password |
显示配置信息
开始部署集群
全部安装成功界面如下
执行jps命令查看后台进程
安装完成
集群管理首页
绿色按钮是运行正常;红色按钮有错误的,可以点击进去查看错误日志,或者报警日志,按着提示做相应的处理
配置NameNodeHA
检查所有的服务和所有的主机的状态,是否是maintenance mode状态,如果是就要turn off掉。
:黑色急救箱标志,修改完成后会消失。
至少三台机器安装了zookeeper server,不然会报错
网上查询文档地址:
http://pivotalhd.docs.pivotal.io/docs/users-guide-ambari-2.1.2.html#_namenode_high_availability
https://docs.hortonworks.com/
开始安装配置
注:需要在提示的hdp21机器上手动执行命令
1 Login to the NameNode host hdp21.
2 Put the NameNode in Safe Mode (read-only mode):
sudo su hdfs -l -c 'hdfs dfsadmin -safemode enter'
3 Once in Safe Mode, create a Checkpoint:
sudo su hdfs -l -c 'hdfs dfsadmin -saveNamespace'
4 You will be able to proceed once Ambari detects that the NameNode is in Safe Mode and the Checkpoint has been created successfully.
If the Next button is enabled before you run the "Step 4: Create a Checkpoint" command, it means there is a recent Checkpoint already and you may proceed without running the "Step 4: Create a Checkpoint" command.
注: 需要在提示的hdp21上手动执行命令
1 Login to the NameNode host hdp21.
2 Initialize the JournalNodes by running:
sudo su hdfs -l -c 'hdfs namenode -initializeSharedEdits'
3 You will be able to proceed once Ambari detects that the JournalNodes have been initialized successfully.
注: 需要在提示的hdp21 hdp23上手动执行命令
1 Login to the NameNode host hdp21.
2 Initialize the metadata for NameNode automatic failover by running:
sudo su hdfs -l -c 'hdfs zkfc -formatZK'
3 Login to the Additional NameNode host hdp23.
Important! Be sure to login to the Additional NameNode host.
This is a different host from the Steps 1 and 2 above.
4 Initialize the metadata for the Additional NameNode by running:
sudo su hdfs -l -c 'hdfs namenode -bootstrapStandby'
搞定!