mkdir /app
cd /opt
tar -zxvf hbase-2.1.1-bin.tar.gz -C /app
echo $JAVA_HOME
vim /app/hbase-2.1.1/conf/hbase-env.sh
##在文件内添加:export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_111
vim /app/hbase-2.1.1/conf/hbase-site.xml
##在文件内添加:
<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/root/data/hbase/zookeeper</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>true</value>
</property>
</configuration>
##
vim /etc/profile
##在文件内添加:
# SET HBASE_enviroment
HBASE_HOME=/app/hbase-2.1.1
export PATH=$PATH:$HBASE_HOME/bin
##
source /etc/profile
start-dfs.sh
start-hbase.sh
hadoop fs -mkdir /hbase