hbase-chd发行版 https://download.csdn.net/download/kxj19980524/11149638
配置hbase-env.sh
配置hbase-site.xml
<configuration>
<property>
<!-- hbase根目录,,如果hadoop集群是高可用的话,带高可用名称,别写死节点 -->
<name>hbase.rootdir</name>
<value>hdfs://hadoop-senior01.buba.com:8020/hbase</value>
</property>
<!-- 是否运行在分布式上面 -->
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<!-- 如果master不配置高可用的话,前面加上机器节点地址,配高可用直接写端口就可以了 -->
<property>
<name>hbase.master</name>
<value>60000</value>
</property>
<!-- zookeeper集群 -->
<property>
<name>hbase.zookeeper.quorum</name>
<value>hadoop-senior01.buba.com:2181,hadoop-senior02.buba.com:2181,hadoop-senior03.buba.com:2181</value>
</property>
<!-- zookeeper保存属性信息文件,默认为tmp,重启会丢失,这个目录是不存在的会自动创建的 -->
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/modules/zookeeper-3.4.5-cdh5.3.6/dataDir</value>
</property>
</configuration>
进入到hbase的lib目录下,删除掉hadoop开头的全部jar包,它自带的可能是apache下的,可能会不兼容,需要从当前运行的Hadoop集群的lib下把jar包拷贝过来,我上面hbase压缩包里,有挑出来的jar包,直接用就行了.zookeeper也得删掉.
要复制出来的jar包就是下面这些,如果换版本的话,也得自己往出找,我上面压缩包里有,这里就是列一下
这里涉及到的jar包大概是:
hadoop-annotations-2.5.0.jar
hadoop-auth-2.5.0-cdh5.3.6.jar
hadoop-client-2.5.0-cdh5.3.6.jar
hadoop-common-2.5.0-cdh5.3.6.jar
hadoop-hdfs-2.5.0-cdh5.3.6.jar
hadoop-mapreduce-client-app-2.5.0-cdh5.3.6.jar
hadoop-mapreduce-client-common-2.5.0-cdh5.3.6.jar
hadoop-mapreduce-client-core-2.5.0-cdh5.3.6.jar
hadoop-mapreduce-client-hs-2.5.0-cdh5.3.6.jar
hadoop-mapreduce-client-hs-plugins-2.5.0-cdh5.3.6.jar
hadoop-mapreduce-client-jobclient-2.5.0-cdh5.3.6.jar
hadoop-mapreduce-client-jobclient-2.5.0-cdh5.3.6-tests.jar
hadoop-mapreduce-client-shuffle-2.5.0-cdh5.3.6.jar
hadoop-yarn-api-2.5.0-cdh5.3.6.jar
hadoop-yarn-applications-distributedshell-2.5.0-cdh5.3.6.jar
hadoop-yarn-applications-unmanaged-am-launcher-2.5.0-cdh5.3.6.jar
hadoop-yarn-client-2.5.0-cdh5.3.6.jar
hadoop-yarn-common-2.5.0-cdh5.3.6.jar
hadoop-yarn-server-applicationhistoryservice-2.5.0-cdh5.3.6.jar
hadoop-yarn-server-common-2.5.0-cdh5.3.6.jar
hadoop-yarn-server-nodemanager-2.5.0-cdh5.3.6.jar
hadoop-yarn-server-resourcemanager-2.5.0-cdh5.3.6.jar
hadoop-yarn-server-tests-2.5.0-cdh5.3.6.jar
hadoop-yarn-server-web-proxy-2.5.0-cdh5.3.6.jar
zookeeper-3.4.5-cdh5.3.6.jar
CDH_HadoopJar.tar.gz 这个解压后就出来个HadoopJar/ ,把它下面所有jar包复制到hbase/lib下
这就配置好了,然后把hbase复制到hadoop的其它集群节点就可以了.
设置三台节点的软连接,三台节点都执行.不设置也可以,直接把配置文件复制过去就可以了.
core-site.xml
ln -s /opt/modules/hadoop-2.5.0-cdh5.3.6/etc/hadoop/core-site.xml /opt/modules/hbase-0.98.6-cdh5.3.6/conf/core-site.xml
hdfs-site.xml
ln -s /opt/modules/hadoop-2.5.0-cdh5.3.6/etc/hadoop/hdfs-site.xml /opt/modules/hbase-0.98.6-cdh5.3.6/conf/hdfs-site.xml
启动服务
第一种,每台集群单独启动
$ bin/hbase-daemon.sh start master
$ bin/hbase-daemon.sh start regionserver
或者:群起脚本
$ bin/start-hbase.sh
对应的停止命令:
$ bin/stop-hbase.sh
访问60010端口是web界面,现在备份master没有,也就是没有高可用.
会在hdfs上创建了hbase目录
如果没启动起来查看日志看看哪里出问题了