Hadoop2.7.4+Hbase1.2.6+Zookeeper3.4.8集成安装-配置-调试-应用(二)
第三章、安装Zookeeper3.4.6
1.解压Zookeeper到 /soft/目录下
2.Zookeeper环境变量的配置
添加Zookeeper的路径
3.更改配置文件
将conf/zoo_sample.cfg改成conf/zoo.cfg
然后对zoo.cfg进行更改
举例(参考图片):
配置完成后效果:
4.在DataDir路径下创建myid文件
根据配置文件的dataLogDir路径
创建/soft/zookeeper-3.4.6/var/datalog文件夹
创建/soft/zookeeper-3.4.6/var文件夹
再创建/soft/zookeeper-3.4.6/var/data文件夹
再创建/soft/zookeeper-3.4.6/var/data/myid文件
向其中输入数字1 (对应zoo.cfg文件server后的数字)
其他节点在克隆后应根据zoo.cfg中对应的值进行更改
第四章、安装Hbase1.2.2
1.修改master1上hbase配置文件
2.修改配置文件
举例(参考图片):配置完成后效果如下:
conf/hbase-site.xml详细内容如****意hbase.rootdir的值用ip地址表示)
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://192.168.3.141:8020/hbase</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>file:/soft/hbase-1.0.0/tmp</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>192.168.3.141,master2,slave1,slave2,slave3</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/soft/zookeeper-3.4.6/var/data</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://slave1:60000</value>
</property>
<property>
<name>hbase.master.maxclockskew</name>
<value>180000</value>
<description>Time difference of regionserver from master</description>
</property>
</configuration>
根据conf/hbase-site.xml中hbase.tmp.dir值来创建文件夹
3.创建连接举例(参考图片):
配置命令:
4.编辑regionserver文件
5.覆盖hbase中lib文件夹下hadoop*.jar文件
(由于后期安装hbase出错,我把所有的hadoop下的jar包都导到hbase/lib下了)
如果hbase下的lib文件夹中的zookeeper的jar包与Zookeeper中的jar包也不符,那么也需要替换。
至此hbase也安装完了,克隆后需要做的是将集群节点的时间进行统一。
注意:此篇为大数据相关第二篇,后续请持续关注,敬请期待!