linux下Hbase安装(CDH)

hbase安装

  1. 下载地址:http://archive.cloudera.com/cdh5/cdh/5/hbase-1.2.0-cdh5.7.0.tar.gz

  2. 解压:tar -zxvf hbase-1.2.0-cdh5.7.0.tar.gz -C ~/app

  3. 配置环境变量:vi ~/.bash_profile

export HBASE_HOME=/home/hadoop/app/hbase-1.2.0-cdh5.7.0
export PATH=$HBASE_HOME/bin:$PATH

  1. 刷新环境变量source ~/.bash_profile

  2. 安装好后的配置:

vi /home/hadoop/app/hbase-1.2.0-cdh5.7.0/conf/hbase-env.sh
export JAVA_HOME=/home/hadoop/app/jdk1.8.0_144
#放开下面这个配置,使用自己的zookeeper
export HBASE_MANAGES_ZK=false
vi /home/hadoop/app/hbase-1.2.0-cdh5.7.0/conf/hbase-site.xml
<configuration>
<property>
        <name>hbase.rootdir</name>
        #设置根路径
                <value>hdfs://hadoop000:8020/hbase</value>
                </property>

<property>
        <name>hbase.cluster.distributed</name>
                <value>true</value>
                </property>

<property>
        <name>hbase.zookeeper.quorum</name>
                <value>hadoop000:2181</value>
                </property>

</configuration>
 vi regionservers 
 hadoop000                      #我的主机名

启动

zkServer.sh start         #先启动zk

start-all.sh		#再启动hadoop

cd /home/hadoop/app/hbase-1.2.0-cdh5.7.0/bin       
./start-hbase.sh        #最后启动hbase

[hadoop@hadoop000 sbin]$ jps
8866 HMaster
9026 HRegionServer
2915 Kafka
9172 Jps
8373 NodeManager
7782 NameNode
8265 ResourceManager
8105 SecondaryNameNode
7914 DataNode
2862 QuorumPeerMain

查看hbase ui界面

http://192.168.43.174:60010
linux下Hbase安装(CDH)_第1张图片

#其他操作
cd /home/hadoop/app/hbase-1.2.0-cdh5.7.0/bin

[hadoop@hadoop000 bin]$ hbase shell
xxxx

xxxx

hbase(main):001:0> version

hbase(main):001:0> status

hbase(main):001:0> list

hbase(main):001:0> describe 'table'

则安装成功

你可能感兴趣的:(hbase)