hadoop的安裝請看http://www.cnblogs.com/zhangmin1987/p/8808711.htmlhtml
1、Hbase簡介前端
Apache HBase™是Hadoop數據庫,這是一個分佈式,可擴展的大數據存儲。node
當您須要隨機,實時讀取/寫入您的大數據時使用Apache HBase™。該項目的目標是託管很是大的表 - 數十億行×數百萬列 - 在商品硬件集羣上。Apache HBase是一個開源的,分佈式的,版本化的非關係數據庫,其模型是在Chang等人的Google Bigtable:結構化數據分佈式存儲系統以後創建的。就像Bigtable利用Google文件系統提供的分佈式數據存儲同樣,Apache HBase在Hadoop和HDFS之上提供了相似Bigtable的功能。linux
截取官網的一些內容以下,官網地址 shell
Apache HBase™ is the Hadoop database, a distributed, scalable, big data store.數據庫
Use Apache HBase™ when you need random, realtime read/write access to your Big Data. This project's goal is the hosting of very large tables -- billions of rows X millions of columns -- atop clusters of commodity hardware. Apache HBase is an open-source, distributed, versioned, non-relational database modeled after Google's Bigtable: A Distributed Storage System for Structured Data by Chang et al. Just as Bigtable leverages the distributed data storage provided by the Google File System, Apache HBase provides Bigtable-like capabilities on top of Hadoop and HDFS.apache
2、下載ruby
Click here to download Apache HBase™.session
3、Hbase的參考指南app
你們能夠仔細看下這個指南,包括了安裝說明和適配說明以及數據庫的模型和具體特性。
貼一下Hbase對JDK的適配性:
3、環境準備
三臺linux-cent0s6.5機器
機器1 192.168.234.129 master 主機
機器2 192.168.234.130 node1 主機
機器3 192.168.234.131 node2 主機
4、安裝
4.1 下載
下載請看二或者用wget 命令
4.2 安裝
[root@master local]# ls /local/hadoop-3.1.0.tar.gz /local/hadoop-3.1.0.tar.gz [root@master local]# tar -zxvf /local/hadoop-3.1.0.tar.gz
將解壓後的文件mv到/opt/下。
[root@master hbase]# pwd
/opt/hbase
而後配置/etc/profile
內容以下
#hbase config export HBASE_HOME=/opt/hbase export PATH=$HBASE_HOME/bin:$PATH "/etc/profile" 91L, 2237C written [root@master ~]# source /etc/profile
4.3 habse配置
配置三個文件:
1) 配置hbase-env.sh
默認狀況下hbase自帶的zookeeper配置是被註釋掉的,表明着當啓動hbase的時候它會再一次啓動hbase自帶的zookeeper,這個時候會報錯,端口被佔用。
因此這裏修改爲
export HBASE_MANAGES_ZK=false
2)配置/opt/hbase/conf/hbase-site.xml
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://master:9000/hbase/hbase_db</value> </property> <property> <name>hbase.master</name> <value>master</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>master,node1,node2</value> </property> <property> <name>zookeeper.session.timeout</name> <value>60000000</value> </property> <property> <name>dfs.support.append</name> <value>true</value> </property> </configuration>
3) 配置regionservers
[root@master conf]# cat regionservers node1 node2
4)集羣安裝:
配置完之後將hbase整個目錄和/etc/profile所有copy到node1和node2. (略)
和hadoop和zookeeper的複製相似,請參看http://www.cnblogs.com/zhangmin1987/p/8808711.html
複製完之後記得source
4.4 啓動
1)啓動順序: zookeeper--hadoop--hbase
啓動zookeeper和hadoop請參看前2篇文章 http://www.cnblogs.com/zhangmin1987/p/8808711.html 和 http://www.cnblogs.com/zhangmin1987/p/8818426.html
啓動hbase
[root@master bin]# pwd /opt/hbase/bin [root@master bin]# ./start-hbase.sh starting master, logging to /opt/hbase/logs/hbase-root-master-master.out Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 node2: starting regionserver, logging to /opt/hbase/bin/../logs/hbase-root-regionserver-node2.out node1: starting regionserver, logging to /opt/hbase/bin/../logs/hbase-root-regionserver-node1.out node2: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 node2: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 node1: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 node1: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
2)jps驗證
[root@master bin]# jps
9856 Jps
9584 HMaster
2931 NameNode
3306 ResourceManager
2731 QuorumPeerMain
[root@master bin]#
3)前端驗證
hdfs
http://192.168.234.129:50070/dfshealth.html#tab-startup-progress
yarn
http://192.168.234.129:8088/cluster/nodes
hbase
http://192.168.234.129:16010/master-status