准备工作
1.软件包
2.导入到虚拟机的opt目录下,并解压和改文件夹名字
tar -zxvf hbase-1.2.0-cdh5.14.2.tar.gz
mv hbase-1.2.0-cdh5.14.2/ hbase
配置环境变量
输入:
vi /etc/profile
最后插入:
export HBASE_HOME=/opt/hbase
export PATH=$PATH:$HBASE_HOME/bin
#记得保存退出后source etc/profile
文件配置(单机模式)
cd /opt/hbase/conf/
配置hbase-stie.xml文件
vi hbase-site.xml
在configuration标签内插入:
!-- hbase文件存储目录,这里指定的是linux系统,也可指定在hdfs://下-->
<property>
<name>hbase.rootdir</name>
<value>file:///opt/hbase/hbaseTmp</value>
</property>
启动和关闭:
start-hbase.sh
stop-hbase