#: 安装Hbase需要安装zookeeper , 单节点hbase集成了单zk ,故一个机器不需要再安装
#:先把解压,记住路径.
1.添加环境变量
HBASE_HOME=/home/candle/module/hbase-1.2.0-cdh5.15.0
PATH=$PATH:$HBASE_HOME/bin
这里的第一个路径是你的解压路径,第二个是其bin路径,修改在控制台输入 vim ~/.bash_profile
(此处修改完需要source一下或者重新开xshell连接以重置修改后的环境变量)
2.配置hbase-1.2.0-cdh5.15.0/conf/hbase-env.sh(这个文件位于你解压的文件夹的conf里面)
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
打开自带的zookeeper
127 # Tell HBase whether it should manage it's own instance of Zookeeper or not. 128 export HBASE_MANAGES_ZK=true
修改后
注:代码左边表示位于sh文件文档里面的行数!右边才是需要设置的,另外,我的机器名字叫abby ,解压路径设定目录module,
要使配置路径生效需要去掉前面的 # 号.
3.log4j.properties 日志输出
修改log4j.properties
20 hbase.log.dir=/home/abby/module/hbase-1.2.0-cdh5.15.0/logs
3.hbase-site.xml 配置
<property> <name>hbase.rootdirname> <value>hdfs://abby:9000/abby/hbasevalue> property> <property> <name>hbase.cluster.distributedname> <value>falsevalue> property> <property> <name>hbase.tmp.dirname> <value>/home/abby/module/hbase-1.2.0-cdh5.15.0/datasvalue> property>
5.regionservers
设置里面换成本地ip
6.启动hbase服务,(hadoop要先启动start-dfs.sh)
-[abby@abby conf] start-hbase.sh -- > hbase shell --> list_namespace
依次出现--
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
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