Hbase installation and configuration

#: Hbase need to install zookeeper, a single integrated single node hbase zk, it is not need to install a machine

#: First decompression, remember the path.

1. Add the environment variable

HBASE_HOME=/home/candle/module/hbase-1.2.0-cdh5.15.0  
PATH=$PATH:$HBASE_HOME/bin

First path here is your extraction path, the second path is the bin, to modify the input vim ~ / .bash_profile console

 (Where you modify it, or need to re-open xshell source connected to reset environment variables after modification)

2. Configure hbase-1.2.0-cdh5.15.0 / conf / hbase-env.sh ( This file is located in the conf folder you unzipped inside )

java path specified

26 # The java implementation to use.  Java 1.7+ required.
27 export JAVA_HOME=/home/abby/module/jdk1.8.0_181

hbase path specified

29 # Extra Java CLASSPATH elements.  Optional.
30 export HBASE_CLASSPATH=/home/abby/module/hbase-1.2.0-cdh5.15.0

Open comes zookeeper

127 # Tell HBase whether it should manage it's own instance of Zookeeper or not.
128 export HBASE_MANAGES_ZK=true

 Modified

Note: The left-hand represents the number of lines sh file located inside the right side of the document is to be set,! Also, my machine name is abby, set the extraction path directory module,

To configure the path validated need to remove the # sign in front .

3.log4j.properties log output

 Modify log4j.properties

20 hbase.log.dir=/home/abby/module/hbase-1.2.0-cdh5.15.0/logs

3.hbase-site.xml configuration

<-! HBase data storage location -> 
< Property > 
  < name > hbase.rootdir </ name > 
  < value > HDFS: // Abby: 9000 / Abby / HBase </ value > 
</ Property > 

! <- configured as a single-node mode -> 
< Property > 
  < name > hbase.cluster.distributed </ name > 
  < value > to false </ value > 
</ Property > 

<!- temporary data storage location, self-management ->
<property>
  <name>hbase.tmp.dir</name>
  <value>/home/abby/module/hbase-1.2.0-cdh5.15.0/datas</value>
</property>

5.regionservers

  Set inside into local ip

 6. Start hbase service, (hadoop first start start-dfs.sh)

-[abby@abby conf]  start-hbase.sh  -- > hbase shell --> list_namespace

Appear one -

starting master, logging to /home/abby/module/hbase-1.2.0-cdh5.15.0/bin/../logs/hbase-abby-master-abby.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

出现  

hbase(main):004:

出现  

--------------------------------------------------------------------------------------------------------------------------下面是纯TXT

安装hbase时候需要首先安装zookeeper
hbase中集成了单节点zk

1.添加环境变量
21 HBASE_HOME=/home/abby/module/hbase-1.2.0-cdh5.15.0
22 PATH=$PATH:$HBASE_HOME/bin

2.配置hbase-1.2.0-cdh5.15.0/conf/hbase-env.sh

java路径
26 # The java implementation to use. Java 1.7+ required.
27 export JAVA_HOME=/home/abby/module/jdk1.8.0_181

hbase路径
29 # Extra Java CLASSPATH elements. Optional.
30 export HBASE_CLASSPATH=/home/abby/module/hbase-1.2.0-cdh5.15.0

把自带的zk打开
127 # Tell HBase whether it should manage it's own instance of Zookeeper or not.
128 export HBASE_MANAGES_ZK=true

3.log4j.properties 日志输出
20 hbase.log.dir=/home/abby/module/hbase-1.2.0-cdh5.15.0/logs


4.hbase-site.xml
<!--hbase数据存放位置-->
<property>
<name>hbase.rootdir</name>
<value>hdfs://abby:9000/abby/hbase</value>
</property>

<!--配置成单节点模式-->
<property>
<name>hbase.cluster.distributed</name>
<value>false</value>
</property>

<!--临时数据存放位置,自己管理-->
<property>
<name>hbase.tmp.dir</name>
<value>/home/abby/module/hbase-1.2.0-cdh5.15.0/datas</value>
</property>

5.regionservers
本地ip


6.启动hbase服务
[abby@abby conf]$ start-hbase.sh
starting master, logging to /home/abby/module/hbase-1.2.0-cdh5.15.0/bin/../logs/hbase-abby-master-abby.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

执行jps 可以看到HMaster 服务进程
3405 HMaster

7.hbase shell

hbase(main):004:0* list_namespace
NAMESPACE
default
hbase

Guess you like

Origin www.cnblogs.com/alpha-cat/p/11516427.html