01下载并配置环境变量
cd /downlocals
wget http://mirrors.hust.edu.cn/apache/hbase/1.3.1/hbase-1.3.1-bin.tar.gz
tar -zxvf hbase-1.3.1-bin.tar.gz -C /usr/local/src/
cd /usr/local/src/
mv hbase-1.3.1 hbase
vi /etc/profile
export HBASE_HOME=/usr/local/src/hbase
export PATH=${HBASE_HOME}/bin:$PATH
source /etc/profile
02 修改配置文件
cd /usr/local/src/hbase/conf/
配置子集群
vi regionservers
node02
node03
修改配置文件
vi hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://ns1/hbase</value> (注意这里为高可用配置,单机版为<value>hdfs://node01:9000/hbase</value>)
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master.port</name>
<value>16000</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/export/data/zk/</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>node01,node02,node03</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
配置JAVA_HOME
vi hbase-env.sh
export JAVA_HOME=/export/servers/jdk
export HBASE_MANAGES_ZK=false
将hadoop文件拷入
分发启动
scp -r /export/servers/hbase/ node02:/export/servers/
scp -r /export/servers/hbase/ node03:/export/servers/
start-hbase.sh