大数据,头歌,Hbase的配置

Hbase的配置

第一关

#创建 app 目录  
mkdir /app  
#进入 /opt 目录下  
cd /opt  
#解压 Hbase 压缩包  
tar -zxvf hbase-2.1.1-bin.tar.gz -C /app  
#编辑hbase-env.sh配置文件  
vi /app/hbase-2.1.1/conf/hbase-env.sh
#进入后配置配置  
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_111
#编辑hbase-site.xml配置文件  
vi /app/hbase-2.1.1/conf/hbase-site.xml
<configuration>  
  <property>  
       <name>hbase.rootdir</name>  
       <value>file:///root/data/hbase/data  
  </property>  
  <property>  
       <name>hbase.zookeeper.property.dataDir</name>  
       <value>/root/data/hbase/zookeeper</value>  
  </property>  
  <property>       
  <name>hbase.unsafe.stream.capability.enforce</name>  
        <value>false</value>  
  </property>  
</configuration>
#配置Hbase环境变量  
vi /etc/profile
HBASE_HOME=/app/hbase-2.1.1  
export PATH=$PATH:$HBASE_HOME/bin
#是环境变量生效  
source /etc/profile
#启动HBase(环境变量配置好后)  
start-hbase.sh

第二关

hbase shell
回车
create 'test','data'
回车
create 'dept','data'
回车
create 'emp','data'
回车
list
测评

第三关

# 启动 HBase  
start-hbase.sh  
# 进入 hbase shell  
hbase shell  
create 'mytable','data'  
put 'mytable','row1','data:1','zhangsan'  
put 'mytable','row2','data:2','zhangsanfeng'  
put 'mytable','row3','data:3','zhangwuji'
# 退出  
exit 

你可能感兴趣的:(大数据,大数据)