赞
踩
1.下载
wget https://archive.apache.org/dist/hbase/1.2.4/hbase-1.2.4-bin.tar.gz
2. 解压
tar zxvf hbase-1.2.4-bin.tar.gz -C /app
3.配置
cd /app/hbase-1.2.4/conf
拷贝Hadoop的hdfs-site.xml 、core-site.xml的到当前目录
cp /app/hadoop-2.7.3/etc/hadoop/hdfs-site.xml .
cp /app/hadoop-2.7.3/etc/hadoop/core-site.xml .
vi hbase-env.sh
- export JAVA_HOME=/app/jdk1.8.0_181
-
- ## 注释
- # Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
- #export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
- #export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
vi hbase-site.xml
- <configuration>
- <property>
- <name>hbase.rootdir</name>
- <value>hdfs://localhost:9000/hbase</value>
- </property>
- <property>
- <name>hbase.zookeeper.property.dataDir</name>
- <value>/tmp/hadoop_data/zookeeper</value>
- </property>
- <property>
- <name>hbase.cluster.distributed</name>
- <value>true</value>
- </property>
- </configuration>
启动
cd ../bin
./start-hbase.sh
./hbase shell
- [root@localhost bin]# ./start-hbase.sh
- localhost: starting zookeeper, logging to /app/hbase-1.2.4/bin/../logs/hbase-root-zookeeper-localhost.localdomain.out
- starting master, logging to /app/hbase-1.2.4/bin/../logs/hbase-root-master-localhost.localdomain.out
- starting regionserver, logging to /app/hbase-1.2.4/bin/../logs/hbase-root-1-regionserver-localhost.localdomain.out
- [root@localhost bin]# jps -m
- 18816 SecondaryNameNode
- 20176 Jps -m
- 18627 DataNode
- 19844 HRegionServer -D hbase.regionserver.port=16201 -D hbase.regionserver.info.port=16301 start
- 18533 NameNode
- 19692 HQuorumPeer start
- 19757 HMaster start
- [root@localhost bin]# ./hbase shell
- 2018-08-28 20:59:28,848 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
- HBase Shell; enter 'help<RETURN>' for list of supported commands.
- Type "exit<RETURN>" to leave the HBase Shell
- Version 1.2.4, r67592f3d062743907f8c5ae00dbbe1ae4f69e5af, Tue Oct 25 18:10:20 CDT 2016
-
- hbase(main):001:0> status
- 1 active master, 0 backup masters, 1 servers, 0 dead, 2.0000 average load

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。