Hbase分布式安装
Hbase分布式安装
hbase-0.98.0-hadoop2-bin.tar
前提是已经安装好 Hadoop,zookeeper
hadoop port
9000
zookeeper port 2181 , dir /var/lib/zookeeper
[hm@n0 ~]$ tar -zxvf hbase-0.98.0-hadoop2-bin.tar
[hm@n0 ~]$ ln -s hbase-0.98.0-hadoop2 hbase
[hm@n0 ~]$ vim hbase/conf/hbase-env.sh
# exportJAVA_HOME=/usr/java/jdk1.6.0/
exportJAVA_HOME=/usr/local/java
# Tell HBase whether it should manage it'sown instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false
false使用独立的zookeeper.[hm@n0 ~]$ vim hbase/conf/hbase-site.xml
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://n0:9000/hbase</value> </property> <property> <name>hbase.rest.port</name> <value>60050</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>n0,n1,n2</value> </property> <property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value> </property> <property> <name> hbase.zookeeper.property.dataDir</name> <value>/var/lib/zookeeper</value> </property> </configuration>
[hm@n0 ~]$ vim hbase/conf/regionservers
n1
n2
===========================================
---复制
[hm@n0 ~]$scp -r hbase-0.98.0-hadoop2 n1:/home/hm
通过浏览器60010端口查看Hbase
http://localhost:60010/
n1
n2
===========================================
---复制
[hm@n0 ~]$scp -r hbase-0.98.0-hadoop2 n1:/home/hm
[hm@n0 ~]$scp -r
hbase-0.98.0-hadoop2
n2:/home/hm
[hm@n1 ~]$ln -s hbase-0.98.0-hadoop2 hbase
[hm@n2 ~]$ln -s hbase-0.98.0-hadoop2 hbase
------启动
[hm@n0 hbase]$ bin/start-hbase.sh
[hm@n0 hbase]$ bin/stop-hbase.sh
[hm@n1 ~]$ln -s hbase-0.98.0-hadoop2 hbase
[hm@n2 ~]$ln -s hbase-0.98.0-hadoop2 hbase
------启动
[hm@n0 hbase]$ bin/start-hbase.sh
[hm@n0 hbase]$ bin/stop-hbase.sh
JPS显示进程
n0:HMaster
n1,n2:HRegionServer
通过浏览器60010端口查看Hbase
http://localhost:60010/